Bug 802389

Summary: event handlers for 'close' event doesn't work in remote mode
Product: Red Hat Enterprise Linux 6 Reporter: Qixiang Wan <qwan>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED WONTFIX QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: low    
Version: 6.2CC: leiwang, moli, qguan, yuzhou
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-09-27 15:50:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Qixiang Wan 2012-03-12 12:58:05 UTC
Description of problem:
When guestfish works in remote mode, register an event handler for 'close' event, it doesn't work as expected.

Version-Release number of selected component (if applicable):
libguestfs-1.16.8-1.el6.x86_64

How reproducible:
100%

Steps to Reproduce:
1.

$ eval `guestfish --listen`
$ guestfish --remote -- event "evt" close "echo GoodBye"
$ guestfish --remote -- list-events
"evt" (0): close: echo GoodBye
$ guestfish --remote -- quit
$ 

  
Actual results:
The event handler doesn't work.

Expected results:
The event handler should work.

Additional info:

[1] $ guestfish
><fs> event "evt" close "echo GoodBye"
><fs> list-events
"evt" (1): close: echo GoodBye
><fs> quit

GoodBye

[2]
$ eval `guestfish --listen`
$ guestfish --remote -- event "evt" close "echo GoodBye"
$ guestfish --remote -- list-events
"evt" (0): close: echo GoodBye
$ guestfish --remote -- badcmd
badcmd: unknown command
GoodBye

Comment 2 Richard W.M. Jones 2012-03-12 14:28:57 UTC
The fix would be quite intrusive, so this isn't 6.3 material.
However I'll post an upstream patch shortly.

Comment 5 RHEL Program Management 2012-07-10 05:51:38 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 6 RHEL Program Management 2012-07-11 00:01:34 UTC
This request was erroneously removed from consideration in Red Hat Enterprise Linux 6.4, which is currently under development.  This request will be evaluated for inclusion in Red Hat Enterprise Linux 6.4.

Comment 7 Richard W.M. Jones 2012-09-27 15:50:41 UTC
After looking at this again:

The code in guestfish remote has changed considerably, so I'm
not confident that my backport of this code won't break things.

Since this is not a serious bug, I'm closing it, and suggesting
that if anyone hits the bug they either work around it, or
upgrade to RHEL 7 where this bug will be fixed properly and
the fix tested.