Issues in volume creation on unsupported skipactivation

Bug #1269445 reported by Dirk Mueller
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Dirk Mueller

Bug Description

Cinder volume service traces with the following error when lvchange is not in $PATH. As lvchange is in /sbin on SLE11, and /sbin is not part of the path for non-root, the test aborts with this trace:

2014-01-15 13:55:39.292 9325 ERROR cinder.volume.flows.create_volume [req-04565125-c12a-4081-b7dd-93fe0afc7e17 a0f6c8d7d68241f3bd6d1768775dc239 9d341e8aeb794086894e49e132766cd0] Unexpected build error:
2014-01-15 13:55:39.292 9325 TRACE cinder.volume.flows.create_volume Traceback (most recent call last):
2014-01-15 13:55:39.292 9325 TRACE cinder.volume.flows.create_volume File "/usr/lib64/python2.6/site-packages/cinder/taskflow/patterns/linear_flow.py", line 172, in run_it
2014-01-15 13:55:39.292 9325 TRACE cinder.volume.flows.create_volume result = runner(context, *args, **kwargs)
2014-01-15 13:55:39.292 9325 TRACE cinder.volume.flows.create_volume File "/usr/lib64/python2.6/site-packages/cinder/taskflow/utils.py", line 260, in __call__
2014-01-15 13:55:39.292 9325 TRACE cinder.volume.flows.create_volume self.result = self.task(*args, **kwargs)
2014-01-15 13:55:39.292 9325 TRACE cinder.volume.flows.create_volume File "/usr/lib64/python2.6/site-packages/cinder/volume/flows/create_volume/__init__.py", line 1499, in __call__
2014-01-15 13:55:39.292 9325 TRACE cinder.volume.flows.create_volume **volume_spec)
2014-01-15 13:55:39.292 9325 TRACE cinder.volume.flows.create_volume File "/usr/lib64/python2.6/site-packages/cinder/volume/flows/create_volume/__init__.py", line 1300, in _create_from_snapshot
2014-01-15 13:55:39.292 9325 TRACE cinder.volume.flows.create_volume snapshot_ref)
2014-01-15 13:55:39.292 9325 TRACE cinder.volume.flows.create_volume File "/usr/lib64/python2.6/site-packages/cinder/volume/drivers/lvm.py", line 176, in create_volume_from_snapshot
2014-01-15 13:55:39.292 9325 TRACE cinder.volume.flows.create_volume self.vg.activate_lv(snapshot['name'], is_snapshot=True)
2014-01-15 13:55:39.292 9325 TRACE cinder.volume.flows.create_volume File "/usr/lib64/python2.6/site-packages/cinder/brick/local_dev/lvm.py", line 487, in activate_lv
2014-01-15 13:55:39.292 9325 TRACE cinder.volume.flows.create_volume if self.supports_lvchange_ignoreskipactivation:
2014-01-15 13:55:39.292 9325 TRACE cinder.volume.flows.create_volume File "/usr/lib64/python2.6/site-packages/cinder/brick/local_dev/lvm.py", line 190, in supports_lvchange_ignoreskipactivation
2014-01-15 13:55:39.292 9325 TRACE cinder.volume.flows.create_volume (out, err) = self._execute(*cmd)
2014-01-15 13:55:39.292 9325 TRACE cinder.volume.flows.create_volume File "/usr/lib64/python2.6/site-packages/cinder/utils.py", line 142, in execute
2014-01-15 13:55:39.292 9325 TRACE cinder.volume.flows.create_volume return processutils.execute(*cmd, **kwargs)
2014-01-15 13:55:39.292 9325 TRACE cinder.volume.flows.create_volume File "/usr/lib64/python2.6/site-packages/cinder/openstack/common/processutils.py", line 158, in execute
2014-01-15 13:55:39.292 9325 TRACE cinder.volume.flows.create_volume shell=shell)
2014-01-15 13:55:39.292 9325 TRACE cinder.volume.flows.create_volume File "/usr/lib64/python2.6/site-packages/eventlet/green/subprocess.py", line 44, in __init__
2014-01-15 13:55:39.292 9325 TRACE cinder.volume.flows.create_volume subprocess_orig.Popen.__init__(self, args, 0, *argss, **kwds)
2014-01-15 13:55:39.292 9325 TRACE cinder.volume.flows.create_volume File "/usr/lib64/python2.6/subprocess.py", line 623, in __init__
2014-01-15 13:55:39.292 9325 TRACE cinder.volume.flows.create_volume errread, errwrite)
2014-01-15 13:55:39.292 9325 TRACE cinder.volume.flows.create_volume File "/usr/lib64/python2.6/subprocess.py", line 1141, in _execute_child
2014-01-15 13:55:39.292 9325 TRACE cinder.volume.flows.create_volume raise child_exception
2014-01-15 13:55:39.292 9325 TRACE cinder.volume.flows.create_volume OSError: [Errno 13] Permission denied

Solution/workaround is to run it via the root wrapper, which has /sbin in its trusted paths.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

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

Changed in cinder:
assignee: nobody → Dirk Mueller (dmllr)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/66876
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=193096a476ca3da2ef7f36f89fdbd897c5bcc320
Submitter: Jenkins
Branch: master

commit 193096a476ca3da2ef7f36f89fdbd897c5bcc320
Author: Dirk Mueller <email address hidden>
Date: Wed Jan 15 15:45:01 2014 +0100

    LVM: Robustify skipactivation detection

    Running lvchange might fail due to not being in
    $PATH for non-root user, and the corresponding OSError
    was not caught.

    Simply check for lvm2 being 2.02.99 or newer.

    Closes-Bug: #1269445
    Change-Id: I308bd97cb729e83677f18a693274265a182d794c

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

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/72828

Thierry Carrez (ttx)
Changed in cinder:
milestone: none → icehouse-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: icehouse-3 → 2014.1
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.