volume attach fails without systool installed

Bug #1172486 reported by Cory Stone
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Low
Walt Boring
Grizzly
Fix Released
Low
Russell Bryant

Bug Description

When systool is not installed the call to libvirt_utils.get_fc_wwnns fails.

There is code to try and trap this, but rootwrap seems to hide the problem. Without rootwrap, it crashes hard (OSError).

Revision history for this message
Cory Stone (corystone) wrote :

Here's the stack:

Traceback (most recent call last):
  File "/opt/nova/nova/compute/manager.py", line 2929, in _attach_volume
    connector = self.driver.get_volume_connector(instance)
  File "/opt/nova/nova/virt/libvirt/driver.py", line 898, in get_volume_connector
    self._fc_wwnns = libvirt_utils.get_fc_wwnns()
  File "/opt/nova/nova/virt/libvirt/utils.py", line 135, in get_fc_wwnns
    hbas = get_fc_hbas()
  File "/opt/nova/nova/virt/libvirt/utils.py", line 64, in get_fc_hbas
    run_as_root=True)
  File "/opt/nova/nova/virt/libvirt/utils.py", line 47, in execute
    return utils.execute(*args, **kwargs)
  File "/opt/nova/nova/utils.py", line 225, in execute
    shell=shell)
  File "/usr/local/lib/python2.7/dist-packages/eventlet/green/subprocess.py", line 25, in __init__
    subprocess_orig.Popen.__init__(self, args, 0, *argss, **kwds)
  File "/usr/lib/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1249, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory

Revision history for this message
Walt Boring (walter-boring) wrote :

This happens when a user runs the nova compute process as root. The nova utils then bypasses the rootwrap code and tries to run the command, which isn't trapped. rootwrap traps the no such file exception and reports differently.

Changed in nova:
assignee: nobody → Walt Boring (walter-boring)
Changed in nova:
status: New → Confirmed
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/27750

Changed in nova:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/27750
Committed: http://github.com/openstack/nova/commit/001961ed495a33cc944407888a2797f8a600e091
Submitter: Jenkins
Branch: master

commit 001961ed495a33cc944407888a2797f8a600e091
Author: Walter A. Boring IV <email address hidden>
Date: Mon Apr 29 13:51:42 2013 -0700

    Fix attach when running as root without sysfsutils

    When someone runs nova as root, and sysfsutils is not installed
    an exception was being thrown when a volume attach call was made.
    This wouldn't happen when being run as non-root because of the
    rootwrap would trap for the missing sysfsutils app (systool).

    Change-Id: Icc852fa7fd7a137cc7df86b8b96aeb629639ffad
    Fixes: bug 1172486

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

Fix proposed to branch: stable/grizzly
Review: https://review.openstack.org/27908

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

Reviewed: https://review.openstack.org/27908
Committed: http://github.com/openstack/nova/commit/2e55ecc5ed8e75c23d95e69d5e448f42771854d2
Submitter: Jenkins
Branch: stable/grizzly

commit 2e55ecc5ed8e75c23d95e69d5e448f42771854d2
Author: Walter A. Boring IV <email address hidden>
Date: Mon Apr 29 13:51:42 2013 -0700

    Fix attach when running as root without sysfsutils

    When someone runs nova as root, and sysfsutils is not installed
    an exception was being thrown when a volume attach call was made.
    This wouldn't happen when being run as non-root because of the
    rootwrap would trap for the missing sysfsutils app (systool).

    Change-Id: Icc852fa7fd7a137cc7df86b8b96aeb629639ffad
    Fixes: bug 1172486
    (cherry picked from commit 001961ed495a33cc944407888a2797f8a600e091)

tags: added: in-stable-grizzly
Changed in nova:
importance: Undecided → Low
Thierry Carrez (ttx)
Changed in nova:
milestone: none → havana-1
status: Fix Committed → Fix Released
Alan Pevec (apevec)
tags: removed: in-stable-grizzly
Thierry Carrez (ttx)
Changed in nova:
milestone: havana-1 → 2013.2
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.