nova-rootwrap causing issues with linux_net

Bug #921784 reported by Adam Gandelman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Adam Gandelman

Bug Description

Using nova-rootwrap on a multi_host compute node using FlatDHCP, instance creation leads to an errror in compute log and no bridge interface is created:

http://paste.ubuntu.com/816864/

On instance tear-down, nova-network throws the following error when trying HUP the dnsmasq process:

-01-25 14:19:23,497 DEBUG nova.utils [req-1f029670-55c3-4f2e-bf7e-419c9ccce7a9 None None] Running cmd (subprocess): sudo nova-rootwrap kill -HUP 18453 from (pid=18561) debug /usr/lib/python2.7/dist-packages/nova/log.py:175
2012-01-25 14:19:23,545 DEBUG nova.utils [req-1f029670-55c3-4f2e-bf7e-419c9ccce7a9 None None] Result was 99 from (pid=18561) debug /usr/lib/python2.7/dist-packages/nova/log.py:175
2012-01-25 14:19:23,546 DEBUG nova.linux_net [req-1f029670-55c3-4f2e-bf7e-419c9ccce7a9 None None] Hupping dnsmasq threw Unexpected error while running command.
Command: sudo nova-rootwrap kill -HUP 18453
Exit code: 99

I believe these are due to 1) nova-rootwrappers handling of argument list during filter matching 2) a type error during argument handling in the root filter

Preparing a pach now

Changed in nova:
assignee: nobody → Adam Gandelman (gandelman-a)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

Changed in nova:
milestone: none → essex-3
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/3429
Committed: http://github.com/openstack/nova/commit/78c68b84dfc22eec233a607a6b596602487799d7
Submitter: Jenkins
Branch: master

commit 78c68b84dfc22eec233a607a6b596602487799d7
Author: Adam Gandelman <email address hidden>
Date: Wed Jan 25 12:27:05 2012 -0800

    rootwrap: Fix KillFilter matching

    The match() method in the KillFilter is a bit buggy. Since most/many
    run through this logic in their way to being matched, it creates subtle
    issues elsewhere, specifically during linux_net bridge creation. This
    fixes two issues.

    1. userargs gets elements directly popped off of it. If the KillFilter
    does not match the command its checking, the later filter that does is missing
    one argument.
    2. Type error on pid when checking /proc, this was causing issues on instance
    tear down / kill -HUP'ing dnsmasq.

    Fixes bug 921784

    Change-Id: I058ff2276e3154e8c1f6cc7077fa485db60e5827

Changed in nova:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (milestone-proposed)

Fix proposed to branch: milestone-proposed
Review: https://review.openstack.org/3451

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (milestone-proposed)

Reviewed: https://review.openstack.org/3451
Committed: http://github.com/openstack/nova/commit/ff3cd8039c9221587b1f174795affe94c32e6a1a
Submitter: Jenkins
Branch: milestone-proposed

commit ff3cd8039c9221587b1f174795affe94c32e6a1a
Author: Adam Gandelman <email address hidden>
Date: Wed Jan 25 12:27:05 2012 -0800

    rootwrap: Fix KillFilter matching

    The match() method in the KillFilter is a bit buggy. Since most/many
    run through this logic in their way to being matched, it creates subtle
    issues elsewhere, specifically during linux_net bridge creation. This
    fixes two issues.

    1. userargs gets elements directly popped off of it. If the KillFilter
    does not match the command its checking, the later filter that does is missing
    one argument.
    2. Type error on pid when checking /proc, this was causing issues on instance
    tear down / kill -HUP'ing dnsmasq.

    Fixes bug 921784

    Change-Id: I058ff2276e3154e8c1f6cc7077fa485db60e5827

Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: essex-3 → 2012.1
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.