Metering-agent fail to create iptables rule for add_metering_label_rule

Bug #1617248 reported by Zhengwei Gao
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Brian Haley

Bug Description

When metering-agent process add_metering_label_rule from neutron-server, it may fail to create iptables rule.

2016-08-24 18:59:52.393 50507 ERROR neutron.services.metering.agents.metering_agent -I neutron-meter-r-00599199-632 1 -i qg-f0732f6f-8e -d 192.168.10.0/24 -j neutron-meter-l-00599199-632
2016-08-24 18:59:52.393 50507 ERROR neutron.services.metering.agents.metering_agent COMMIT
2016-08-24 18:59:52.393 50507 ERROR neutron.services.metering.agents.metering_agent # Completed by iptables_manager
2016-08-24 18:59:52.393 50507 ERROR neutron.services.metering.agents.metering_agent # Generated by iptables_manager
2016-08-24 18:59:52.393 50507 ERROR neutron.services.metering.agents.metering_agent *raw
2016-08-24 18:59:52.393 50507 ERROR neutron.services.metering.agents.metering_agent -I OUTPUT 1 -j neutron-meter-OUTPUT
2016-08-24 18:59:52.393 50507 ERROR neutron.services.metering.agents.metering_agent -D OUTPUT 3
2016-08-24 18:59:52.393 50507 ERROR neutron.services.metering.agents.metering_agent -I PREROUTING 1 -j neutron-meter-PREROUTING
2016-08-24 18:59:52.393 50507 ERROR neutron.services.metering.agents.metering_agent -D PREROUTING 3
2016-08-24 18:59:52.393 50507 ERROR neutron.services.metering.agents.metering_agent COMMIT
2016-08-24 18:59:52.393 50507 ERROR neutron.services.metering.agents.metering_agent # Completed by iptables_manager
2016-08-24 18:59:52.393 50507 ERROR neutron.services.metering.agents.metering_agent ; Stdout: ; Stderr: iptables-restore v1.4.21: Couldn't load target `neutron-meter-l-00599199-632':No such file or directory
2016-08-24 18:59:52.393 50507 ERROR neutron.services.metering.agents.metering_agent
2016-08-24 18:59:52.393 50507 ERROR neutron.services.metering.agents.metering_agent Error occurred at line: 17
2016-08-24 18:59:52.393 50507 ERROR neutron.services.metering.agents.metering_agent Try `iptables-restore -h' or 'iptables-restore --help' for more information.
2016-08-24 18:59:52.393 50507 ERROR neutron.services.metering.agents.metering_agent
2016-08-24 18:59:52.393 50507 ERROR neutron.services.metering.agents.metering_agent
2016-08-24 18:59:52.395 50507 DEBUG oslo_concurrency.lockutils [req-60259460-b6d3-4c75-8ccf-a09ac4a6f3c8 5c7ad3780e3e4a8393cc0668d7ae594d cce3835f1f07431788f2df68c685a1b7 - - -] Lock "metering-agent" released by "neutron.services.metering.agents.metering_agent._invoke_driver" :: held 0.142s inner /usr/lib/python2.7/site-packages/oslo_concurrency/lockutils.py:282

Revision history for this message
Zhengwei Gao (multi-task) wrote :

The reason for cause error add_metering_label_rule arrive at metering-agent before add_metering_label.

description: updated
description: updated
Changed in neutron:
assignee: nobody → Zhengwei Gao (multi-task)
description: updated
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/361072

Changed in neutron:
status: New → In Progress
Revision history for this message
Kevin Benton (kevinbenton) wrote : auto-abandon-script

This bug has had a related patch abandoned and has been automatically un-assigned due to inactivity. Please re-assign yourself if you are continuing work or adjust the state as appropriate if it is no longer valid.

Changed in neutron:
assignee: Zhengwei Gao (multi-task) → nobody
status: In Progress → New
tags: added: timeout-abandon
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron (master)

Change abandoned by Kevin Benton (<email address hidden>) on branch: master
Review: https://review.openstack.org/361072
Reason: This review is > 4 weeks without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

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

Changed in neutron:
assignee: nobody → Brian Haley (brian-haley)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

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

commit 29652e0aff760bf445fd7ffef8eeede61a6710e3
Author: Brian Haley <email address hidden>
Date: Fri Mar 24 17:41:17 2017 -0400

    Verify metering label exists before applying rule

    If the metering-agent receives a label rule before it
    has added the label, it will fail to update the iptables
    rules as there are no existing chains.

    When the action is "create", check if there is an existing
    label, and create one and the corresponding iptables chains,
    before trying to add the rule.

    Closes-Bug: #1617248

    Change-Id: Ia0ec1361188cca53023667d249c2b1e10bc22089

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 11.0.0.0b2

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

tags: added: neutron-proactive-backport-potential
tags: added: neutron-easy-proactive-backport-potential
Changed in neutron:
importance: Undecided → Medium
tags: removed: neutron-easy-proactive-backport-potential neutron-proactive-backport-potential timeout-abandon
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/ocata)

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/474270

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

Reviewed: https://review.openstack.org/474270
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=8275f13dd73e836be0b9055b107aa75488552df9
Submitter: Jenkins
Branch: stable/ocata

commit 8275f13dd73e836be0b9055b107aa75488552df9
Author: Brian Haley <email address hidden>
Date: Fri Mar 24 17:41:17 2017 -0400

    Verify metering label exists before applying rule

    If the metering-agent receives a label rule before it
    has added the label, it will fail to update the iptables
    rules as there are no existing chains.

    When the action is "create", check if there is an existing
    label, and create one and the corresponding iptables chains,
    before trying to add the rule.

    Closes-Bug: #1617248

    Change-Id: Ia0ec1361188cca53023667d249c2b1e10bc22089
    (cherry picked from commit 29652e0aff760bf445fd7ffef8eeede61a6710e3)

tags: added: in-stable-ocata
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 10.0.3

This issue was fixed in the openstack/neutron 10.0.3 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.