[disco] [eoan] After unmount, cannot open /dev/vdb: Device or resource busy

Bug #1842751 reported by Ryan Beisner
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Cinder Charm
Triaged
Undecided
Unassigned
OpenStack Nova Compute Charm
Triaged
Undecided
Unassigned
linux (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Disco and Eoan device is busy after unmounting an ephemeral disk, cannot format the device until rebooting.

This is blocking all of OpenStack Charms which interact with block devices (Nova Compute, Ceph, Swift, Cinder), on the Disco and Eoan series. As we are nearing LTS-1, this will become urgent pretty quickly.

Reproducer, on an OpenStack cloud:
juju deploy cs:ubuntu ubuntu-bionic --series bionic
juju deploy cs:ubuntu ubuntu-disco --series disco
juju deploy cs:ubuntu ubuntu-eoan --series eoan

#### Succeeds on Bionic:

ubuntu@juju-8d01b7-foo-14:~$ uname -a
Linux juju-8d01b7-foo-14 4.15.0-60-generic #67-Ubuntu SMP Thu Aug 22 16:55:30 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

ubuntu@juju-8d01b7-foo-14:~$ lsb_release -c
Codename: bionic

ubuntu@juju-8d01b7-foo-14:~$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
vda 252:0 0 20G 0 disk
├─vda1 252:1 0 19.9G 0 part /
├─vda14 252:14 0 4M 0 part
└─vda15 252:15 0 106M 0 part /boot/efi
vdb 252:16 0 40G 0 disk /mnt

ubuntu@juju-8d01b7-foo-14:~$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 985M 0 985M 0% /dev
tmpfs 200M 712K 199M 1% /run
/dev/vda1 20G 1.7G 18G 9% /
tmpfs 997M 0 997M 0% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 997M 0 997M 0% /sys/fs/cgroup
/dev/vda15 105M 3.6M 101M 4% /boot/efi
/dev/vdb 40G 49M 38G 1% /mnt
tmpfs 100K 0 100K 0% /var/lib/lxd/shmounts
tmpfs 100K 0 100K 0% /var/lib/lxd/devlxd
tmpfs 200M 0 200M 0% /run/user/1000

ubuntu@juju-8d01b7-foo-14:~$ sudo umount /dev/vdb

ubuntu@juju-8d01b7-foo-14:~$ sudo mkfs.xfs -f -i size=1024 /dev/vdb
meta-data=/dev/vdb isize=1024 agcount=4, agsize=2621440 blks
         = sectsz=512 attr=2, projid32bit=1
         = crc=1 finobt=1, sparse=0, rmapbt=0, reflink=0
data = bsize=4096 blocks=10485760, imaxpct=25
         = sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=1
log =internal log bsize=4096 blocks=5120, version=2
         = sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0

#### Fails on Disco:

ubuntu@juju-8d01b7-foo-12:~$ uname -a
Linux juju-8d01b7-foo-12 5.0.0-27-generic #28-Ubuntu SMP Tue Aug 20 19:53:07 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
ubuntu@juju-8d01b7-foo-12:~$ lsb_release -c
Codename: disco

ubuntu@juju-8d01b7-foo-12:~$ sudo umount /mnt

ubuntu@juju-8d01b7-foo-12:~$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 88.7M 1 loop /snap/core/7396
loop1 7:1 0 54.5M 1 loop /snap/lxd/11727
vda 252:0 0 20G 0 disk
├─vda1 252:1 0 19.9G 0 part /
├─vda14 252:14 0 4M 0 part
└─vda15 252:15 0 106M 0 part /boot/efi
vdb 252:16 0 40G 0 disk

ubuntu@juju-8d01b7-foo-12:~$ sudo mkfs.xfs -f -i size=1024 /dev/vdb
mkfs.xfs: cannot open /dev/vdb: Device or resource busy

#### Fails on Eoan:

ubuntu@juju-8d01b7-foo-13:~$ sudo umount /mnt

ubuntu@juju-8d01b7-foo-13:~$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 88.7M 1 loop /snap/core/7396
loop1 7:1 0 54.5M 1 loop /snap/lxd/11727
vda 252:0 0 20G 0 disk
├─vda1 252:1 0 19.9G 0 part /
├─vda14 252:14 0 4M 0 part
└─vda15 252:15 0 106M 0 part /boot/efi
vdb 252:16 0 40G 0 disk

ubuntu@juju-8d01b7-foo-13:~$ sudo mkfs.xfs -f -i size=1024 /dev/vdb
mkfs.xfs: cannot open /dev/vdb: Device or resource busy

..

Original bug description:

On disco-stein, hook failed: "config-changed" with mkfs.xfs: cannot open /dev/vdb: Device or resource busy

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

https://openstack-ci-reports.ubuntu.com/artifacts/test_charm_pipeline_func_full/openstack/charm-cinder/678676/3/3803/test_charm_func_full_7062/juju-status-zaza-5b39f0208674.txt

https://openstack-ci-reports.ubuntu.com/artifacts/test_charm_pipeline_func_full/openstack/charm-cinder/678676/3/3803/test_charm_func_full_7062/juju-crashdump-7d3902a2-4fdf-435a-82c4-5d2ad9af4cb5.tar.xz

2019-09-03 21:33:27 DEBUG config-changed Unpacking apparmor-utils (2.13.2-9ubuntu6.1) ...
2019-09-03 21:33:27 DEBUG config-changed Setting up python3-libapparmor (2.13.2-9ubuntu6.1) ...
2019-09-03 21:33:27 DEBUG config-changed Setting up python3-apparmor (2.13.2-9ubuntu6.1) ...
2019-09-03 21:33:27 DEBUG config-changed Setting up apparmor-utils (2.13.2-9ubuntu6.1) ...
2019-09-03 21:33:27 DEBUG config-changed Processing triggers for man-db (2.8.5-2) ...
2019-09-03 21:33:30 INFO juju-log Setting up the apparmor profile for usr.bin.nova-compute in enforce mode.
2019-09-03 21:33:30 DEBUG config-changed Setting /etc/apparmor.d/usr.bin.nova-compute to enforce mode.
2019-09-03 21:33:30 DEBUG config-changed mkfs.xfs: cannot open /dev/vdb: Device or resource busy
2019-09-03 21:33:30 DEBUG config-changed Traceback (most recent call last):
2019-09-03 21:33:30 DEBUG config-changed File "/var/lib/juju/agents/unit-nova-compute-0/charm/hooks/config-changed", line 751, in <module>
2019-09-03 21:33:30 DEBUG config-changed main()
2019-09-03 21:33:30 DEBUG config-changed File "/var/lib/juju/agents/unit-nova-compute-0/charm/hooks/config-changed", line 744, in main
2019-09-03 21:33:30 DEBUG config-changed hooks.execute(sys.argv)
2019-09-03 21:33:30 DEBUG config-changed File "/var/lib/juju/agents/unit-nova-compute-0/charm/hooks/charmhelpers/core/hookenv.py", line 914, in execute
2019-09-03 21:33:30 DEBUG config-changed self._hooks[hook_name]()
2019-09-03 21:33:30 DEBUG config-changed File "/var/lib/juju/agents/unit-nova-compute-0/charm/hooks/charmhelpers/contrib/openstack/utils.py", line 1560, in wrapped_f
2019-09-03 21:33:30 DEBUG config-changed stopstart, restart_functions)
2019-09-03 21:33:30 DEBUG config-changed File "/var/lib/juju/agents/unit-nova-compute-0/charm/hooks/charmhelpers/core/host.py", line 741, in restart_on_change_helper
2019-09-03 21:33:30 DEBUG config-changed r = lambda_f()
2019-09-03 21:33:30 DEBUG config-changed File "/var/lib/juju/agents/unit-nova-compute-0/charm/hooks/charmhelpers/contrib/openstack/utils.py", line 1559, in <lambda>
2019-09-03 21:33:30 DEBUG config-changed (lambda: f(*args, **kwargs)), __restart_map_cache['cache'],
2019-09-03 21:33:30 DEBUG config-changed File "/var/lib/juju/agents/unit-nova-compute-0/charm/hooks/charmhelpers/contrib/hardening/harden.py", line 93, in _harden_inner2
2019-09-03 21:33:30 DEBUG config-changed return f(*args, **kwargs)
2019-09-03 21:33:30 DEBUG config-changed File "/var/lib/juju/agents/unit-nova-compute-0/charm/hooks/config-changed", line 264, in config_changed
2019-09-03 21:33:30 DEBUG config-changed configure_local_ephemeral_storage()
2019-09-03 21:33:30 DEBUG config-changed File "/var/lib/juju/agents/unit-nova-compute-0/charm/hooks/nova_compute_utils.py", line 1015, in configure_local_ephemeral_storage
2019-09-03 21:33:30 DEBUG config-changed mkfs_xfs(dev, force=True)
2019-09-03 21:33:30 DEBUG config-changed File "/var/lib/juju/agents/unit-nova-compute-0/charm/hooks/charmhelpers/contrib/storage/linux/utils.py", line 128, in mkfs_xfs
2019-09-03 21:33:30 DEBUG config-changed check_call(cmd)
2019-09-03 21:33:30 DEBUG config-changed File "/usr/lib/python3.7/subprocess.py", line 347, in check_call
2019-09-03 21:33:30 DEBUG config-changed raise CalledProcessError(retcode, cmd)
2019-09-03 21:33:30 DEBUG config-changed subprocess.CalledProcessError: Command '['mkfs.xfs', '-f', '-i', 'size=1024', '/dev/vdb']' returned non-zero exit status 1.
2019-09-03 21:33:30 ERROR juju.worker.uniter.operation runhook.go:132 hook "config-changed" failed: exit status 1
---
ProblemType: Bug
AlsaDevices:
 total 0
 crw-rw---- 1 root audio 116, 1 Sep 5 20:47 seq
 crw-rw---- 1 root audio 116, 33 Sep 5 20:47 timer
