On Thu, 2015-12-17 at 17:06 +0000, Ian Jackson wrote: > Whatever is in the user's cwd is unlikely to correspond to anything > real. In principle it might be possible to obtain an official copy > from the real daemons, and massage it, or something, but that's a lot > of work. > > Instead, just remove it when we start the test db daemons. > > In principle it would be more correct to remove it when we set up the > test db, because it is at that point that we create the new view of > the world. Removing the old plan data when we start daemons means > that if the user, who is testing, restarts the daemons, the > newly-created queue daemon does not have information about allocations > made with the previous daemon, and instead regards those allocations > as rogue. > > However, removing the file only when the daemons are started means > that if the user has saved a data-plan.pl in their cwd for some other > reason we don't remove it unless the user is actually going to run the > daemons. So I think this is preferable. > > Signed-off-by: Ian Jackson <ian.jack...@eu.citrix.com>
Acked-by: Ian Campbell <ian.campb...@citrix.com> Would it make sense to remove data-projection.pl too? I suppose it isn't consumed anywhere so is more or less harmless. OOI do these test mode daemons do anything sensible with resource- {plan,projection}.html and summary.html? Looks like they would clobber things in $c{WebspaceFile}, which might be surprising to a user with two test instances on the go. But that's a pretty obscure corner case I suspect... > --- > mg-schema-test-database | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/mg-schema-test-database b/mg-schema-test-database > index 818cf89..a4cb732 100755 > --- a/mg-schema-test-database > +++ b/mg-schema-test-database > @@ -553,6 +553,8 @@ daemons) > withtest \ > exec_resetting_sigint ./ms-queuedaemon & > > + rm -f data-plan.pl > + > wait > > ;; _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel