[Backport 1417379] KeyError returned when subnet-update enable_dhcp to False

Bug #1453148 reported by Alexander Ignatov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mirantis OpenStack
Fix Released
High
Alexander Ignatov
7.0.x
Fix Released
High
Alexander Ignatov

Bug Description

This is a backport for https://bugs.launchpad.net/neutron/+bug/1417379

Original description
================

Keyerror outputed in the trace log after set enable_dhcp of subnet to False.

[reproduce]
 neutron net-create test
 neutron dhcp-agent-network-add ID_of_DHCP_agent test
 neutron subnet-create test 192.168.100.0/24 --name test1
 neutron subnet-create test 192.168.101.0/24 --name test2
 neutron subnet-update test2 --enable_dhcp False
 tailf /opt/stack/logs/q-dhcp.log

[Trace log]
====================
2015-02-14 01:01:08.556 5436 DEBUG neutron.agent.dhcp.agent [-] resync (536ef879-baf5-405b-8402-303ff5e2e905): [KeyError(u'37f0b628-22e6-4446-8bb9-2c2176c5a646',)] _periodic_resync_helper /opt/stack/neutron/neutron/agent/dhcp/agent.py:189
2015-02-14 01:01:08.557 5436 DEBUG oslo_concurrency.lockutils [-] Lock "dhcp-agent" acquired by "sync_state" :: waited 0.000s inner /usr/local/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py:430
2015-02-14 01:01:08.558 5436 INFO neutron.agent.dhcp.agent [-] Synchronizing state
2015-02-14 01:01:08.559 5436 DEBUG oslo_messaging._drivers.amqpdriver [-] MSG_ID is a0f460425e904cc0b045336351d961d5 _send /usr/local/lib/python2.7/dist-packages/oslo_messaging/_drivers/amqpdriver.py:378
2015-02-14 01:01:08.559 5436 DEBUG oslo_messaging._drivers.amqp [-] UNIQUE_ID is d3aff7b1f8744f5b909ef5bc6eded8d2. _add_unique_id /usr/local/lib/python2.7/dist-packages/oslo_messaging/_drivers/amqp.py:224
2015-02-14 01:01:08.632 5436 DEBUG neutron.agent.dhcp.agent [-] Calling driver for network: 536ef879-baf5-405b-8402-303ff5e2e905 action: enable call_driver /opt/stack/neutron/neutron/agent/dhcp/agent.py:106
2015-02-14 01:01:08.633 5436 DEBUG neutron.agent.linux.utils [-] Unable to access /opt/stack/data/neutron/dhcp/536ef879-baf5-405b-8402-303ff5e2e905/pid get_value_from_file /opt/stack/neutron/neutron/agent/linux/utils.py:168
2015-02-14 01:01:08.633 5436 ERROR neutron.agent.dhcp.agent [-] Unable to enable dhcp for 536ef879-baf5-405b-8402-303ff5e2e905.
2015-02-14 01:01:08.633 5436 TRACE neutron.agent.dhcp.agent Traceback (most recent call last):
2015-02-14 01:01:08.633 5436 TRACE neutron.agent.dhcp.agent File "/opt/stack/neutron/neutron/agent/dhcp/agent.py", line 116, in call_driver
2015-02-14 01:01:08.633 5436 TRACE neutron.agent.dhcp.agent getattr(driver, action)(**action_kwargs)
2015-02-14 01:01:08.633 5436 TRACE neutron.agent.dhcp.agent File "/opt/stack/neutron/neutron/agent/linux/dhcp.py", line 207, in enable
2015-02-14 01:01:08.633 5436 TRACE neutron.agent.dhcp.agent interface_name = self.device_manager.setup(self.network)
2015-02-14 01:01:08.633 5436 TRACE neutron.agent.dhcp.agent File "/opt/stack/neutron/neutron/agent/linux/dhcp.py", line 934, in setup
2015-02-14 01:01:08.633 5436 TRACE neutron.agent.dhcp.agent port = self.setup_dhcp_port(network)
2015-02-14 01:01:08.633 5436 TRACE neutron.agent.dhcp.agent File "/opt/stack/neutron/neutron/agent/linux/dhcp.py", line 924, in setup_dhcp_port
2015-02-14 01:01:08.633 5436 TRACE neutron.agent.dhcp.agent for fixed_ip in dhcp_port.fixed_ips]
2015-02-14 01:01:08.633 5436 TRACE neutron.agent.dhcp.agent KeyError: u'37f0b628-22e6-4446-8bb9-2c2176c5a646'
2015-02-14 01:01:08.633 5436 TRACE neutron.agent.dhcp.agent
2015-02-14 01:01:08.634 5436 INFO neutron.agent.dhcp.agent [-] Synchronizing state complete
2015-02-14 01:01:08.635 5436 DEBUG oslo_concurrency.lockutils [-] Lock "dhcp-agent" released by "sync_state" :: held 0.078s inner /usr/local/lib/python2.7/dist-packages/oslo_concurrency/lockutils.py:442
====================