AplayDevices: Error: [Errno 2] No such file or directory: 'aplay': 'aplay'
ApportVersion: 2.20.10-0ubuntu27.1
Architecture: amd64
ArecordDevices: Error: [Errno 2] No such file or directory: 'arecord': 'arecord'
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1:
CRDA: N/A
DistroRelease: Ubuntu 19.04
Ec2AMI: ami-0000078c
Ec2AMIManifest: FIXME
Ec2AvailabilityZone: nova
Ec2InstanceType: m1.small
Ec2Kernel: unavailable
Ec2Ramdisk: unavailable
IwConfig: Error: [Errno 2] No such file or directory: 'iwconfig': 'iwconfig'
Lsusb:
 Bus 001 Device 002: ID 0627:0001 Adomax Technology Co., Ltd
 Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
MachineType: OpenStack Foundation OpenStack Nova
Package: linux (not installed)
PciMultimedia:

ProcEnviron:
 TERM=screen-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=C.UTF-8
 SHELL=/bin/bash
ProcFB:

ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-5.0.0-27-generic root=PARTUUID=c6e26b6d-1cc5-47e0-8025-e7a9c79727cc ro console=tty1 console=ttyS0
ProcVersionSignature: Ubuntu 5.0.0-27.28-generic 5.0.21
RelatedPackageVersions:
 linux-restricted-modules-5.0.0-27-generic N/A
 linux-backports-modules-5.0.0-27-generic N/A
 linux-firmware N/A
RfKill: Error: [Errno 2] No such file or directory: 'rfkill': 'rfkill'
Tags: disco ec2-images
Uname: Linux 5.0.0-27-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm audio cdrom dialout dip floppy netdev plugdev sudo video
_MarkForUpload: True
dmi.bios.date: 04/01/2014
dmi.bios.vendor: SeaBIOS
dmi.bios.version: 1.10.2-1ubuntu1
dmi.chassis.type: 1
dmi.chassis.vendor: QEMU
dmi.chassis.version: pc-i440fx-bionic
dmi.modalias: dmi:bvnSeaBIOS:bvr1.10.2-1ubuntu1:bd04/01/2014:svnOpenStackFoundation:pnOpenStackNova:pvr17.0.10:cvnQEMU:ct1:cvrpc-i440fx-bionic:
dmi.product.family: Virtual Machine
dmi.product.name: OpenStack Nova
dmi.product.version: 17.0.10
dmi.sys.vendor: OpenStack Foundation
---
ProblemType: Bug
AlsaDevices:
 total 0
 crw-rw---- 1 root audio 116, 1 Sep 5 20:48 seq
 crw-rw---- 1 root audio 116, 33 Sep 5 20:48 timer
AplayDevices: Error: [Errno 2] No such file or directory: 'aplay': 'aplay'
ApportVersion: 2.20.11-0ubuntu7
Architecture: amd64
ArecordDevices: Error: [Errno 2] No such file or directory: 'arecord': 'arecord'
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1:
CRDA: N/A
DistroRelease: Ubuntu 19.10
Ec2AMI: ami-0000078d
Ec2AMIManifest: FIXME
Ec2AvailabilityZone: nova
Ec2InstanceType: m1.small
Ec2Kernel: unavailable
Ec2Ramdisk: unavailable
IwConfig: Error: [Errno 2] No such file or directory: 'iwconfig': 'iwconfig'
Lsusb:
 Bus 001 Device 002: ID 0627:0001 Adomax Technology Co., Ltd QEMU USB Tablet
 Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
