New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
losetup --find
reports a lost loop device even in a container
#2824
Comments
The file /dev/loop-control is optional, and if it's not available, then it scans for /dev/loopN files. It seems that it was able to get /dev/loop0, but later it disappeared, so it's reported as lost.
Not sure why do you see the problem (maybe more tests running in parallel, udevadm settle is good friend).
|
Ah, interesting, thank you. I think the reason here why this happens is that I have (or had)
So I guess the test needs to be updated on our side, to not use |
Maybe losetup should be more competent when testing if the device is used. Now (in your case) it checks for "offset" (sysfs file loop/offset, the file is missing so it assumes the device is unused). Maybe when it scans for the devices in sysfs it should also check for the device lost and ignore such devices. |
losetup in util-linux 2.40 started reporting lost loop devices [0] and it has an unfortunate side-effect where it reports lost devices even in containers, which then makes the loop device check "falsely" pass [1]. Let's just check for /dev/loop-control explicitly to "work around" this. [0] util-linux/util-linux@a6ca045 [1] util-linux/util-linux#2824
losetup in util-linux 2.40 started reporting lost loop devices [0] and it has an unfortunate side-effect where it reports lost devices even in containers, which then makes the loop device check "falsely" pass [1]. Let's just check for /dev/loop-control explicitly to "work around" this. [0] util-linux/util-linux@a6ca045 [1] util-linux/util-linux#2824
losetup in util-linux 2.40 started reporting lost loop devices [0] and it has an unfortunate side-effect where it reports lost devices even in containers, which then makes the loop device check "falsely" pass [1]. Let's just check for /dev/loop-control explicitly to "work around" this. [0] util-linux/util-linux@a6ca045 [1] util-linux/util-linux#2824 (cherry picked from commit 0348b50)
losetup in util-linux 2.40 started reporting lost loop devices [0] and it has an unfortunate side-effect where it reports lost devices even in containers, which then makes the loop device check "falsely" pass [1]. Let's just check for /dev/loop-control explicitly to "work around" this. [0] util-linux/util-linux@a6ca045 [1] util-linux/util-linux#2824 (cherry picked from commit 0348b50)
losetup in util-linux 2.40 started reporting lost loop devices [0] and it has an unfortunate side-effect where it reports lost devices even in containers, which then makes the loop device check "falsely" pass [1]. Let's just check for /dev/loop-control explicitly to "work around" this. [0] util-linux/util-linux@a6ca045 [1] util-linux/util-linux#2824 (cherry picked from commit 0348b50) (cherry picked from commit 5ab85d7)
losetup in util-linux 2.40 started reporting lost loop devices [0] and it has an unfortunate side-effect where it reports lost devices even in containers, which then makes the loop device check "falsely" pass [1]. Let's just check for /dev/loop-control explicitly to "work around" this. [0] util-linux/util-linux@a6ca045 [1] util-linux/util-linux#2824 (cherry picked from commit 0348b50) (cherry picked from commit 5ab85d7)
losetup in util-linux 2.40 started reporting lost loop devices [0] and it has an unfortunate side-effect where it reports lost devices even in containers, which then makes the loop device check "falsely" pass [1]. Let's just check for /dev/loop-control explicitly to "work around" this. [0] util-linux/util-linux@a6ca045 [1] util-linux/util-linux#2824 (cherry picked from commit 0348b50) (cherry picked from commit 5ab85d7)
losetup in util-linux 2.40 started reporting lost loop devices [0] and it has an unfortunate side-effect where it reports lost devices even in containers, which then makes the loop device check "falsely" pass [1]. Let's just check for /dev/loop-control explicitly to "work around" this. [0] util-linux/util-linux@a6ca045 [1] util-linux/util-linux#2824 (cherry picked from commit 0348b50) (cherry picked from commit 5ab85d7) (cherry picked from commit c960f9a)
losetup in util-linux 2.40 started reporting lost loop devices [0] and it has an unfortunate side-effect where it reports lost devices even in containers, which then makes the loop device check "falsely" pass [1]. Let's just check for /dev/loop-control explicitly to "work around" this. [0] util-linux/util-linux@a6ca045 [1] util-linux/util-linux#2824 (cherry picked from commit 0348b50) (cherry picked from commit 5ab85d7) (cherry picked from commit c960f9a)
losetup in util-linux 2.40 started reporting lost loop devices [0] and it has an unfortunate side-effect where it reports lost devices even in containers, which then makes the loop device check "falsely" pass [1]. Let's just check for /dev/loop-control explicitly to "work around" this. [0] util-linux/util-linux@a6ca045 [1] util-linux/util-linux#2824 (cherry picked from commit 0348b50) (cherry picked from commit 5ab85d7) (cherry picked from commit c960f9a) (cherry picked from commit 686eb93)
losetup in util-linux 2.40 started reporting lost loop devices [0] and it has an unfortunate side-effect where it reports lost devices even in containers, which then makes the loop device check "falsely" pass [1]. Let's just check for /dev/loop-control explicitly to "work around" this. [0] util-linux/util-linux@a6ca045 [1] util-linux/util-linux#2824 (cherry picked from commit 0348b50) (cherry picked from commit 5ab85d7) (cherry picked from commit c960f9a) (cherry picked from commit 686eb93)
While trying to upgrade a Fedora Rawhide job in our upstream systemd CI I noticed one strange test fail. This test uses
losetup --find
to check if loop devices are available (which is admittedly not ideal), and since a6ca045 and 556dac8 this reports a lost loop device even in a container without access to loop devices:Is this expected?
Reproducible with both
util-linux-2.40-0.11.rc1.fc41.x86_64
and latest master.The text was updated successfully, but these errors were encountered: