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

Re: [Xen-devel] [PATCH OSSTEST 09/11] ts-examine-hostprops-save: introduce a script to save properties



Roger Pau Monne writes ("[PATCH OSSTEST 09/11] ts-examine-hostprops-save: 
introduce a script to save properties"):
> The introduce script turns the properties stored in the runvars using
> the format hostprop_$hotname_$prop=$val into host properties stored in
> the database.
...
> +exit 0 if intended_blessing() ne "real";

Can we at least print a message in this case ?
TBH I think it might be better to actually fail.

> +logm("setting host properties");
> +
> +foreach my $k (sort keys %r) {
> +    next unless $k =~ m/^hostprop_([^_]*)_([^_]*)$/;
> +    my $hostname= $1;
> +    my $prop=$2;
> +
> +    logm("recording for $hostname $prop=$r{$k}");
> +    set_host_property($hostname, $prop, $r{$k});

My earlier comments mean you're going to have to call selecthost().

That means you are going to need to record the current hostname and
compare it to the one you have in $ho, or something.  (Otherwise
you'll call selecthost for every prop which would produce a lot of
undesirable noise.)

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®.