MachineType: OpenStack Foundation OpenStack Nova
Package: linux (not installed)
PciMultimedia:

ProcEnviron:
 TERM=screen-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=C.UTF-8
 SHELL=/bin/bash
ProcFB:

ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-5.2.0-15-generic root=PARTUUID=c92b681b-892a-4294-a588-50850030af8a ro console=tty1 console=ttyS0
ProcVersionSignature: Ubuntu 5.2.0-15.16-generic 5.2.9
RelatedPackageVersions:
 linux-restricted-modules-5.2.0-15-generic N/A
 linux-backports-modules-5.2.0-15-generic N/A
 linux-firmware N/A
RfKill: Error: [Errno 2] No such file or directory: 'rfkill': 'rfkill'
Tags: eoan ec2-images
Uname: Linux 5.2.0-15-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm audio cdrom dialout dip floppy netdev plugdev sudo video
_MarkForUpload: True
dmi.bios.date: 04/01/2014
dmi.bios.vendor: SeaBIOS
dmi.bios.version: 1.10.2-1ubuntu1
dmi.chassis.type: 1
dmi.chassis.vendor: QEMU
dmi.chassis.version: pc-i440fx-bionic
dmi.modalias: dmi:bvnSeaBIOS:bvr1.10.2-1ubuntu1:bd04/01/2014:svnOpenStackFoundation:pnOpenStackNova:pvr17.0.10:cvnQEMU:ct1:cvrpc-i440fx-bionic:
dmi.product.family: Virtual Machine
dmi.product.name: OpenStack Nova
dmi.product.version: 17.0.10
dmi.sys.vendor: OpenStack Foundation
---
ProblemType: Bug
AlsaDevices:
 total 0
 crw-rw---- 1 root audio 116, 1 Sep 5 20:48 seq
 crw-rw---- 1 root audio 116, 33 Sep 5 20:48 timer
AplayDevices: Error: [Errno 2] No such file or directory: 'aplay': 'aplay'
ApportVersion: 2.20.9-0ubuntu7.7
Architecture: amd64
ArecordDevices: Error: [Errno 2] No such file or directory: 'arecord': 'arecord'
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1:
CRDA: N/A
DistroRelease: Ubuntu 18.04
Ec2AMI: ami-00000789
Ec2AMIManifest: FIXME
Ec2AvailabilityZone: nova
Ec2InstanceType: m1.small
Ec2Kernel: unavailable
Ec2Ramdisk: unavailable
IwConfig: Error: [Errno 2] No such file or directory: 'iwconfig': 'iwconfig'
Lsusb:
 Bus 001 Device 002: ID 0627:0001 Adomax Technology Co., Ltd
 Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
MachineType: OpenStack Foundation OpenStack Nova
Package: linux (not installed)
PciMultimedia:

ProcEnviron:
 TERM=screen-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=C.UTF-8
 SHELL=/bin/bash
ProcFB:

ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.15.0-60-generic root=LABEL=cloudimg-rootfs ro console=tty1 console=ttyS0
ProcVersionSignature: Ubuntu 4.15.0-60.67-generic 4.15.18
RelatedPackageVersions:
 linux-restricted-modules-4.15.0-60-generic N/A
 linux-backports-modules-4.15.0-60-generic N/A
 linux-firmware N/A
RfKill: Error: [Errno 2] No such file or directory: 'rfkill': 'rfkill'
Tags: bionic ec2-images
Uname: Linux 4.15.0-60-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm audio cdrom dialout dip floppy netdev plugdev sudo video
_MarkForUpload: True
dmi.bios.date: 04/01/2014
dmi.bios.vendor: SeaBIOS
dmi.bios.version: 1.10.2-1ubuntu1
dmi.chassis.type: 1
dmi.chassis.vendor: QEMU
dmi.chassis.version: pc-i440fx-bionic
dmi.modalias: dmi:bvnSeaBIOS:bvr1.10.2-1ubuntu1:bd04/01/2014:svnOpenStackFoundation:pnOpenStackNova:pvr17.0.10:cvnQEMU:ct1:cvrpc-i440fx-bionic:
dmi.product.family: Virtual Machine
dmi.product.name: OpenStack Nova
dmi.product.version: 17.0.10
dmi.sys.vendor: OpenStack Foundation

Revision history for this message
Camille Rodriguez (camille.rodriguez) wrote :

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.

Revision history for this message
Ryan Beisner (1chb1n) wrote :
Download full text (3.5 KiB)

FYI I was able to easily and immediately reproduce the nova-compute/0 hook error by deploying the nova-compute disco-stein functional test in my bastion on our dev cloud (serverstack):

2019-09-05 17:08:34 DEBUG worker.uniter.jujuc server.go:182 running hook tool "juju-log"
2019-09-05 17:08:34 INFO juju-log Setting up the apparmor profile for usr.bin.nova-compute in enforce mode.
2019-09-05 17:08:34 DEBUG config-changed Setting /etc/apparmor.d/usr.bin.nova-compute to enforce mode.
2019-09-05 17:08:35 DEBUG config-changed mkfs.xfs: cannot open /dev/vdb: Device or resource busy
2019-09-05 17:08:35 DEBUG config-changed Traceback (most recent call last):
2019-09-05 17:08:35 DEBUG config-changed File "/var/lib/juju/agents/unit-nova-compute-0/charm/hooks/config-changed", line 751, in <module>
2019-09-05 17:08:35 DEBUG config-changed main()
2019-09-05 17:08:35 DEBUG config-changed File "/var/lib/juju/agents/unit-nova-compute-0/charm/hooks/config-changed", line 744, in main
2019-09-05 17:08:35 DEBUG config-changed hooks.execute(sys.argv)
2019-09-05 17:08:35 DEBUG config-changed File "/var/lib/juju/agents/unit-nova-compute-0/charm/hooks/charmhelpers/core/hookenv.py", line 914, in execute
2019-09-05 17:08:35 DEBUG config-changed self._hooks[hook_name]()
2019-09-05 17:08:35 DEBUG config-changed File "/var/lib/juju/agents/unit-nova-compute-0/charm/hooks/charmhelpers/contrib/openstack/utils.py", line 1560, in wrapped_f
2019-09-05 17:08:35 DEBUG config-changed stopstart, restart_functions)
2019-09-05 17:08:35 DEBUG config-changed File "/var/lib/juju/agents/unit-nova-compute-0/charm/hooks/charmhelpers/core/host.py", line 741, in restart_on_change_helper
2019-09-05 17:08:35 DEBUG config-changed r = lambda_f()
2019-09-05 17:08:35 DEBUG config-changed File "/var/lib/juju/agents/unit-nova-compute-0/charm/hooks/charmhelpers/contrib/openstack/utils.py", line 1559, in <lambda>
2019-09-05 17:08:35 DEBUG config-changed (lambda: f(*args, **kwargs)), __restart_map_cache['cache'],
2019-09-05 17:08:35 DEBUG config-changed File "/var/lib/juju/agents/unit-nova-compute-0/charm/hooks/charmhelpers/contrib/hardening/harden.py", line 93, in _harden_inner2
2019-09-05 17:08:35 DEBUG config-changed return f(*args, **kwargs)
2019-09-05 17:08:35 DEBUG config-changed File "/var/lib/juju/agents/unit-nova-compute-0/charm/hooks/config-changed", line 264, in config_changed
2019-09-05 17:08:35 DEBUG config-changed configure_local_ephemeral_storage()
2019-09-05 17:08:35 DEBUG config-changed File "/var/lib/juju/agents/unit-nova-compute-0/charm/hooks/nova_compute_utils.py", line 1015, in configure_local_ephemeral_storage
2019-09-05 17:08:35 DEBUG config-changed mkfs_xfs(dev, force=True)
2019-09-05 17:08:35 DEBUG config-changed File "/var/lib/juju/agents/unit-nova-compute-0/charm/hooks/charmhelpers/contrib/storage/linux/utils.py", line 128, in mkfs_xfs
2019-09-05 17:08:35 DEBUG config-changed check_call(cmd)
2019-09-05 17:08:35 DEBUG config-changed File "/usr/lib/python3.7/subprocess.py", line 347, in check_call
2019-09-05 17:08:35 DEBUG config-changed raise CalledProcessError(retcode, cmd)
2019-09-05 17:08:35 DEBUG config-ch...

