If you try to create a physical volume on a device, which contains a valid file system signature, the chef infra client run will get stuck, because pvcreate asks for confirmation interactively.
:pancakes: Cookbook version
5.2.1
:woman_cook: Chef-Infra Version
16.16.13
:tophat: Platform details
Debian 11
Steps To Reproduce
Steps to reproduce the behavior:
Format the device. Let's assume /dev/vdb1 (Caution: This will destroy all your data. Please use a test device. You have been warned)
# mkfs.vfat /dev/vdb1
Initialize the physical volume
lvm_physical_volume '/dev/vdb1' do
action :create
end
:police_car: Expected behavior
Chef infra client run will fail with an error message.
:heavy_plus_sign: Additional context
If the wipe_signatures is set, no error will occur as the --yes option is appended to pvcreate an the signature will be wiped. If wipe_signatures is not set, the -qq option should be appended to pvcreate, to bail out immediately instead of performing interactive input queries.
:ghost: Brief Description
If you try to create a physical volume on a device, which contains a valid file system signature, the chef infra client run will get stuck, because
pvcreate
asks for confirmation interactively.:pancakes: Cookbook version
5.2.1
:woman_cook: Chef-Infra Version
16.16.13
:tophat: Platform details
Debian 11
Steps To Reproduce
Steps to reproduce the behavior:
/dev/vdb1
(Caution: This will destroy all your data. Please use a test device. You have been warned):police_car: Expected behavior
Chef infra client run will fail with an error message.
:heavy_plus_sign: Additional context
If the
wipe_signatures
is set, no error will occur as the--yes
option is appended topvcreate
an the signature will be wiped. Ifwipe_signatures
is not set, the-qq
option should be appended topvcreate
, to bail out immediately instead of performing interactive input queries.I will provide a pull request.