|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v12 31/33] ts-examine-hostprops-save: introduce a script to save properties
Roger Pau Monne writes ("[PATCH v12 31/33] ts-examine-hostprops-save: introduce
a script to save properties"):
> This script turns the properties stored in the runvars using the
> format hostprop/$ident/$prop=$val into host properties stored in the
> database.
Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
Although,
> +foreach my $k (sort keys %r) {
> + next unless $k =~ m/^hostprop\/([^\/]*)\/([^\/]*)$/;
> + my $ho = selecthost($1);
> + my $prop = $2;
> +
> + logm("recording for $ho->{Name} $prop=$r{$k}");
> +
> + # NB: in order to aid debug only attempt to save the host props
> + # on flights with real blessing, for the rest just do a dry run.
> + if ($blessing eq "real") {
> + set_host_property($ho, $prop, $r{$k});
> + } else {
> + logm("not saving host prop with blessing $blessing != real");
This will be annoyingly noisy in non-real flights with multiple
hostprops.
Better would be to move the $blessing eq "real" test to the outside of
the loop and have a variable to day whether to actually set things.
Then the log message about "not saving" could be printed once.
Ian.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |