ERROR log "No DHCP agents are associated with network" is not an error in most cases

Bug #1289130 reported by Akihiro Motoki
34
This bug affects 7 people
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Armando Migliaccio

Bug Description

dhcp-agent notifier outputs ERROR log "No DHCP agents are associated with network"
but it is not an error and valid cases in most cases. It is so annoying for debugging and monitoring.

No dhcp-agent association for a network was logged as ERROR level. However it is completely incorrect for network_create_end, and usually wrong for subnet_create_end (because a subnet is created just after a network is created in most cases). We should not log it for these cases.

For other cases, a dhcp-agent is usually associated with a network, and no dhcp-agent assocation might be a symptom of some error. On the other hand there are valid cases where no dhcp-agent is associated (e.g., delete dhcp-agent association intentionally, network/subnet_update_end before a port is created). Considering these and the fact that error will be logged in
dhcp-agent scheduler, it would be better to be logged as INFO level now.

2014-03-07 02:29:08.533 5415 ERROR neutron.api.rpc.agentnotifiers.dhcp_rpc_agent_api [req-0babab8c-d638-4f1e-aef3-d58ad6af8b86 None] No DHCP agents are associated with network '6c3c60c7-2fce-4513-971c-b49b98d153c8'. Unable to send notification for 'network_create_end' with payload: {'network': {'status': 'ACTIVE', 'subnets': [], 'name': u'private', 'provider:physical_network': None, 'admin_state_up': True, 'tenant_id': u'33f39be0287d4316a29a4247dcd6db5c', 'provider:network_type': u'local', 'shared': False, 'id': '6c3c60c7-2fce-4513-971c-b49b98d153c8', 'provider:segmentation_id': None}}

http://logs.openstack.org/35/78835/1/check/check-tempest-dsvm-neutron/cd96f2f/logs/screen-q-svc.txt.gz?level=ERROR

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/78859

Changed in neutron:
status: New → In Progress
Changed in neutron:
assignee: Akihiro Motoki (amotoki) → Armando Migliaccio (armando-migliaccio)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

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

commit fb9886b903434321e62373cb4c11ba014921e4df
Author: armando-migliaccio <email address hidden>
Date: Mon Mar 10 14:29:29 2014 -0700

    Fix misleading error message about failed dhcp notifications

    This is achieved by adjusting the log traces and ensuring
    that the right log errors are emitted based on the status
    of the network.

    Also, the patch drastically simplifies the structure of the
    notification method and unit tests to increase coverage.

    Closes-bug: #1289130

    Change-Id: I7cc78bba81c516380fc93a68aa7b295312a88e29

Changed in neutron:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: icehouse-rc1 → 2014.1
Revision history for this message
Timur Nurlygayanov (tnurlygayanov) wrote :

Also reproduced on Openstack Havanna 2013.2.2

Do we plan to fix it for stable Havanna release?

Revision history for this message
Armando Migliaccio (armando-migliaccio) wrote :

I'll give a shot at cherry-picking it for havana...but the patch turned out to be fairly big so I am not sure it's is havana material.

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/96712

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (stable/havana)

Change abandoned by Armando Migliaccio (<email address hidden>) on branch: stable/havana
Review: https://review.openstack.org/96712

Revision history for this message
Armando Migliaccio (armando-migliaccio) wrote :

Timur, I tried the cherry-pick but the two branches look drastically different, as far as UT's are concerned. So, unless someone else wants to have at stub at it, this issue remains unsolved in Havana.

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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