[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v4 10/16] osstest: add support for runtime_IDENT_hostflags



Roger Pau Monne writes ("[PATCH v4 10/16] osstest: add support for 
runtime_IDENT_hostflags"):
> This is required for FreeBSD, that will need to set some of the
> hostflags at runtime. The current IDENT_hostflags will be keep as-is,
> and they should only be set at job creation time.
> 
> Also introduce a helper to set the runtime hostflags.
...
> @@ -1587,10 +1587,17 @@ sub get_hostflags ($) {
>      my ($ident) = @_;
>      # may be run outside transaction, or with flights locked
>      my $flags= get_runvar_default('all_hostflags',     $job, '').','.
> -               get_runvar_default("${ident}_hostflags", $job, '');
> +               get_runvar_default("${ident}_hostflags", $job, '').','.
> +               get_runvar_default("runtime_${ident}_hostflags", $job, '');

VG.

> +sub set_runtime_hostflag ($$) {
> +    my ($ident,$value) = @_;
> +
> +    store_runvar("runtime_${ident}_hostflags", $value);

This function suggests that you can do this
   set_runtime_hostflag('host', 'freebsd-version-4.7');
   set_runtime_hostflag('host', 'share-host-freebsd-4.7-xxxx-yyyy');
but of course that won't work.

I like the implied interface better than the one which implicitly
overwrites all previous runtime hostflags.

Should set_runtime_hostflag take a $ho, instead ?  Can you ever see us
using it without a $ho ?  If not then it probably should.

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.