Bug 929387

Summary: Send 'uninstalled' notification non blocking
Product: Red Hat Enterprise Virtualization Manager Reporter: Julio Entrena Perez <jentrena>
Component: ovirt-guest-agentAssignee: Vinzenz Feenstra [evilissimo] <vfeenstr>
Status: CLOSED ERRATA QA Contact: Jiri Belka <jbelka>
Severity: medium Docs Contact:
Priority: urgent    
Version: 3.1.3CC: acathrow, chetan, dyasny, iheim, jentrena, michal.skrivanek, mkenneth, pep, pstehlik, vfeenstr
Target Milestone: ---Keywords: Patch
Target Release: 3.2.0   
Hardware: All   
OS: Linux   
Whiteboard: virt
Fixed In Version: Doc Type: Bug Fix
Doc Text:
When the host was not connected to the virtio serial port, a pre-uninstall script in the guest agent package blocked the removal of the guest agent. Now, the pre-uninstall script opens the port with the O_NONBLOCK flag, so removing the guest agent does not hang if VDSM was not responding or did not exist prior to the removal.
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-06-10 20:13:13 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:

Description Julio Entrena Perez 2013-03-30 10:48:11 UTC
Description of problem:
the preuninstall rpm script of the guest agent package can block while notifying vdsm of the uninstallation of the guest agent via the virtual serial port.

A "yum update" command will block if the guest agent is one of the updated packages and vdsm in the host is not responding.

Version-Release number of selected component (if applicable):
rhevm-guest-agent 1.0.5-8.el6ev

How reproducible:
Always.

Steps to Reproduce:
1. Stop vdsm in the host where the guest runs.
2. yum update the guest agent
  
Actual results:
yum blocks at the %preun script of the rpm package while echoing "uninstalled" to /dev/virtio-ports/com.redhat.rhevm.vdsm

Expected results:
yum doesn't block running a pre-uninstall script

Additional info:
Fixed upstream at http://gerrit.ovirt.org/#/c/10476/ by opening the port with the O_NONBLOCK flag from a python script.

Comment 1 Vinzenz Feenstra [evilissimo] 2013-04-04 12:34:25 UTC
Was already merged u/s as http://gerrit.ovirt.org/gitweb?p=ovirt-guest-agent.git;a=commit;h=d2defa34e0572cb72ea65c977fb2948bce72008c

Comment 2 Michal Skrivanek 2013-04-18 11:24:05 UTC
different soltion has been merged u/s as http://gerrit.ovirt.org/gitweb?p=ovirt-guest-agent.git;a=commit;h=0d9280ec109e0bd6c693999a4c036e70d9324860

Comment 3 Vinzenz Feenstra [evilissimo] 2013-04-18 11:44:02 UTC
(In reply to comment #2)
> different soltion has been merged u/s as
> http://gerrit.ovirt.org/gitweb?p=ovirt-guest-agent.git;a=commit;
> h=0d9280ec109e0bd6c693999a4c036e70d9324860

We won't use it for RHEV 3.2 - We can do that for 3.3

Comment 6 Jiri Belka 2013-04-30 10:22:20 UTC
ok, rhevm-guest-agent-1.0.7-11.el6ev.

Comment 7 errata-xmlrpc 2013-06-10 20:13:13 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/RHEA-2013-0914.html