Disks never used unless overwrite=True

Bug #1383795 reported by Nobuto Murata
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cinder (Juju Charms Collection)
Fix Released
High
Liang Chen

Bug Description

"overwrite" is needed even for a totally empty disk, but I didn't notice it from the description:
====
  overwrite:
    default: "false"
    type: string
    description: |
      If true, charm will attempt to overwrite block devices containing
      previous filesystems or LVM, assuming it is not in use.
====

I specified block-device=/dev/vdb which does not have any partition table or filesystem, but charm did not setup PV on it.

[hooks/cinder_utils.py]
====
    # NOTE(jamespage)
    # might need todo an initial one-time scrub on install if need be
    vg_found = False
    new_devices = []
    for device in devices:
        if (not is_lvm_physical_volume(device) or
                (is_lvm_physical_volume(device) and
                 list_lvm_volume_group(device) != volume_group)):
            # Existing LVM but not part of required VG or new device
            if overwrite is True:
                clean_storage(device)
                new_devices.append(device)
                create_lvm_physical_volume(device)
====

The logic above or the description of the config can be improved, IMHO.

Related branches

Nobuto Murata (nobuto)
tags: added: cts
tags: added: openstack
James Page (james-page)
Changed in cinder (Juju Charms Collection):
importance: Undecided → High
status: New → Triaged
summary: - description of "overwrite" is misleading
+ Disks never used unless overwrite=True
Liang Chen (cbjchen)
Changed in cinder (Juju Charms Collection):
assignee: nobody → Liang Chen (cbjchen)
Liang Chen (cbjchen)
Changed in cinder (Juju Charms Collection):
status: Triaged → In Progress
Changed in cinder (Juju Charms Collection):
status: In Progress → Fix Committed
tags: added: backport-potential
James Page (james-page)
Changed in cinder (Juju Charms Collection):
milestone: none → 15.01
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.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.