Curtin clear_holders() does not work on lvm devices with either their vg name or lv name containing a -

Bug #1591573 reported by Wesley Wiedenmeier
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
curtin
Fix Released
Undecided
Wesley Wiedenmeier

Bug Description

Curtin is unable to remove logical volumes and volume groups encountered while running clear_holders(). It does not crash during the clear_holders phase, but instead fails silently. Installation fails while attempting to write a partition table to the disk:

[ 12.417125] cloud-init[1342]: labeling device: '/dev/vdb' with 'msdos' partition table
[ 12.422910] cloud-init[1342]: Running command ['parted', '/dev/vdb', '--script', 'mklabel', 'msdos'] with allowed return codes [0] (shell=False, capture=False)
[ 14.571996] cloud-init[1342]: Error: Partition(s) 2, 3 on /dev/vdb have been written, but we have been unable to inform the kernel of the change, probably because it/they are in use. As a result, the old partition(s) will remain in use. You should reboot now before making further changes.
[ 14.618894] cloud-init[1342]: An error occured handling 'sda': ProcessExecutionError - Unexpected error while running command

This occurs because in /sys/block/dm-{number}/dm/name, the volume group and logical volume name are separated by a single dash. If either of them contain dashes in their name, this is represented using a double dash. Curtin is currently using .split('-') to parse the name, which does not work as expected here.

Related branches

Revision history for this message
Wesley Wiedenmeier (wesley-wiedenmeier) wrote :

An example config file that should install correctly but does not.

Changed in curtin:
assignee: nobody → Wesley Wiedenmeier (wesley-wiedenmeier)
Ryan Harper (raharper)
tags: added: curtin-clear-holders
Changed in curtin:
status: New → Confirmed
Changed in curtin:
status: Confirmed → Fix Committed
Revision history for this message
Scott Moser (smoser) wrote : Fixed in Curtin 17.1

This bug is believed to be fixed in curtin in 17.1. If this is still a problem for you, please make a comment and set the state back to New

Thank you.

Changed in curtin:
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

Bug attachments

Remote bug watches

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