Bug 1347164

Summary: The iso image can't be unmounted successfully when deactive the iso item in change cd menu
Product: Red Hat Enterprise Linux 7 Reporter: Xiaodai Wang <xiaodwan>
Component: libgovirtAssignee: Eduardo Lima (Etrunko) <elima>
Status: CLOSED DUPLICATE QA Contact: SPICE QE bug list <spice-qe-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.3CC: astepano, dblechte, elima, juzhou, mxie, mzhan, tpelka, tzheng
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: virt-viewer-5.0-1.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-03-29 16:35:00 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
virt-viewer log for rhel guest none

Description Xiaodai Wang 2016-06-16 08:13:31 UTC
Description of problem:
The iso image can't be unmounted successfully when deactive the iso in change cd menu

Version-Release number of selected component (if applicable):
libgovirt-0.3.3-3.el7.x86_64
virt-viewer-2.0-8.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Make sure there is an ISO domain in RHEVM server and there are several iso files in the domain.
2. Get the ca file from ovirt server.
$ wget http://rhevm3.6-hp-dl360eg8-03/ca.crt
3. Connect a vm by remote-viewer with ovirt uri or connect to it by console.vv file.
$ remote-viewer --ovirt-ca-file=ca.crt ovirt://rhevm3.6-hp-dl360eg8-03/$your_vm
or 
$ remote-viewer console.vv
4. Type correct username and password and click OK if you run with ovirt uri.
5. After connecting to the guest and foreign menu displays, select one iso image in "change cd" menu, and this iso image can be mounted successfully.
6. Deactive the same iso image in "change cd" menu.

Actual results:
The iso image is not unmounted from guest.

Expected results:
The iso should be unmounted after deactive the iso menu item.

Additional info:

Comment 5 Xiaodai Wang 2017-03-29 02:49:31 UTC
I tried with below packages, the cd-rom still cannot be ejected in rhel guest. but works well in windows guest(win7, win2008r2).

virt-viewer-5.0-2.el7.x86_64
libgovirt-0.3.3-5.el7.x86_64
Red Hat Virtualization Manager Version: 4.1.1.2-0.1.el7

Comment 6 Xiaodai Wang 2017-03-29 02:50:03 UTC
Created attachment 1267221 [details]
virt-viewer log for rhel guest

Comment 7 Eduardo Lima (Etrunko) 2017-03-29 12:53:24 UTC
(In reply to xiaodwan from comment #6)
> Created attachment 1267221 [details]
> virt-viewer log for rhel guest

So, according to the logs, the ISO image is successfully attached (line 1986):

(remote-viewer:13763): virt-viewer-DEBUG: Finished updating cdrom content: SLE-12-Server-DVD-x86_64-GM-DVD1.iso

After that you remove the image and it also succeeds (line 2297):

(remote-viewer:13763): virt-viewer-DEBUG: Finished updating cdrom content: (null)

So, libgovirt is not the one to blame here. This is something between oVirt and the guest system. Maybe the ovirt agent? I kind of remember something similar reported a while ago, not sure though.

Comment 8 Andrei Stepanov 2017-03-29 13:46:38 UTC
oVirt doesn't notify guest about CD-eject.
udev on a guest doesn't know anything about CD-eject.
Guest thinks that CD is present.
There is the same bug: https://bugzilla.redhat.com/show_bug.cgi?id=1428514
This can be close as a duplicate of 1428514.

Comment 9 Eduardo Lima (Etrunko) 2017-03-29 16:35:00 UTC
(In reply to Andrei Stepanov from comment #8)
> oVirt doesn't notify guest about CD-eject.
> udev on a guest doesn't know anything about CD-eject.
> Guest thinks that CD is present.
> There is the same bug: https://bugzilla.redhat.com/show_bug.cgi?id=1428514
> This can be close as a duplicate of 1428514.

Thanks for the comment, I am be closing this one then, as bug 1428514 has much more details about the issue.

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