do not pass ignoreactivationskip arg when using thin lvm

Bug #1701545 reported by Eric Harney
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
High
Eric Harney
os-brick
Fix Released
Undecided
Unassigned

Bug Description

We should not apply the ignoreactivationskip arguments when using thin LVM

Failure seen during volume clone:

2017-06-30 04:09:02.129 25559 ERROR cinder.volume.manager Traceback (most recent call last):
2017-06-30 04:09:02.129 25559 ERROR cinder.volume.manager File "/usr/lib/python2.7/site-packages/taskflow/engines/action_engine/executor.py", line 53, in _execute_task
2017-06-30 04:09:02.129 25559 ERROR cinder.volume.manager result = task.execute(**arguments)
2017-06-30 04:09:02.129 25559 ERROR cinder.volume.manager File "/usr/lib/python2.7/site-packages/cinder/volume/flows/manager/create_volume.py", line 909, in execute
2017-06-30 04:09:02.129 25559 ERROR cinder.volume.manager context, volume, **volume_spec)
2017-06-30 04:09:02.129 25559 ERROR cinder.volume.manager File "/usr/lib/python2.7/site-packages/cinder/volume/flows/manager/create_volume.py", line 491, in _create_from_source_volume
2017-06-30 04:09:02.129 25559 ERROR cinder.volume.manager model_update = self.driver.create_cloned_volume(volume, srcvol_ref)
2017-06-30 04:09:02.129 25559 ERROR cinder.volume.manager File "/usr/lib/python2.7/site-packages/cinder/volume/drivers/lvm.py", line 510, in create_cloned_volume
2017-06-30 04:09:02.129 25559 ERROR cinder.volume.manager permanent=True)
2017-06-30 04:09:02.129 25559 ERROR cinder.volume.manager File "/usr/lib/python2.7/site-packages/cinder/brick/local_dev/lvm.py", line 687, in activate_lv
2017-06-30 04:09:02.129 25559 ERROR cinder.volume.manager run_as_root=True)
2017-06-30 04:09:02.129 25559 ERROR cinder.volume.manager File "/usr/lib/python2.7/site-packages/os_brick/executor.py", line 49, in _execute
2017-06-30 04:09:02.129 25559 ERROR cinder.volume.manager result = self.__execute(*args, **kwargs)
2017-06-30 04:09:02.129 25559 ERROR cinder.volume.manager File "/usr/lib/python2.7/site-packages/cinder/utils.py", line 123, in execute
2017-06-30 04:09:02.129 25559 ERROR cinder.volume.manager return processutils.execute(*cmd, **kwargs)
2017-06-30 04:09:02.129 25559 ERROR cinder.volume.manager File "/usr/lib/python2.7/site-packages/oslo_concurrency/processutils.py", line 400, in execute
2017-06-30 04:09:02.129 25559 ERROR cinder.volume.manager cmd=sanitized_cmd)
2017-06-30 04:09:02.129 25559 ERROR cinder.volume.manager ProcessExecutionError: Unexpected error while running command.
2017-06-30 04:09:02.129 25559 ERROR cinder.volume.manager Command: sudo cinder-rootwrap /etc/cinder/rootwrap.conf lvchange -a y --yes -K -k n cinder-volumes/volume-cc4b053b-1ae1-48c7-b8b8-2e50b213728d
2017-06-30 04:09:02.129 25559 ERROR cinder.volume.manager Exit code: 3
2017-06-30 04:09:02.129 25559 ERROR cinder.volume.manager Stdout: u''
2017-06-30 04:09:02.129 25559 ERROR cinder.volume.manager Stderr: u'File descriptor 12 (/dev/urandom) leaked on lvchange invocation. Parent PID 25806: /usr/bin/python2\n Command does not accept option: --ignoreactivationskip.\n'
2017-06-30 04:09:02.129 25559 ERROR cinder.volume.manager

Tags: drivers lvm
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/479296

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

Reviewed: https://review.openstack.org/479294
Committed: https://git.openstack.org/cgit/openstack/os-brick/commit/?id=b82ab0d1a078d435bfe85c8aa9ed0805f26ca63a
Submitter: Jenkins
Branch: master

commit b82ab0d1a078d435bfe85c8aa9ed0805f26ca63a
Author: Eric Harney <email address hidden>
Date: Fri Jun 30 08:13:25 2017 -0400

    Don't use ignoreskipactivation for thin LVM

    This causes failures for volume clone and
    is not needed for thin.

    Closes-Bug: #1701545

    Change-Id: Ia47ca585985917f998e0a3d4cec36912ce57f579

Changed in os-brick:
status: New → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/479296
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=8f5e10d7ed8eead221cccb6a0ccf1afea310b0a9
Submitter: Jenkins
Branch: master

commit 8f5e10d7ed8eead221cccb6a0ccf1afea310b0a9
Author: Eric Harney <email address hidden>
Date: Fri Jun 30 08:56:23 2017 -0400

    Don't use ignoreskipactivation for thin LVM

    This causes failures for volume clone and
    is not needed for thin.

    Closes-Bug: #1701545

    Change-Id: I6b41e736f4c000205784fa97a1eadfccfe34722f

