Bug 922683

Summary: Guest with iso fail to migrate when the iso's domain is inactived
Product: Red Hat Enterprise Linux 6 Reporter: Luwen Su <lsu>
Component: libvirtAssignee: Jiri Denemark <jdenemar>
Status: CLOSED DUPLICATE QA Contact: Virtualization Bugs <virt-bugs>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 6.4CC: acathrow, cpelland, dyasny, dyuan, jdenemar, mjenner, mzhan, rwu, whuang, zhwang
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-03-18 14:54:09 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:
Attachments:
Description Flags
vdsm guest xml when start none

Comment 1 zhenfeng wang 2013-03-18 10:29:55 UTC
This issue also hit the nfs storage
Version-Release number of selected component (if applicable):
# rpm -q libvirt qemu-kvm-rhev kernel vdsm
libvirt-0.10.2-18.el6_4.1.x86_64
qemu-kvm-rhev-0.12.1.2-2.355.el6_4.2.x86_64
kernel-2.6.32-358.2.1.el6.x86_64
vdsm-4.10.2-1.8.el6ev.x86_64

Traceback (most recent call last):
  File "/usr/share/vdsm/vm.py", line 642, in _startUnderlyingVm
    self._run()
  File "/usr/share/vdsm/libvirtvm.py", line 1472, in _run
    self._connection.createXML(domxml, flags),
  File "/usr/lib64/python2.6/site-packages/vdsm/libvirtconnection.py", line 83, in wrapper
    ret = f(*args, **kwargs)
  File "/usr/lib64/python2.6/site-packages/libvirt.py", line 2645, in createXML
    if ret is None:raise libvirtError('virDomainCreateXML() failed', conn=self)
libvirtError: cannot open file '/rhev/data-center/2f8962a5-bf85-4ca7-9644-3061e80ea52c/71ff25bc-7fe6-4aa3-a36d-8b76debb4dd6/images/11111111-1111-1111-1111-111111111111/en_windows_xp_professional_with_service_pack_3_x86_cd_x14-80428.iso': No such file or directory
Thread-11227::DEBUG::2013-03-18 05:10:14,708::vm::1027::vm.Vm::(setDownStatus) vmId=`8796ae4c-dd7d-43c1-ba2b-8ef00f960fa4`::Changed state to Down: cannot open file '/rhev/data-center/2f8962a5-bf85-4ca7-9644-3061e80ea52c/71ff25bc-7fe6-4aa3-a36d-8b76debb4dd6/images/11111111-1111-1111-1111-111111111111/en_windows_xp_professional_with_service_pack_3_x86_cd_x14-80428.iso': No such file or directory
VM Channels Listener::DEBUG::2013-03-18 05:10:14,906::vmChannels::103::vds::(_handle_unconnected) Trying to connect fileno 21.

Comment 2 Jiri Denemark 2013-03-18 11:06:51 UTC
Could you attach the domain XML used by vdsm when starting the domain?

Comment 3 Huang Wenlong 2013-03-18 11:18:53 UTC
Created attachment 711887 [details]
vdsm guest xml when start

Hi, Jiri 

I have a guest ,it also can reproduce this issue 
I attach it xml for you

Comment 6 Jiri Denemark 2013-03-18 12:50:27 UTC
The regression is caused by

commit 82d5fe543720da6d83c1d6bfa1c347d7d9fda278
Author: Eric Blake <eblake>
Date:   Wed Feb 20 15:34:48 2013 -0700

    qemu: check backing chains even when cgroup is omitted
    
    https://bugzilla.redhat.com/show_bug.cgi?id=896685 points out
    a regression caused by commit 38c4a9c - libvirt only labels
    the backing chain if the backing chain cache is populated, but
    the code to populate the cache was only conditionally performed
    if cgroup labeling was necessary.
    
    * src/qemu/qemu_cgroup.c (qemuSetupCgroup): Hoist cache setup...
    * src/qemu/qemu_process.c (qemuProcessStart): ...earlier into
    caller, where it is now unconditional.

Comment 7 Jiri Denemark 2013-03-18 13:19:24 UTC
Fix proposed upstream: https://www.redhat.com/archives/libvir-list/2013-March/msg01018.html

Comment 8 Jiri Denemark 2013-03-18 13:37:15 UTC
Fixed upstream by v1.0.3-88-gef3cd64:

commit ef3cd6473f5227fcc89ac4fd1fc4f8485ffae314
Author: Jiri Denemark <jdenemar>
Date:   Mon Mar 18 14:11:58 2013 +0100

    qemu: Fix startupPolicy regression
    
    Commit 82d5fe543720da6d83c1d6bfa1c347d7d9fda278
    
        qemu: check backing chains even when cgroup is omitted
    
    added backing file checks just before the code that removes optional
    disks if they are not present. However, the backing chain code fails in
    case the disk file does not exist, which makes qemuProcessStart fail
    regardless on configured startupPolicy.
    
    Note that startupPolicy implementation is still wrong after this patch
    since it only check the first file in a possible chain. It should rather
    check the complete backing chain. But this is an existing limitation
    that can be solved later. After all, startupPolicy is most useful for
    CDROM images and they won't make use of backing files in most cases.

Comment 9 Jiri Denemark 2013-03-18 14:54:09 UTC
Actually, after thinking about this more and consulting with Jiri Pallich, it makes more sense to fix this regression in the context of the original BZ that pulls in patches which cause the regression. Thus, I'm closing this bug as a duplicate of the original bug 896013 and I'll make sure the fix is also pulled in for the z-stream clone.

*** This bug has been marked as a duplicate of bug 896013 ***