[Libguestfs] [PATCH 4/4] Ignore launch() error in virt-rescue
Matthew Booth
mbooth at redhat.com
Thu Aug 26 14:06:42 UTC 2010
On 26/08/10 13:20, Richard W.M. Jones wrote:
> On Thu, Aug 26, 2010 at 12:12:01PM +0100, Matthew Booth wrote:
>> launch() expects guestfsd to start, which it never does in virt-rescue, so it
>> always returns an error about the appliance shutting down unexpectedly.
>> ---
>> tools/virt-rescue | 3 ++-
>> 1 files changed, 2 insertions(+), 1 deletions(-)
>>
>> diff --git a/tools/virt-rescue b/tools/virt-rescue
>> index 1f292f6..f466b43 100755
>> --- a/tools/virt-rescue
>> +++ b/tools/virt-rescue
>> @@ -214,7 +214,8 @@ $g->set_append ($str);
>>
>> # Run the appliance. This won't return until the user quite the
>> # appliance.
>> -$g->launch ();
>> +# This will definitely return an error because we don't run the daemon
>> +eval { $g->launch (); };
>
> It seems a shame to lose the error message here, for example in the
> cause where launch really doesn't work, eg. it can't find the
> appliance. How about:
>
> eval { $g->launch (); };
> print $@ if $@;
Well that will always display an error message about a child process
dying unexpectedly. I'll post an updated patch which ignores ECHILD.
I've confirmed that this display an error when the appliance can't be found.
Matt
--
Matthew Booth, RHCA, RHCSS
Red Hat Engineering, Virtualisation Team
GPG ID: D33C3490
GPG FPR: 3733 612D 2D05 5458 8A8A 1600 3441 EA19 D33C 3490
More information about the Libguestfs
mailing list