creating mirrored lvm volume in CentOS 7.4 fails

Bug #1730375 reported by Antony Cleave
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Medium
Antony Cleave

Bug Description

setting lvm_mirrors to anything apart from 0 causes this in /var/log/cinder/volume.log

2017-11-03 18:50:44.630 18988 ERROR cinder.scheduler.filter_scheduler [req-8469a0e2-1ea1-4c7e-b890-09b880957fe8 facb65ec57b64a3b8e742bd1d42d2e9e 22ee5249ed8d494f968d1284e26ffb3b - default default] Error scheduling None from last vol-service: controller-os1@lvm-mirror#lvm-mirror : [u'Traceback (most recent call last):
', u' File "/usr/lib/python2.7/site-packages/taskflow/engines/action_engine/executor.py", line 53, in _execute_task
    result = task.execute(**arguments)
', u' File "/usr/lib/python2.7/site-packages/cinder/volume/flows/manager/create_volume.py", line 938, in execute
    model_update = self._create_raw_volume(volume, **volume_spec)
', u' File "/usr/lib/python2.7/site-packages/cinder/volume/flows/manager/create_volume.py", line 906, in _create_raw_volume
    ret = self.driver.create_volume(volume)
', u' File "/usr/lib/python2.7/site-packages/cinder/volume/drivers/lvm.py", line 373, in create_volume
    mirror_count)
', u' File "/usr/lib/python2.7/site-packages/cinder/volume/drivers/lvm.py", line 200, in _create_volume
    vg_ref.create_volume(name, size, lvm_type, mirror_count)
', u' File "/usr/lib/python2.7/site-packages/cinder/brick/local_dev/lvm.py", line 566, in create_volume
    run_as_root=True)
', u' File "/usr/lib/python2.7/site-packages/os_brick/executor.py", line 52, in _execute
    result = self.__execute(*args, **kwargs)
', u' File "/usr/lib/python2.7/site-packages/cinder/utils.py", line 123, in execute
    return processutils.execute(*cmd, **kwargs)
', u' File "/usr/lib/python2.7/site-packages/oslo_concurrency/processutils.py", line 419, in execute
    cmd=sanitized_cmd)
', u'ProcessExecutionError: Unexpected error while running command.
Command: sudo cinder-rootwrap /etc/cinder/rootwrap.conf env LC_ALL=C lvcreate -n volume-1869321f-3725-4a5f-aace-342491e4e84d cinder-volumes -L 1g -m 1 --nosync --mirrorlog mirrored
Exit code: 3
Stdout: u\'\'
Stderr: u"File descriptor 20 (/dev/urandom) leaked on lvcreate invocation. Parent PID 19254: /usr/bin/python2\
  --mirrorlog is supported only with mirrors.\
  Run `lvcreate --help\' for more information.\
"
']

to reproduce on any Centos 7.4 node with the following backend (assuming you have a "cinder-volumes" volume group

[lvm-mirror]
volume_backend_name=lvm-mirror
volume_driver=cinder.volume.drivers.lvm.LVMVolumeDriver
lvm_mirrors=1
lvm_type=default

and create a volume using this backend

to fix add --type=mirror to the lvcreate comandline

Tags: drivers lvm
Eric Harney (eharney)
tags: added: drivers lvm
Changed in cinder:
assignee: nobody → Sean McGinnis (sean-mcginnis)
status: New → In Progress
Changed in cinder:
assignee: Sean McGinnis (sean-mcginnis) → Antony Cleave (antony.cleave)
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/517939
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=5643f60b4d45feb4e135997c43dcd8035cd50856
Submitter: Zuul
Branch: master

commit 5643f60b4d45feb4e135997c43dcd8035cd50856
Author: Antony Cleave <email address hidden>
Date: Mon Nov 6 12:20:17 2017 +0000

    Fixes creation of mirrored volumes due to wrong type

    new verions of lvcreate change the default mirror format to RAID1
    vs the old style (mirror). Cinder expects the old style mirror as
    --mirrorlog mirrored is specified and this is only supported on the
    mirror type, not raid1.

    To fix this add --type=mirror to the lvcreate syntax when
    lvm_mirrors is > 0 and -m is specified.

    Closes-bug: #1730375

    Change-Id: I72e2bd3e780b1dfbc4a3716bfd370ea8d0e28e96

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

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

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.