Do not query neutron-server for device_id if in cache

Bug #1305265 reported by Aaron Rosen
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Expired
Medium
Unassigned

Bug Description

If you reboot the dhcp-agent it will query the neturon-server
once per network for device_id though it already knows this
information as it was returned in the initial get_active_networks_info call.

Tags: l3-ipam-dhcp
Aaron Rosen (arosen)
Changed in neutron:
assignee: nobody → Aaron Rosen (arosen)
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/havana)

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/86429

tags: added: l3-ipam-dhcp
Changed in neutron:
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (stable/havana)

Change abandoned by Aaron Rosen (<email address hidden>) on branch: stable/havana
Review: https://review.openstack.org/86429

Revision history for this message
Carl Baldwin (carl-baldwin) wrote :

Aaron, is this a problem on master? I saw a fix proposed to Havana but no where else. Just scratching my head over this a bit.

Revision history for this message
Aaron Rosen (arosen) wrote :

yup this is still a problem on master.

Changed in neutron:
assignee: Aaron Rosen (arosen) → nobody
Sam Betts (sambetts)
Changed in neutron:
assignee: nobody → Sam Betts (sambetts)
Revision history for this message
Sam Betts (sambetts) wrote :

After doing several experiments with devstack running the latest version of the neutron code, looking in the q-svc and q-dhcp logs after killing and restarting q-dhcp, I can only ever see the initial get_active_networks_info call to the neutron-server never any follow up calls looking for device_ids.
Aaron, do you have any more information about your environment when you saw these extra calls occurring, or do you have any log data that exhibits this bug for the current master branch?

Revision history for this message
Sam Betts (sambetts) wrote :
Download full text (4.8 KiB)

This is the section of the q-dhcp log I've been focusing on:

2014-08-13 05:59:00.858 INFO neutron.agent.dhcp_agent [req-6c348f40-cd54-436c-9d97-52b9f065a09c None None] Synchronizing state
2014-08-13 05:59:00.859 DEBUG neutron.common.rpc [req-6c348f40-cd54-436c-9d97-52b9f065a09c None None] neutron.agent.dhcp_agent.DhcpPluginApi method call called with arguments (<neutron.context.ContextBase object at 0x7f8486b4bf10>, {'args': {'host': 'sj19-gg34-sambetts'}, 'namespace': None, 'method': 'get_active_networks_info'}) {} from (pid=13054) wrapper /opt/stack/neutron/neutron/common/log.py:35
2014-08-13 05:59:00.862 INFO oslo.messaging._drivers.impl_rabbit [-] Connected to AMQP server on 172.29.172.144:5672
2014-08-13 05:59:00.868 INFO neutron.agent.dhcp_agent [-] DHCP agent started
2014-08-13 05:59:00.950 DEBUG neutron.agent.dhcp_agent [-] Calling driver for network: 17fbd471-2a5d-4667-964a-e7b14e689f19 action: enable from (pid=13054) call_driver /opt/stack/neutron/neutron/agent/dhcp_agent.py:119
2014-08-13 05:59:00.952 DEBUG neutron.agent.linux.utils [-] Running command: ['sudo', '/usr/local/bin/neutron-rootwrap', '/etc/neutron/rootwrap.conf', 'ip', 'netns', 'exec', 'qdhcp-17fbd471-2a5d-4667-964a-e7b14e689f19', 'ip', 'link', 'set', 'tap0a8d96cf-1e', 'up'] from (pid=13054) create_process /opt/stack/neutron/neutron/agent/linux/utils.py:48
2014-08-13 05:59:01.173 DEBUG neutron.agent.linux.utils [-]
Command: ['sudo', '/usr/local/bin/neutron-rootwrap', '/etc/neutron/rootwrap.conf', 'ip', 'netns', 'exec', 'qdhcp-17fbd471-2a5d-4667-964a-e7b14e689f19', 'ip', 'link', 'set', 'tap0a8d96cf-1e', 'up']
Exit code: 0
Stdout: ''
Stderr: '' from (pid=13054) execute /opt/stack/neutron/neutron/agent/linux/utils.py:79
2014-08-13 05:59:01.174 DEBUG neutron.agent.linux.dhcp [-] Reusing existing device: tap0a8d96cf-1e. from (pid=13054) setup /opt/stack/neutron/neutron/agent/linux/dhcp.py:890
2014-08-13 05:59:01.175 DEBUG neutron.agent.linux.utils [-] Running command: ['sudo', '/usr/local/bin/neutron-rootwrap', '/etc/neutron/rootwrap.conf', 'ip', 'netns', 'exec', 'qdhcp-17fbd471-2a5d-4667-964a-e7b14e689f19', 'ip', 'addr', 'show', 'tap0a8d96cf-1e', 'permanent', 'scope', 'global'] from (pid=13054) create_process /opt/stack/neutron/neutron/agent/linux/utils.py:48
2014-08-13 05:59:01.377 DEBUG neutron.agent.linux.utils [-]
Command: ['sudo', '/usr/local/bin/neutron-rootwrap', '/etc/neutron/rootwrap.conf', 'ip', 'netns', 'exec', 'qdhcp-17fbd471-2a5d-4667-964a-e7b14e689f19', 'ip', 'addr', 'show', 'tap0a8d96cf-1e', 'permanent', 'scope', 'global']

This is the section of q-svc log I've been focusing on:

2014-08-13 06:01:34.980 DEBUG neutron.common.rpc [-] Incoming RPC: ctxt:{u'read_deleted': u'no', u'project_name': None, u'user_id': No
ne, u'roles': [u'admin'], u'tenant_id': None, u'request_id': u'req-2a37b5e5-f724-410f-8335-700298c4316e', u'is_admin': True, u'user':
None, u'timestamp': u'2014-08-13 13:01:34.943968', u'tenant_name': None, u'project_id': None, u'user_name': None, u'tenant': None} mes
sage:{u'args': {u'agent_state': {u'agent_state': {u'binary': u'neutron-dhcp-agent', u'start_flag': True, u'topic': u'dhcp_agent', u'ho
st': u'sj19-gg34-sambetts', u'agent_type': u...

Read more...

Changed in neutron:
status: Confirmed → Incomplete
importance: High → Medium
Revision history for this message
Cedric Brandily (cbrandily) wrote :

This bug is > 365 days without activity. We are unsetting assignee and milestone and setting status to Incomplete in order to allow its expiry in 60 days.

If the bug is still valid, then update the bug status.

Changed in neutron:
assignee: Sam Betts (sambetts) → nobody
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for neutron because there has been no activity for 60 days.]

Changed in neutron:
status: Incomplete → Expired
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.