Comment 1 for bug 1842751

Revision history for this message
Camille Rodriguez (camille.rodriguez) wrote : Re: disco-stein: hook failed: "config-changed" with mkfs.xfs: cannot open /dev/vdb: Device or resource busy

Affects similarly charm-cinder. https://openstack-ci-reports.ubuntu.com/artifacts/test_charm_pipeline_func_full/openstack/charm-cinder/678676/3/3803/index.html

root@juju-ccba06-zaza-ea7ecb946ebc-0:/var/lib/juju/agents/unit-cinder-0/charm# ./hooks/config-changed
  Failed to find physical volume "/dev/vdb".
  Failed to find physical volume "/dev/vdb".
Creating new GPT entries.
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot or after you
run partprobe(8) or kpartx(8)
GPT data structures destroyed! You may now partition the disk using fdisk or
other utilities.
Creating new GPT entries.
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot or after you
run partprobe(8) or kpartx(8)
The operation has completed successfully.
1+0 records in
1+0 records out
1048576 bytes (1.0 MB, 1.0 MiB) copied, 0.00690306 s, 152 MB/s
100+0 records in
100+0 records out
51200 bytes (51 kB, 50 KiB) copied, 0.00156154 s, 32.8 MB/s
  Can't open /dev/vdb exclusively. Mounted filesystem?
Traceback (most recent call last):
  File "./hooks/config-changed", line 622, in <module>
    hooks.execute(sys.argv)
  File "/var/lib/juju/agents/unit-cinder-0/charm/charmhelpers/core/hookenv.py", line 914, in execute
    self._hooks[hook_name]()
  File "/var/lib/juju/agents/unit-cinder-0/charm/charmhelpers/contrib/openstack/utils.py", line 1560, in wrapped_f
    stopstart, restart_functions)
  File "/var/lib/juju/agents/unit-cinder-0/charm/charmhelpers/core/host.py", line 741, in restart_on_change_helper
    r = lambda_f()
  File "/var/lib/juju/agents/unit-cinder-0/charm/charmhelpers/contrib/openstack/utils.py", line 1559, in <lambda>
    (lambda: f(*args, **kwargs)), __restart_map_cache['cache'],
  File "/var/lib/juju/agents/unit-cinder-0/charm/charmhelpers/contrib/hardening/harden.py", line 93, in _harden_inner2
    return f(*args, **kwargs)
  File "./hooks/config-changed", line 197, in config_changed
    conf['remove-missing-force'])
  File "/var/lib/juju/agents/unit-cinder-0/charm/hooks/cinder_utils.py", line 543, in configure_lvm_storage
    prepare_volume(device)
  File "/var/lib/juju/agents/unit-cinder-0/charm/hooks/cinder_utils.py", line 594, in prepare_volume
    create_lvm_physical_volume(device)
  File "/var/lib/juju/agents/unit-cinder-0/charm/charmhelpers/contrib/storage/linux/lvm.py", line 92, in create_lvm_physical_volume
    check_call(['pvcreate', block_device])
  File "/usr/lib/python3.7/subprocess.py", line 347, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['pvcreate', '/dev/vdb']' returned non-zero exit status 5.