Cleanup of created loop device fails though .qcow2 created suuccessfully from CentOS-7.4

Bug #1898511 reported by hardikkumar hirpara
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
diskimage-builder
New
Undecided
Unassigned

Bug Description

On successful completion of .qcow2 generation, disk image builder should cleanup all created loop devices for that specific process.
After completion of .qcow2 image generation from base image CentOS-7.4, I am getting stale loop devices which are causing issue for new process of ceating .qcow2 using disk-image-builder. Dut to erros like, "umount: /tmp/dib_image.XCmCAY5Z: target is busy" and "mount: could not find any device /dev/loop#Bad address".

Please find below output of commands "lsblk" and "losetup -a" where we can see stale loop devices though we have successful completion of .qcow2 image creation using disk-image-builder:

IS THERE ANY CONFIGURATION/FLAG I AM MISSING AS PART OF DIB SETUP?

lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 500G 0 disk
├─sda1 8:1 0 286M 0 part /boot
└─sda2 8:2 0 499.7G 0 part
  ├─centos_docker--pipeline1-root 253:0 0 481.1G 0 lvm /
  └─centos_docker--pipeline1-swap 253:1 0 18.6G 0 lvm [SWAP]
sr0 11:0 1 1024M 0 rom
sr1 11:1 1 1024M 0 rom
loop0 7:0 0 20G 0 loop
├─loop0p1 253:2 0 512M 0 part
├─loop0p2 253:3 0 2G 0 part
└─loop0p3 253:4 0 17.6G 0 part
loop1 7:1 0 20G 0 loop
├─loop1p1 253:7 0 512M 0 part
├─loop1p2 253:8 0 2G 0 part
└─loop1p3 253:9 0 17.6G 0 part
loop2 7:2 0 20G 0 loop
├─loop2p1 253:5 0 512M 0 part
├─loop2p2 253:6 0 2G 0 part
└─loop2p3 253:10 0 17.6G 0 part

losetup -a
/dev/loop0: [0152]:57696572 (/image0.raw (deleted))
/dev/loop1: [0154]:57450728 (/image0.raw (deleted))
/dev/loop2: [0094]:57896699 (/image0.raw (deleted))

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.