[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH OSSTEST v2] PDU/xenuse: Support xenuse on machine not locked by current user
Ian Campbell writes ("[PATCH OSSTEST v2] PDU/xenuse: Support xenuse on machine not locked by current user"): > xenuse checks that whoever is trying to reboot a machine "owns" that machine > via a locking mechanism. This is usually fine doesn't work well when one wants > to book a machine out of the osstest pool for adhoc testing. In this case > machine ownership is maintained by osstest ahd the machine remains locked to > osstest as far as xenuse is concerned. ... > + my $user= $c{XenUseUser} || undef; > + $user= get_host_property($mo->{Host}, "XenUseUser", $user); I'm not sure what's wrong with: my $user= get_host_property($mo->{Host}, "XenUseUser", $c{XenUseUser} || undef $user); ? > + local $ENV{USER} = $ENV{USER}; If USER isn't in the environment, this will set it to an empty value. If you use the suffix if, you don't get a { } which limits the scope of local: ( logm("XenUse overriding \$USER to $user"), local $ENV{USER} = $user ) if $user; perhaps. Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |