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

[Xen-devel] [OSSTEST PATCH 02/11] cs-adjust-flight: Allow adjusting play flights after start



Specifically, rather than simply bombing out, if the flight already
has steps, we call dbfl_check again with an empty list of OK
blessings.  dbfl_check will then bomb out, unless the flight's
blessing or intended blessing is `play'.  If it doesn't bomb out, we
print a message.

Signed-off-by: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>
---
 cs-adjust-flight | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/cs-adjust-flight b/cs-adjust-flight
index afb81cb..4f036f4 100755
--- a/cs-adjust-flight
+++ b/cs-adjust-flight
@@ -465,7 +465,11 @@ sub changes () {
            $dbh_tests->prepare("SELECT * FROM steps WHERE flight = ?");
        $steps_q->execute($dstflight);
        my $step = $steps_q->fetchrow_hashref();
-       die "$dstflight already has steps\n".Dumper($step) if $step;
+       if ($step) {
+           warn "$dstflight already has steps\n".Dumper($step) if $step;
+           $mjobdb->dbfl_check($dstflight,[]);
+           print STDERR "changing flight $dstflight anyway\n";
+       }
     }
 
     @changes = @org_changes;
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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