Bug 2121141
Summary: | [libvirt] Kernel does not provide mount namespace | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 9 | Reporter: | mhou <mhou> | |
Component: | libvirt | Assignee: | Michal Privoznik <mprivozn> | |
libvirt sub component: | General | QA Contact: | zhentang <zhetang> | |
Status: | CLOSED ERRATA | Docs Contact: | ||
Severity: | high | |||
Priority: | unspecified | CC: | jdenemar, jsuchane, junzhao, kzhang, lmen, mprivozn, pvlasin, virt-maint, yalzhang | |
Version: | 9.1 | Keywords: | Triaged | |
Target Milestone: | rc | |||
Target Release: | --- | |||
Hardware: | x86_64 | |||
OS: | Linux | |||
Whiteboard: | ||||
Fixed In Version: | libvirt-8.5.0-6.el9 | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 2123371 (view as bug list) | Environment: | ||
Last Closed: | 2022-11-15 10:04:47 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 2091421, 2123371 |
Description
mhou
2022-08-24 15:00:19 UTC
After I interrupt the reproduce.sh and manually run virt-copy-in command. The output as below: # LIBGUESTFS_DEBUG=1 LIBGUESTFS_TRACE=1 LIBGUESTFS_BACKEND=direct virt-copy-in -a /home/guest30032.qcow2 /home/21.11-1/ /tmp libguestfs: trace: set_verbose true libguestfs: trace: set_verbose = 0 libguestfs: trace: set_backend "direct" libguestfs: trace: set_backend = 0 libguestfs: create: flags = 0, handle = 0x5611cc7c0200, program = virt-copy-in libguestfs: trace: set_pgroup true libguestfs: trace: set_pgroup = 0 libguestfs: trace: add_drive "/home/guest30032.qcow2" libguestfs: trace: add_drive = 0 libguestfs: trace: is_config libguestfs: trace: is_config = 1 libguestfs: trace: launch libguestfs: trace: max_disks libguestfs: trace: max_disks = 255 libguestfs: trace: get_tmpdir libguestfs: trace: get_tmpdir = "/tmp" libguestfs: trace: version libguestfs: trace: version = <struct guestfs_version = major: 1, minor: 48, release: 4, extra: rhel=9,release=2.el9,libvirt, > libguestfs: trace: get_backend libguestfs: trace: get_backend = "direct" libguestfs: launch: program=virt-copy-in libguestfs: launch: version=1.48.4rhel=9,release=2.el9,libvirt libguestfs: launch: backend registered: direct libguestfs: launch: backend registered: libvirt libguestfs: launch: backend=direct libguestfs: launch: tmpdir=/tmp/libguestfsxE56Xb libguestfs: launch: umask=0022 libguestfs: launch: euid=0 libguestfs: trace: get_cachedir libguestfs: trace: get_cachedir = "/var/tmp" libguestfs: begin building supermin appliance libguestfs: run supermin libguestfs: command: run: /usr/bin/supermin libguestfs: command: run: \ --build libguestfs: command: run: \ --verbose libguestfs: command: run: \ --if-newer libguestfs: command: run: \ --lock /var/tmp/.guestfs-0/lock libguestfs: command: run: \ --copy-kernel libguestfs: command: run: \ -f ext2 libguestfs: command: run: \ --host-cpu x86_64 libguestfs: command: run: \ /usr/lib64/guestfs/supermin.d libguestfs: command: run: \ -o /var/tmp/.guestfs-0/appliance.d supermin: version: 5.2.1 supermin: rpm: detected RPM version 4.16 supermin: rpm: detected RPM architecture x86_64 supermin: package handler: fedora/rpm supermin: acquiring lock on /var/tmp/.guestfs-0/lock supermin: if-newer: output does not need rebuilding libguestfs: finished building supermin appliance libguestfs: begin testing qemu features libguestfs: trace: get_cachedir libguestfs: trace: get_cachedir = "/var/tmp" libguestfs: checking for previously cached test results of /usr/libexec/qemu-kvm, in /var/tmp/.guestfs-0 libguestfs: loading previously cached test results libguestfs: qemu version: 7.0 libguestfs: qemu mandatory locking: yes libguestfs: qemu KVM: enabled libguestfs: trace: get_backend_setting "force_tcg" libguestfs: trace: get_backend_setting = NULL (error) libguestfs: trace: get_backend_setting "force_kvm" libguestfs: trace: get_backend_setting = NULL (error) libguestfs: trace: get_sockdir libguestfs: trace: get_sockdir = "/tmp" libguestfs: finished testing qemu features libguestfs: trace: get_backend_setting "gdb" libguestfs: trace: get_backend_setting = NULL (error) /usr/libexec/qemu-kvm \ -global virtio-blk-pci.scsi=off \ -no-user-config \ -nodefaults \ -display none \ -machine accel=kvm:tcg,graphics=off \ -cpu max,la57=off \ -m 1280 \ -no-reboot \ -rtc driftfix=slew \ -no-hpet \ -global kvm-pit.lost_tick_policy=discard \ -kernel /var/tmp/.guestfs-0/appliance.d/kernel \ -initrd /var/tmp/.guestfs-0/appliance.d/initrd \ -object rng-random,filename=/dev/urandom,id=rng0 \ -device virtio-rng-pci,rng=rng0 \ -device virtio-scsi-pci,id=scsi \ -drive file=/home/guest30032.qcow2,cache=writeback,id=hd0,if=none \ -device scsi-hd,drive=hd0 \ -drive file=/var/tmp/.guestfs-0/appliance.d/root,snapshot=on,id=appliance,cache=unsafe,if=none \ -device scsi-hd,drive=appliance \ -device virtio-serial-pci \ -serial stdio \ -chardev socket,path=/tmp/libguestfsIkdFu1/guestfsd.sock,id=channel0 \ -device virtserialport,chardev=channel0,name=org.libguestfs.channel.0 \ -append "panic=1 console=ttyS0 edd=off udevtimeout=6000 udev.event-timeout=6000 no_timer_check printk.time=1 cgroup_disable=memory usbcore.nousb cryptomgr.notests tsc=reliable 8250.nr_uarts=1 root=UUID=b2f57284-8b7d-44a9-9140-b74131f8061c selinux=0 guestfs_verbose=1 TERM=xterm" qemu-kvm: -drive file=/home/guest30032.qcow2,cache=writeback,id=hd0,if=none: Failed to get "write" lock Is another process using the image [/home/guest30032.qcow2]? libguestfs: error: appliance closed the connection unexpectedly, see earlier error messages libguestfs: child_cleanup: 0x5611cc7c0200: child process died libguestfs: sending SIGTERM to process 4987 libguestfs: error: /usr/libexec/qemu-kvm exited with error status 1, see debug messages above libguestfs: error: guestfs_launch failed, see earlier error messages libguestfs: trace: launch = -1 (error) libguestfs: trace: close libguestfs: closing guestfs handle 0x5611cc7c0200 (state 0) libguestfs: command: run: rm libguestfs: command: run: \ -rf /tmp/libguestfsxE56Xb libguestfs: command: run: rm libguestfs: command: run: \ -rf /tmp/libguestfsIkdFu1 Michal, please have a look. Thanks. I think I know what the problem is. It's fixed by this upstream commit: https://gitlab.com/libvirt/libvirt/-/commit/589536e75d2af745c8f27134b466b23e4fbe3e95 In fact, I've made a scratch build with that commit backported. mhou, can you give it a try please? https://kojihub.stream.rdu2.redhat.com/koji/taskinfo?taskID=1415940 Test on libvirt-8.5.0-6.el9_rc.cbdf36bb5e.x86_64, can't hit this issue again. # cat test.sh #! /bin/bash set -x ssh_guest30032() { sshpass -p redhat ssh -X -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root.122.123 "$@" } for i in $(seq 1 10); do echo "====================start ${i} test============================" LIBGUESTFS_DEBUG=1 LIBGUESTFS_TRACE=1 LIBGUESTFS_BACKEND=direct virt-copy-in -a /root/guest30032.qcow2 /root/test/ /tmp virsh create g1.xml virsh reboot guest30032 TIMEOUT=120; while ! ssh_guest30032 "dracut -f" 2>/dev/null && ((--TIMEOUT)); do sleep 1; done virsh reboot guest30032 virsh destroy guest30032 echo "====================finish ${i} test===========================" done # systemctl status virtqemud --no-pager -l ● virtqemud.service - Virtualization qemu daemon Loaded: loaded (/usr/lib/systemd/system/virtqemud.service; enabled; vendor preset: enabled) Active: active (running) since Thu 2022-08-25 04:48:40 EDT; 8min ago TriggeredBy: ● virtqemud.socket ● virtqemud-admin.socket ● virtqemud-ro.socket Docs: man:virtqemud(8) https://libvirt.org Main PID: 126146 (virtqemud) Tasks: 19 (limit: 32768) Memory: 16.5M CPU: 1.265s CGroup: /system.slice/virtqemud.service └─126146 /usr/sbin/virtqemud --timeout 120 Aug 25 04:50:40 dell-per740-60.rhts.eng.pek2.redhat.com virtqemud[126146]: Domain id=2 name='guest30032' uuid=37425e76-af6a-44a6-aba0-73434afe34c0 is tainted: deprecated-config (machine type 'pc-q35-rhel8.6.0') Aug 25 04:51:52 dell-per740-60.rhts.eng.pek2.redhat.com virtqemud[126146]: Domain id=3 name='guest30032' uuid=37425e76-af6a-44a6-aba0-73434afe34c0 is tainted: deprecated-config (machine type 'pc-q35-rhel8.6.0') Aug 25 04:52:27 dell-per740-60.rhts.eng.pek2.redhat.com virtqemud[126146]: Domain id=4 name='guest30032' uuid=37425e76-af6a-44a6-aba0-73434afe34c0 is tainted: deprecated-config (machine type 'pc-q35-rhel8.6.0') Aug 25 04:53:01 dell-per740-60.rhts.eng.pek2.redhat.com virtqemud[126146]: Domain id=5 name='guest30032' uuid=37425e76-af6a-44a6-aba0-73434afe34c0 is tainted: deprecated-config (machine type 'pc-q35-rhel8.6.0') Aug 25 04:53:36 dell-per740-60.rhts.eng.pek2.redhat.com virtqemud[126146]: Domain id=6 name='guest30032' uuid=37425e76-af6a-44a6-aba0-73434afe34c0 is tainted: deprecated-config (machine type 'pc-q35-rhel8.6.0') Aug 25 04:54:08 dell-per740-60.rhts.eng.pek2.redhat.com virtqemud[126146]: Domain id=7 name='guest30032' uuid=37425e76-af6a-44a6-aba0-73434afe34c0 is tainted: deprecated-config (machine type 'pc-q35-rhel8.6.0') Aug 25 04:54:43 dell-per740-60.rhts.eng.pek2.redhat.com virtqemud[126146]: Domain id=8 name='guest30032' uuid=37425e76-af6a-44a6-aba0-73434afe34c0 is tainted: deprecated-config (machine type 'pc-q35-rhel8.6.0') Aug 25 04:55:17 dell-per740-60.rhts.eng.pek2.redhat.com virtqemud[126146]: Domain id=9 name='guest30032' uuid=37425e76-af6a-44a6-aba0-73434afe34c0 is tainted: deprecated-config (machine type 'pc-q35-rhel8.6.0') Aug 25 04:55:50 dell-per740-60.rhts.eng.pek2.redhat.com virtqemud[126146]: Domain id=10 name='guest30032' uuid=37425e76-af6a-44a6-aba0-73434afe34c0 is tainted: deprecated-config (machine type 'pc-q35-rhel8.6.0') Aug 25 04:56:25 dell-per740-60.rhts.eng.pek2.redhat.com virtqemud[126146]: Domain id=11 name='guest30032' uuid=37425e76-af6a-44a6-aba0-73434afe34c0 is tainted: deprecated-config (machine type 'pc-q35-rhel8.6.0') *** Bug 2109460 has been marked as a duplicate of this bug. *** tested on libvirt-8.5.0-6.el9 not hit this issue again # vi bugtest.sh #! /bin/bash set -x ssh_rhel9-vnc() { sshpass -p redhat ssh -X -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no root.116.105 "$@" } for i in $(seq 1 10); do echo "====================start ${i} test============================" LIBGUESTFS_DEBUG=1 LIBGUESTFS_TRACE=1 LIBGUESTFS_BACKEND=direct virt-copy-in -a /var/lib/libvirt/images/nfs/RHEL-9.1.0-20220830.1-x86_64.qcow2 /root/test/ /tmp virsh start rhel9-vnc virsh reboot rhel9-vnc TIMEOUT=120; while ! ssh_rhel9-vnc "dracut -f" 2>/dev/null && ((--TIMEOUT)); do sleep 1; done virsh reboot rhel9-vnc virsh destroy rhel9-vnc echo "====================finish ${i} test===========================" done # systemctl status virtqemud ● virtqemud.service - Virtualization qemu daemon Loaded: loaded (/usr/lib/systemd/system/virtqemud.service; enabled; vendor preset: enabled) Active: active (running) since Mon 2022-09-05 22:30:05 EDT; 6h ago TriggeredBy: ● virtqemud-ro.socket ● virtqemud-admin.socket ● virtqemud.socket Docs: man:virtqemud(8) https://libvirt.org Main PID: 784226 (virtqemud) Tasks: 22 (limit: 32768) Memory: 20.4M CPU: 2.877s CGroup: /system.slice/virtqemud.service └─784226 /usr/sbin/virtqemud --timeout 120 Sep 05 22:30:05 zhetang-rhel9 systemd[1]: Starting Virtualization qemu daemon... Sep 05 22:30:05 zhetang-rhel9 systemd[1]: Started Virtualization qemu daemon. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Low: libvirt security, bug fix, and enhancement update), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2022:8003 |