Read more...

Revision history for this message
Ryan Beisner (1chb1n) wrote :

I knew this felt familiar. We've seen something like this in the past, although this is probably a new issue. Still, FYI: https://bugs.launchpad.net/charms/+source/swift-storage/+bug/1513204

Ryan Beisner (1chb1n)
summary: - disco-stein: hook failed: "config-changed" with mkfs.xfs: cannot open
- /dev/vdb: Device or resource busy
+ [disco] mkfs.xfs: cannot open /dev/vdb: Device or resource busy
Ryan Beisner (1chb1n)
summary: - [disco] mkfs.xfs: cannot open /dev/vdb: Device or resource busy
+ [disco] [eoan] After unmount, mkfs.xfs: cannot open /dev/vdb: Device or
+ resource busy
Ryan Beisner (1chb1n)
description: updated
summary: - [disco] [eoan] After unmount, mkfs.xfs: cannot open /dev/vdb: Device or
- resource busy
+ [disco] [eoan] After unmount, cannot open /dev/vdb: Device or resource
+ busy
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Missing required logs.

This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:

apport-collect 1842751

and then change the status of the bug to 'Confirmed'.

If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.

This change has been made by an automated script, maintained by the Ubuntu Kernel Team.

Changed in linux (Ubuntu):
status: New → Incomplete
tags: added: bionic
Revision history for this message
Ryan Beisner (1chb1n) wrote : CurrentDmesg.txt

apport information

tags: added: apport-collected disco ec2-images
description: updated
Revision history for this message
Ryan Beisner (1chb1n) wrote : Lspci.txt

apport information

Revision history for this message
Ryan Beisner (1chb1n) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Ryan Beisner (1chb1n) wrote : ProcCpuinfoMinimal.txt

apport information

Revision history for this message
Ryan Beisner (1chb1n) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Ryan Beisner (1chb1n) wrote : ProcModules.txt

apport information

Revision history for this message
Ryan Beisner (1chb1n) wrote : UdevDb.txt

apport information

Revision history for this message
Ryan Beisner (1chb1n) wrote : WifiSyslog.txt

apport information

Revision history for this message
Camille Rodriguez (camille.rodriguez) wrote :

Similar behaviour documented in this bug for ceph-mon and ceph-osd with disco series. https://bugs.launchpad.net/charm-ceph-mon/+bug/1842498. Might be a duplicate if the underlying cause is the same

Revision history for this message
Ryan Beisner (1chb1n) wrote :

^ Disco apport above, Eoan to follow:

tags: added: eoan
description: updated
Revision history for this message
Ryan Beisner (1chb1n) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Ryan Beisner (1chb1n) wrote : Lspci.txt

apport information

Revision history for this message
Ryan Beisner (1chb1n) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Ryan Beisner (1chb1n) wrote : ProcCpuinfoMinimal.txt

apport information

Revision history for this message
Ryan Beisner (1chb1n) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Ryan Beisner (1chb1n) wrote : ProcModules.txt

apport information

Revision history for this message
Ryan Beisner (1chb1n) wrote : UdevDb.txt

apport information

Revision history for this message
Ryan Beisner (1chb1n) wrote : WifiSyslog.txt

apport information

Revision history for this message
Ryan Beisner (1chb1n) wrote :

And Bionic for grins:

description: updated
Revision history for this message
Ryan Beisner (1chb1n) wrote : CurrentDmesg.txt

apport information

Revision history for this message
Ryan Beisner (1chb1n) wrote : Lspci.txt

apport information

Revision history for this message
Ryan Beisner (1chb1n) wrote : ProcCpuinfo.txt

apport information

Revision history for this message
Ryan Beisner (1chb1n) wrote : ProcCpuinfoMinimal.txt

apport information

Revision history for this message
Ryan Beisner (1chb1n) wrote : ProcInterrupts.txt

apport information

Revision history for this message
Ryan Beisner (1chb1n) wrote : ProcModules.txt

apport information

Revision history for this message
Ryan Beisner (1chb1n) wrote : UdevDb.txt

apport information

Revision history for this message
Ryan Beisner (1chb1n) wrote : WifiSyslog.txt

apport information

