[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#800845: autopkgtest: Add support for nested VMs



On 03/09/2016 09:29 AM, Martin Pitt wrote:
> Martin Pitt [2016-03-09  8:52 +0100]:
>>> I get (w/ qemu-system 1:2.5+dfsg-4~bpo8+1) with current git master
>>> (no changes):
>>> mount: /dev/vdb1 is write-protected, mounting read-only
>>>
>>> So I can't really reproduce it. :-(
>>
>> I now get the same. I must have wrecked something on Monday, I figure.
> 
> I'm not hallucinating after all. I just tried this again:
> 
>   ./run-from-checkout tests/testpkg-simple/ --shell --- qemu adt-xenial-amd64-cloud.img
> 
> Then ssh'ed in, and ran
> 
>   sudo apt-get install -y kpartx
>   sudo kpartx -av /dev/baseimage
>   sudo mount /dev/mapper/baseimage1 /mnt
>   (no "readonly" warning here)
>   sudo touch /mnt/foo
>   (succeeded!)
>   ls -l /mnt/foo
>   -rw-r--r-- 1 root root 0 Mar  9 08:22 /mnt/foo

Well, this appears to be a bug in kpartx that it does not recognize
that /dev/baseimage is write-protected and thus the dm device is not
marked as write-protected.

If I don't ssh in but connect via minicom, I also see kernel logs,
and I get:

root at autopkgtest:~# mount /dev/mapper/baseimage1 /mnt                                                                                                                                                                                                      
[   76.106053] blk_update_request: I/O error, dev vdb, sector 2048
[   76.108045] blk_update_request: I/O error, dev vdb, sector 2048
[   76.109563] Buffer I/O error on dev dm-0, logical block 0, lost sync page write
root at autopkgtest:~# [   77.609597] blk_update_request: I/O error, dev vdb, sector 4728283
[   77.612648] blk_update_request: I/O error, dev vdb, sector 4728538
[   77.614416] blk_update_request: I/O error, dev vdb, sector 4728793
[   77.616187] blk_update_request: I/O error, dev vdb, sector 4720864
[   77.617945] blk_update_request: I/O error, dev vdb, sector 4721119
[   77.619711] blk_update_request: I/O error, dev vdb, sector 4721374
[   77.621469] blk_update_request: I/O error, dev vdb, sector 4721629
[   77.623222] blk_update_request: I/O error, dev vdb, sector 4721884
[   83.028309] blk_update_request: I/O error, dev vdb, sector 2099200
[   83.029042] Buffer I/O error on dev dm-0, logical block 262144, lost sync page write
[   83.029942] JBD2: Error -5 detected when updating journal superblock for dm-0-8.
[   83.030781] Aborting journal on device dm-0-8.
[   83.031350] blk_update_request: I/O error, dev vdb, sector 2099200
[   83.032128] blk_update_request: I/O error, dev vdb, sector 2099200
[   83.032832] Buffer I/O error on dev dm-0, logical block 262144, lost sync page write
[   83.033726] JBD2: Error -5 detected when updating journal superblock for dm-0-8.
sudo touch /mnt/foo
[   88.035532] EXT4-fs (dm-0): previous I/O error to superblock detected
[   88.037457] blk_update_request: I/O error, dev vdb, sector 2048
[   88.039019] blk_update_request: I/O error, dev vdb, sector 2048
[   88.040554] Buffer I/O error on dev dm-0, logical block 0, lost sync page write
[   88.043134] EXT4-fs error (device dm-0): ext4_journal_check_start:56: Detected aborted journal
[   88.045469] EXT4-fs (dm-0): Remounting filesystem read-only
[   88.046897] EXT4-fs (dm-0): previous I/O error to superblock detected
[   88.048745] blk_update_request: I/O error, dev vdb, sector 2048
[   88.050147] blk_update_request: I/O error, dev vdb, sector 2048
[   88.051528] Buffer I/O error on dev dm-0, logical block 0, lost sync page write
touch: cannot touch '/mnt/foo': Read-only file system

(The read-only remount is due to errors=remount-ro being the default
option and me waiting a bit before trying the touch; I can also touch
/mnt/foo if I'm quick enough.)

If I try to mount just /dev/vdb1 (instead of a kpartx mapping), I get
the same message as I already posted, even with a xenial image.

I just searched a bit and found this:
https://www.redhat.com/archives/dm-devel/2013-October/msg00086.html

So it does appear to be a bug in kpartx.

> However, "foo" does not actually appear on the underlying image, so
> maybe it's sometimes using the overlay or something.

No, you just probably ssh'd in and didn't see the I/O errors in the
kernel log. ;-)

So this is completely harmless.

Regards,
Christian

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/autopkgtest-devel/attachments/20160309/e478667e/attachment.sig>


Reply to: