RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 725673 - do not fail migration if destination does not see ejected cdrom
Summary: do not fail migration if destination does not see ejected cdrom
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt
Version: 6.2
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: rc
: ---
Assignee: Michal Privoznik
QA Contact: Virtualization Bugs
URL:
Whiteboard:
: 739388 (view as bug list)
Depends On: 723270
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-07-26 09:06 UTC by Dan Kenigsberg
Modified: 2011-12-06 11:17 UTC (History)
9 users (show)

Fixed In Version: libvirt-0.9.4-14.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-12-06 11:17:46 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1513 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2011-12-06 01:23:30 UTC

Description Dan Kenigsberg 2011-07-26 09:06:51 UTC
If the guest ejected the cdrom tray, migrating the domain should not fail if the destination does not see the cdrom media.

Comment 1 Osier Yang 2011-07-27 06:36:32 UTC
This is the same request as https://bugzilla.redhat.com/show_bug.cgi?id=575160, libvirt still has no way to known wether the medium is ejected or not in the guest, so can not decide wether to do cgroup setting on the cdrom image or not, or something others can also triger the failure. 

qemu have not implemented the event yet.

See the qemu bugs:

https://bugzilla.redhat.com/show_bug.cgi?id=723270
https://bugzilla.redhat.com/show_bug.cgi?id=575159

Comment 2 Dave Allan 2011-07-27 12:58:45 UTC
(In reply to comment #1)
> This is the same request as https://bugzilla.redhat.com/show_bug.cgi?id=575160,

Not exactly.

> libvirt still has no way to known wether the medium is ejected or not in the
> guest, so can not decide wether to do cgroup setting on the cdrom image or not,
> or something others can also triger the failure. 

It could query the block device prior to migration.  I wonder if there is a race, however, between starting migration and the guest ejecting the disk.

> See the qemu bugs:
> 
> https://bugzilla.redhat.com/show_bug.cgi?id=723270

I believe this would work for us.

Comment 3 Osier Yang 2011-07-28 02:35:13 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > This is the same request as https://bugzilla.redhat.com/show_bug.cgi?id=575160,
> 
> Not exactly.
> 
> > libvirt still has no way to known wether the medium is ejected or not in the
> > guest, so can not decide wether to do cgroup setting on the cdrom image or not,
> > or something others can also triger the failure. 
> 
> It could query the block device prior to migration. 

As far as I understand, qemu monitor command such as "info block" can't get if the cd is ejected or not currently, the patches is posted to upstream, but not commited yet. See 723270.

> I wonder if there is a
> race, however, between starting migration and the guest ejecting the disk.
> 

Hmm, seems no one considered this before, this might be a problem if qemu just changes the output of "info block", but no event throwed back. 

> > See the qemu bugs:
> > 
> > https://bugzilla.redhat.com/show_bug.cgi?id=723270
> 
> I believe this would work for us.

Comment 4 Osier Yang 2011-07-29 05:43:38 UTC
(In reply to comment #3)
> (In reply to comment #2)
> > (In reply to comment #1)
> > > This is the same request as https://bugzilla.redhat.com/show_bug.cgi?id=575160,
> > 
> > Not exactly.
> > 
> > > libvirt still has no way to known wether the medium is ejected or not in the
> > > guest, so can not decide wether to do cgroup setting on the cdrom image or not,
> > > or something others can also triger the failure. 
> > 
> > It could query the block device prior to migration. 
> 
> As far as I understand, qemu monitor command such as "info block" can't get if
> the cd is ejected or not currently, the patches is posted to upstream, but not
> commited yet. See 723270.
> 

I tried to look up the cdrom disk's status after ejected it *inside* guest. The disk path is still there after ejected.

(QEMU) query-block
{u'return': [{u'device': u'drive-ide0-0-0', u'inserted': {u'encrypted': False, u'ro': False, u'file': u'/var/lib/libvirt/images/virtlab_test', u'drv': u'raw'}, u'locked': False, u'removable': False, u'type': u'hd'}, {u'device': u'drive-ide0-1-0', u'inserted': {u'encrypted': False, u'ro': True, u'file': u'/var/lib/libvirt/images/test.iso', u'drv': u'raw'}, u'locked': False, u'removable': True, u'type': u'cdrom'}]}

Comment 5 Ayal Baron 2011-07-29 06:35:30 UTC
Making this bug dependent on 723270 (qemu exposing this info in "info block")

Comment 6 Dan Kenigsberg 2011-07-29 07:55:59 UTC
Hmmm, it is most important to not fail domain restore, too, if cdrom is not visible (I'd say that it even does not need to be ejected. Any removable media should be able to magically disappear after the domain was save for a month or two).

Comment 7 Dave Allan 2011-08-11 01:33:42 UTC
(In reply to comment #6)
> Hmmm, it is most important to not fail domain restore, too, if cdrom is not
> visible (I'd say that it even does not need to be ejected. Any removable media
> should be able to magically disappear after the domain was save for a month or
> two).

Agreed regarding domain restore, but I don't think we should force eject media if the guest has not ejected it; that's likely to cause great difficulties for any processes in the guest that have the media open.

Comment 10 Michal Privoznik 2011-09-13 16:20:57 UTC
Patch sent upstream:

https://www.redhat.com/archives/libvir-list/2011-September/msg00465.html

Comment 12 Dan Kenigsberg 2011-09-18 15:59:35 UTC
*** Bug 739388 has been marked as a duplicate of this bug. ***

Comment 16 weizhang 2011-09-29 08:56:31 UTC
This bug depends on qemu-kvm bug 723270, so we will verify this bug after qemu-kvm bug verified.

Comment 17 weizhang 2011-10-19 05:30:21 UTC
verify pass on
qemu-kvm-0.12.1.2-2.199.el6.x86_64
kernel-2.6.32-207.el6.x86_64
libvirt-0.9.4-19.el6.x86_64


Steps:
1. start a guest with ide cdrom which connects 1 local iso file on it(not in nfs dir).
2. on guest, do 
# eject /dev/cdrom
3. do migration
# virsh migrate --live guest qemu+ssh://{target ip}/system

migration succeeds with no error
on target host, the guest's ide cdrom exists without iso file connected

Comment 18 errata-xmlrpc 2011-12-06 11:17:46 UTC
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, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2011-1513.html


Note You need to log in before you can comment on or make changes to this bug.