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

Re: [Xen-devel] [PATCH OSSTEST v2] cs-adjust-flight: Add jobs-rename command which applies a perlop to job names



Ian Campbell writes ("[PATCH OSSTEST v2] cs-adjust-flight: Add jobs-rename 
command which applies a perlop to job names"):
> My intention was to allow creation of adhoc jobs based on a template
> but modified e.g. to enable/disable XSM with a sequence something
> like:
...
> Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
> Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>

I know I acked this, and my next observations don't mean we shouldn't
apply it as-is, but:

> +    UPDATE jobs
> +       SET job = ?
> +     WHERE flight = ? AND job = ?
> +END

This can be applied to flights in intended blessing `play' in
blessings later than `constructing', or via `running:F' to running
flights.

And if that happens, there might be entries in the steps table which
ought also to be renamed.  If you don't rename them you will trip the
foreign key constraint.

I think a similar problem exists with jobs_del.

Note that this constraint is INITIALLY IMMEDIATE.  If we were to make
it INITIALLY DEFERRED then this code would become dangerous, because
   ./cs-adjust-flight F jobs-rename x 's/x/y/' copy-jobs G x
would leave F.x containing the steps from the old x but the
recipe and runvars from G.x.  But I don't think INITIALLY DEFERRED is
a good default for constraints so this is probably not relevant.

Ian.

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


 


Rackspace

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