・All DHCP agents looks fine :-)
・Restart changes nothing. :-(

Tags: neutron
Changed in mos:
assignee: MOS Neutron (mos-neutron) → Kevin Benton (kevinbenton)
Revision history for this message
Alexander Ignatov (aignatov) wrote :

We'd prefer to wait until it's merged in upstream.

Changed in mos:
status: Confirmed → Won't Fix
Revision history for this message
Alexander Ignatov (aignatov) wrote :
Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Related fix proposed to openstack-build/neutron-build (openstack-ci/fuel-7.0/2015.1.0)

Related fix proposed to branch: openstack-ci/fuel-7.0/2015.1.0
Change author: Sergey Kolekonov <email address hidden>
Review: https://review.fuel-infra.org/10341

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Fix merged to openstack/neutron (openstack-ci/fuel-7.0/2015.1.0)

Reviewed: https://review.fuel-infra.org/10135
Submitter: mos-infra-ci <>
Branch: openstack-ci/fuel-7.0/2015.1.0

Commit: 6526c2b43d2557c047941ae6cd4533149d735122
Author: Ilya Shakhat <email address hidden>
Date: Wed Aug 12 08:42:46 2015

Merge branch 'stable/kilo'

Closes-Bug: #1453148
Change-Id: I1db759839349b626a1dc99e66c681d1db9b47759

Revision history for this message
Fuel Devops McRobotson (fuel-devops-robot) wrote : Related fix merged to openstack-build/neutron-build (openstack-ci/fuel-7.0/2015.1.0)

Reviewed: https://review.fuel-infra.org/10341
Submitter: Ivan Udovichenko <email address hidden>
Branch: openstack-ci/fuel-7.0/2015.1.0

Commit: 54c2ba6a6661f3214775d91c5755c37c685574a4
Author: Sergey Kolekonov <email address hidden>
Date: Wed Aug 12 15:49:45 2015

Update specs for the latest stable/kilo sources

- Update the patch for requirements.txt according to the latest Kilo sources
- Updated dependencies and changelog

Related-bug: #1453148
Change-Id: I63dbfb794f6bc09867224d203d17ff39c935935c

Anna Babich (ababich)
tags: added: on-verification
Revision history for this message
Anna Babich (ababich) wrote :

VERSION:
  feature_groups:
    - mirantis
  production: "docker"
  release: "7.0"
  openstack_version: "2015.1.0-7.0"
  api: "1.0"
  build_number: "187"
  build_id: "2015-08-18_03-05-20"
  nailgun_sha: "4710801a2f4a6d61d652f8f1e64215d9dde37d2e"
  python-fuelclient_sha: "4c74a60aa60c06c136d9197c7d09fa4f8c8e2863"
  fuel-agent_sha: "57145b1d8804389304cd04322ba0fb3dc9d30327"
  fuel-nailgun-agent_sha: "e01693992d7a0304d926b922b43f3b747c35964c"
  astute_sha: "e24ca066bf6160bc1e419aaa5d486cad1aaa937d"
  fuel-library_sha: "0062e69db17f8a63f85996039bdefa87aea498e1"
  fuel-ostf_sha: "17786b86b78e5b66d2b1c15500186648df10c63d"
  fuelmain_sha: "c9dad194e82a60bf33060eae635fff867116a9ce"

Verified on clusters: neutron+vxlan+l2pop, 3 controllers, 2 computes; neutron+vlan, 3 controllers, 2 computes

Verification scenario
1. neutron net-create test
2. neutron dhcp-agent-network-add ID_of_DHCP_agent test
3. neutron subnet-create test 192.168.100.0/24 --name test1
4. neutron subnet-create test 192.168.101.0/24 --name test2
5. neutron subnet-update test2 --enable_dhcp False
6. tailf /var/log/neutron/dhcp-agent.log

All steps were executed without errors and no errors appeared in log

tags: removed: on-verification
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.