Changed in cinder:
status: In Progress → Fix Released
Revision history for this message
Thomas Bechtold (toabctl) wrote :

Due to the change from this bug, there is now another bug when using thin provisioning. See https://bugs.launchpad.net/cinder/+bug/1702322

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to os-brick (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/480224

Revision history for this message
Thomas Bechtold (toabctl) wrote :

@Eric: Could you tell me how I can reproduce this bug?

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

Related fix proposed to branch: master
Review: https://review.openstack.org/480226

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to cinder (master)

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

commit e8f1b419a4c28c87911063956053fae60c0f9a65
Author: Thomas Bechtold <email address hidden>
Date: Tue Jul 4 15:16:10 2017 +0000

    Revert "Don't use ignoreskipactivation for thin LVM"

    Commit 8f5e10d7ed8eead221cccb6a0ccf1afea310b0a9 wrongly assumed that
    the "ignoreskipactivation" flag is not needed when using thin LVM
    provisioning. This is wrong.
    Using thin LVM leads now to an error when the content will be copied:

    ERROR cinder.volume.manager Command: sudo cinder-rootwrap /etc/cinder/
          rootwrap.conf dd if=/dev/mapper/cinder--volumes-_snapshot--UUID
          of=/dev/mapper/cinder--volumes-volume--UUID
          count=1073741824 bs=1M iflag=count_bytes conv=sparse

    The reason is that the the snapshot is not activated and due to that,
    no device node is available under /dev/mapper .

    This reverts commit 8f5e10d7ed8eead221cccb6a0ccf1afea310b0a9 and makes
    thin provisioning for LVM working again.

    Change-Id: I788b297af92e11063b18c05a415b6f4d4d4bcd2c
    Closes-Bug: #1702322
    Related-Bug: #1701545

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to os-brick (master)

Reviewed: https://review.openstack.org/480224
Committed: https://git.openstack.org/cgit/openstack/os-brick/commit/?id=925f435cb99fc24895c13d7cfce7074442772c62
Submitter: Jenkins
Branch: master

commit 925f435cb99fc24895c13d7cfce7074442772c62
Author: Thomas Bechtold <email address hidden>
Date: Tue Jul 4 15:10:22 2017 +0000

    Revert "Don't use ignoreskipactivation for thin LVM"

    Commit b82ab0d1a078d435bfe85c8aa9ed0805f26ca63a wrongly assumed that
    the "ignoreskipactivation" flag is not needed when using thin LVM
    provisioning. This is wrong.
    Using thin LVM leads now to an error when the content will be copied:

    ERROR cinder.volume.manager Command: sudo cinder-rootwrap /etc/cinder/
          rootwrap.conf dd if=/dev/mapper/cinder--volumes-_snapshot--UUID
          of=/dev/mapper/cinder--volumes-volume--UUID
          count=1073741824 bs=1M iflag=count_bytes conv=sparse

    The reason is that the the snapshot is not activated and due to that,
    no device node is available under /dev/mapper .

    This reverts commit b82ab0d1a078d435bfe85c8aa9ed0805f26ca63a and makes
    thin provisioning for LVM working again.

    Change-Id: I062fd7d7120081c79c714d8177104cdd95522d2d
    Depends-On: I788b297af92e11063b18c05a415b6f4d4d4bcd2c
    Closes-Bug: #1702322
    Related-Bug: #1701545

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/os-brick 1.15.0

This issue was fixed in the openstack/os-brick 1.15.0 release.

Eric Harney (eharney)
Changed in os-brick:
status: Fix Released → New
Changed in cinder:
status: Fix Released → New
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/485256

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

Reviewed: https://review.openstack.org/485256
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=99d79431e3e00f15b33a6d1db7c0b9ba4d2a8e05
Submitter: Jenkins
Branch: master

commit 99d79431e3e00f15b33a6d1db7c0b9ba4d2a8e05
Author: Eric Harney <email address hidden>
Date: Wed Jul 19 11:00:41 2017 -0400

    LVM: Activate LV before creating exports

    In some circumstances (such as after a reboot),
    especially with thin LVM, the LV may not be activated, so
    creating a target from it will fail.

    Activate the LV before creating a target.

    When using permanent=True for activation, don't supply
    the -K/ignoreskipactivation argument. This is rejected
    by LVM 2.02.171, and is not a reasonable request, since
    it asks to simultaneously unset a flag, and also to ignore
    the flag (which should now be unset) during the same
    activation operation.

    This fixes a failure to clone a volume from another thin
    LVM volume in the same pool.

    Closes-Bug: #1701545

    Change-Id: I925ece8833cc99a95c4cf693804ca3698f8cb114

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

This issue was fixed in the openstack/cinder 11.0.0.0b3 development milestone.

Changed in os-brick:
status: New → Fix Released
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.