Changed in linux (Ubuntu):
status: Incomplete → New
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Tyler Hicks (tyhicks) wrote :

It is useful to note that the attached logs indicate that /dev/vdb2 is a virtio-blk device containing a mounted ext4 filesystem prior to it being unmounted and (attempted to be) reformatted with xfs.

Revision history for this message
Tyler Hicks (tyhicks) wrote :

I was unable to reproduce this in a Disco VM that I manually configured to mount an ext4 virtio-blk device at boot:

$ dmesg | grep vdb
[ 2.352490] virtio_blk virtio4: [vdb] 20971520 512-byte logical blocks (10.7 GB/10.0 GiB)
[ 6.898149] EXT4-fs (vdb): mounted filesystem with ordered data mode. Opts: (null)
tyhicks@sec-disco-amd64:~$ uname -a
Linux sec-disco-amd64 5.0.0-27-generic #28-Ubuntu SMP Tue Aug 20 19:53:07 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
tyhicks@sec-disco-amd64:~$ lsb_release -c
Codename: disco
tyhicks@sec-disco-amd64:~$ sudo umount /mnt
[sudo] password for tyhicks:
tyhicks@sec-disco-amd64:~$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sr0 11:0 1 1024M 0 rom
vda 252:0 0 16G 0 disk
└─vda1 252:1 0 16G 0 part
  ├─vmtools--vg-root 253:0 0 15G 0 lvm /
  └─vmtools--vg-swap_1 253:1 0 980M 0 lvm [SWAP]
vdb 252:16 0 10G 0 disk
tyhicks@sec-disco-amd64:~$ sudo mkfs.xfs -f -i size=1024 /dev/vdb
meta-data=/dev/vdb isize=1024 agcount=4, agsize=655360 blks
         = sectsz=512 attr=2, projid32bit=1
         = crc=1 finobt=1, sparse=0, rmapbt=0, reflink=0
data = bsize=4096 blocks=2621440, imaxpct=25
         = sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0 ftype=1
log =internal log bsize=4096 blocks=2560, version=2
         = sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0

I manually ran those commands after the VM came up. This doesn't really rule anything out but might indicate that the more complex juju/OpenStack environment is needed to reproduce.

Revision history for this message
Tyler Hicks (tyhicks) wrote :

Ryan, did this work on Eoan and Disco at some point in the past or is this the first time that you've tested this workflow on those releases?

Revision history for this message
Ryan Beisner (1chb1n) wrote :

We’ve just dug into this aspect of both Disco and Eoan. Unfortunately, I don’t know if this ever succeeded on these two releases.

Revision history for this message
Tyler Hicks (tyhicks) wrote : Re: [Bug 1842751] Re: [disco] [eoan] After unmount, cannot open /dev/vdb: Device or resource busy

On 2019-09-06 00:15:03, Ryan Beisner wrote:
> We’ve just dug into this aspect of both Disco and Eoan. Unfortunately,
> I don’t know if this ever succeeded on these two releases.

I don't know if you're easily able to test old kernel versions but it
could be helpful to test the kernel that Disco released with. That's
kernel version 5.0.0-13.14.

That kernel would not have this commit:

 https://git.launchpad.net/~ubuntu-kernel/ubuntu/+source/linux/+git/disco/commit/?id=13674c2ebe52da7c30cf27f9800d0624c63deb03

It doesn't look problematic to me but it is a commit shared between
current Disco and Eoan kernels and intersects with the direct I/O
operations that mkfs.xfs does on the block device.

It is a reach but just knowing whether or not the Disco release kernel
is affected would allow us to rule out (or not) any changes landed since
the release.

Changed in charm-cinder:
status: New → Triaged
Changed in charm-nova-compute:
status: New → Triaged
Revision history for this message
Tyler Hicks (tyhicks) wrote :

Hello - Does the recent switch from New -> Triaged for charm-cinder and charm-nova-compute mean that someone was able to determine that the charms are to blame and perhaps not the kernel?

Revision history for this message
Alex Kavanagh (ajkavanagh) wrote :

> Hello - Does the recent switch from New -> Triaged for charm-cinder and charm-nova-compute mean that someone was able to determine that the charms are to blame and perhaps not the kernel?

Sadly not; I'm just knocking them off new; the alternative is incomplete which means they'll time out after 60 days. As it is confirmed in the kernel, it may well be invalid for both charms.

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.