Bug 1100498

Summary: RFE: non-polling mechanism to detect guestmount --no-fork readiness
Product: [Fedora] Fedora Reporter: Colin Walters <walters>
Component: libguestfsAssignee: Richard W.M. Jones <rjones>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: mbooth, ptoscano, rjones, virt-maint
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-05-24 18:03:46 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 Colin Walters 2014-05-22 22:58:49 UTC
In bug 916780 a feature was added to guestmount to avoid daemonizing, which allows the caller to watch its status via normal waitpid().  However, at the moment callers still have to use the pid file. 

It's possible to use inotify on the pid file to avoid polling, but another model might be a --with-ready-pipe-fd or so, where the caller provides a pipe (or eventfd) to guestmount, and it writes a byte when it's successfully mounted.

Comment 1 Richard W.M. Jones 2014-05-23 08:44:13 UTC
It probably works if you set the --pid-file to be a pipe :-)

However we can add a --fd=<N> option, analogous to the
guestunmount option.

Comment 2 Richard W.M. Jones 2014-05-23 10:53:19 UTC
Patches posted:
https://www.redhat.com/archives/libguestfs/2014-May/msg00091.html

Comment 3 Richard W.M. Jones 2014-05-24 18:03:46 UTC
This is now available in libguestfs >= 1.27.13.