LVM image build fails when VG name exists on build host

Bug #1987534 reported by Mark Goddard
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
diskimage-builder
In Progress
Undecided
Unassigned

Bug Description

# Steps to reproduce

Build an image using an LVM recipe, e.g the following (taken from docs):

    - lvm:
        name: lvm
        pvs:
          - name: pv
            options: ["--force"]
            base: root

        vgs:
          - name: vg
            base: ["pv"]
            options: ["--force"]

        lvs:
          - name: lv_root
            base: vg
            size: 1800M

          - name: lv_tmp
            base: vg
            size: 100M

          - name: lv_var
            base: vg
            size: 500M

          - name: lv_log
            base: vg
            size: 100M

          - name: lv_audit
            base: vg
            size: 100M

          - name: lv_home
            base: vg
            size: 200M

In this case, if there is a volume group called vg on the build host, the build would fail. The actual error gets swallowed in the logs, but if you run the command manually, you get this:

    sudo vgcreate vg /dev/mapper/loop6p3 --force
    /dev/vg: already exists in filesystem

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to diskimage-builder (master)
Changed in diskimage-builder:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on diskimage-builder (master)

Change abandoned by "Mark Goddard <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/diskimage-builder/+/854427

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.