Setting admin_state down on port produces no logs

Bug #1463891 reported by Roey Dekel
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Low
Hynek Mlnarik
Kilo
New
Undecided
Unassigned

Bug Description

Tried to check how admin_state down affects HA ports.
Noticed that management data between them stoped and cause them to become master. Although traffic to connected floating IP remain working.
Problem is: no log on OVS agent idicated why it's processing a port update or why it's setting it's VLAN tag to 4095.
(06:39:44 PM) amuller: there should be an INFO level log saying something like: "Setting port admin_state to {True/False}"(06:39:56 PM) amuller: with the port ID of course

Current log:
2015-06-08 10:25:25.782 1055 INFO neutron.plugins.openvswitch.agent.ovs_neutron_agent [req-b5a70070-2c49-47f2-9c77-49ba88851f4b ] Port 'ha-8e0f96c5-78' has lost its vlan tag '1'!
2015-06-08 10:25:25.783 1055 INFO neutron.agent.securitygroups_rpc [req-b5a70070-2c49-47f2-9c77-49ba88851f4b ] Refresh firewall rules
2015-06-08 10:25:26.784 1055 INFO neutron.plugins.openvswitch.agent.ovs_neutron_agent [req-b5a70070-2c49-47f2-9c77-49ba88851f4b ] Port 8e0f96c5-7891-46a4-8420-778454949bd0 updated. Details: {u'profile': {}, u'allowed_address_pairs': [], u'admin_state_up': False, u'network_id': u'6a5116a2-39f7-45bc-a432-3d624765d602', u'segmentation_id': 10, u'device_owner': u'network:router_ha_interface', u'physical_network': None, u'mac_address': u'fa:16:3e:02:cb:47', u'device': u'8e0f96c5-7891-46a4-8420-778454949bd0', u'port_security_enabled': True, u'port_id': u'8e0f96c5-7891-46a4-8420-778454949bd0', u'fixed_ips': [{u'subnet_id': u'f81913ba-328f-4374-96f2-1a7fd44d7fb1', u'ip_address': u'169.254.192.3'}], u'network_type': u'vxlan'}
2015-06-08 10:25:26.940 1055 INFO neutron.plugins.openvswitch.agent.ovs_neutron_agent [req-b5a70070-2c49-47f2-9c77-49ba88851f4b ] Configuration for device 8e0f96c5-7891-46a4-8420-778454949bd0 completed.

Revision history for this message
Assaf Muller (amuller) wrote :

Additional info / summary: When setting the admin_state to False on a port, the OVS agents are very confusing as there is no explicit message about the agent reacting to the event because of the admin state change, and no message explaining why its setting the port's vlan to 4095. It seems like an error and not an operation caused by the API.

summary: - VRRP: admin_state down on HA port cause management failure to agent
- without proper log
+ Setting admin_state down on port produces no logs
Changed in neutron:
status: New → Confirmed
importance: Undecided → Low
Assaf Muller (amuller)
tags: added: low-hanging-fruit
Changed in neutron:
assignee: nobody → Anand Shanmugam (anand1712)
Changed in neutron:
assignee: Anand Shanmugam (anand1712) → Srilatha Tangirala (jsrilatha)
Revision history for this message
Assaf Muller (amuller) wrote :

Ping Srilatha Tangirala. Are you taking care of this?

Revision history for this message
Miguel Angel Ajo (mangelajo) wrote :

Would it also make any sense to protect ha router internal ports from admin_down setting?, is there any value on allowing such thing?

Revision history for this message
Assaf Muller (amuller) wrote :

Special casing HA ports when setting admin_state is just so ugly I can't bring myself to suggest it.

Changed in neutron:
assignee: Srilatha Tangirala (jsrilatha) → Hynek Mlnarik (hmlnarik-s)
Changed in neutron:
status: Confirmed → In Progress
Revision history for this message
Hynek Mlnarik (hmlnarik-s) wrote :

I suggest INFO message should be only logged when port admin state is disabled, not when it is enabled.

There is already an INFO message in OVS neutron agent logged upon change of admin state containing the state - it is in the details of "Port X updated. Details: {...}" message. The confusion in this bug possibly comes from the fact that the admin state is somewhat hidden in the long details map.

Adding extra INFO message only for the case when admin state is disabled would remove the confusion about why port VLAN tag is set dead vlan (4095). Logging extra INFO message upon enabling admin state does not seem useful as there would still be (already existing) message about port update.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

Fix proposed to branch: master
Review: https://review.openstack.org/266383

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/266383
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=7ca04daa71910b578303845a363883fa036358f7
Submitter: Jenkins
Branch: master

commit 7ca04daa71910b578303845a363883fa036358f7
Author: Hynek Mlnarik <email address hidden>
Date: Tue Jan 12 09:10:25 2016 +0100

    Log INFO message when setting admin state up flag to False for OVS port

    Disabling admin state can cause confusion in OVS agent logs as to why
    VLAN 4095 is set to a particular port. This commit adds an extra INFO
    log message when admin state is disabled. There is no log emitted
    upon enabling admin state as there is already a detailed log entry
    logged in treat_devices_added_or_updated() function.

    Change-Id: I1301db8fea75af211f66a1914d1f0b706a6d5b36
    Closes-Bug: 1463891

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/liberty)

Fix proposed to branch: stable/liberty
Review: https://review.openstack.org/266948

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/kilo)

Fix proposed to branch: stable/kilo
Review: https://review.openstack.org/266957

Revision history for this message
Thierry Carrez (ttx) wrote : Fix included in openstack/neutron 8.0.0.0b2

This issue was fixed in the openstack/neutron 8.0.0.0b2 development milestone.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/liberty)

Reviewed: https://review.openstack.org/266948
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=a370fa302ccbb307eebc039a264af9b5ee16227f
Submitter: Jenkins
Branch: stable/liberty

commit a370fa302ccbb307eebc039a264af9b5ee16227f
Author: Hynek Mlnarik <email address hidden>
Date: Tue Jan 12 09:10:25 2016 +0100

    Log INFO message when setting admin state up flag to False for OVS port

    Disabling admin state can cause confusion in OVS agent logs as to why
    VLAN 4095 is set to a particular port. This commit adds an extra INFO
    log message when admin state is disabled. There is no log emitted
    upon enabling admin state as there is already a detailed log entry
    logged in treat_devices_added_or_updated() function.

    Change-Id: I1301db8fea75af211f66a1914d1f0b706a6d5b36
    Closes-Bug: 1463891
    (cherry picked from commit 7ca04daa71910b578303845a363883fa036358f7)

tags: added: in-stable-liberty
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/neutron 7.0.2

This issue was fixed in the openstack/neutron 7.0.2 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (stable/kilo)

Reviewed: https://review.openstack.org/266957
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=74bcec35cfacc019872a78a7bb5151f1080878c7
Submitter: Jenkins
Branch: stable/kilo

commit 74bcec35cfacc019872a78a7bb5151f1080878c7
Author: Hynek Mlnarik <email address hidden>
Date: Tue Jan 12 09:10:25 2016 +0100

    Log INFO message when setting admin state up flag to False for OVS port

    Disabling admin state can cause confusion in OVS agent logs as to why
    VLAN 4095 is set to a particular port. This commit adds an extra INFO
    log message when admin state is disabled. There is no log emitted
    upon enabling admin state as there is already a detailed log entry
    logged in treat_devices_added_or_updated() function.

    Change-Id: I1301db8fea75af211f66a1914d1f0b706a6d5b36
    Closes-Bug: 1463891
    (cherry picked from commit 7ca04daa71910b578303845a363883fa036358f7)

tags: added: in-stable-kilo
Revision history for this message
Doug Hellmann (doug-hellmann) wrote : Fix included in openstack/neutron 2015.1.4

This issue was fixed in the openstack/neutron 2015.1.4 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

This issue was fixed in the openstack/neutron 2015.1.4 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.