LVM setup fails if 'cinder-volumes' VG exists on unconfigured device

Bug #1476418 reported by Jason Hobbs
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
cinder (Juju Charms Collection)
Fix Released
Medium
Jason Hobbs

Bug Description

This error is triggered when a 'cinder-volumes' VG exists on a PV on a device not configured for use in the current deployment of cinder.

Say cinder is deployed a system with 3 drives; sda goes for /, sdb is configured for cinder usage, and sdc had been used for cinder in a
previous deployment, but isn't configured for use in this deployment. When the cinder charm goes through lvm setup it won't look at /dev/sdc at all, and will try to create the cinder-volumes volume group from scratch on /dev/sdb, which results in an error:

A volume group called cinder-volumes already exists.

Traceback: http://pastebin.ubuntu.com/11911574/

Workaround: This issue can be avoided by always configuring cinder to use all the devices available on the system.

Ideas for a fix:
There are a few things the charm could do when it hits this case:
- Remove the existing cinder-volumes VG.
- Rename the existing cinder-volumes VG to something else.
- Incorporate the existing PV into cinder-volumes, even though charm config didn't ask for it explicitly.

I'd be happy with an option to enable removing the VG in this case, as I never want to try and recover it on a system that's been assigned to me from MAAS.

Tags: openstack oil

Related branches

Revision history for this message
Corey Bryant (corey.bryant) wrote :

I think we can handle this under the existing 'overwrite' config option, if it is set to true.

vgcreate has a --force option which might work, or maybe vgremove needs to be called before creating the vg.

The code that creates the vg is create_lvm_volume_group() in hooks/cinder_utils.py (which calls vgcreate).

Changed in cinder (Juju Charms Collection):
status: New → Fix Committed
assignee: nobody → Jason Hobbs (jason-hobbs)
milestone: none → 15.07
importance: Undecided → Medium
tags: added: openstack
James Page (james-page)
Changed in cinder (Juju Charms Collection):
status: Fix Committed → Fix Released
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.