All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] cs-adjust-flight: Work properly on db transaction retry
@ 2017-03-20 15:18 Ian Jackson
  2017-03-21 12:08 ` Roger Pau Monné
  0 siblings, 1 reply; 2+ messages in thread
From: Ian Jackson @ 2017-03-20 15:18 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Jackson, Roger Pau Monné

The variable @changes is eaten during processing.  So on db retry,
there would be changes missing.  (When creating a new flight, this
would often mean a flight with no jobs, which cannot be executed.)

CC: Roger Pau Monné <roger.pau@citrix.com>
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
---
 cs-adjust-flight |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/cs-adjust-flight b/cs-adjust-flight
index 85ced59..b78ea7e 100755
--- a/cs-adjust-flight
+++ b/cs-adjust-flight
@@ -85,9 +85,10 @@ while (@ARGV && $ARGV[0] =~ m/^\-/) {
 }
 
 die unless @ARGV >= 1;
-our ($dstflightspec,@changes) = @ARGV;
+our ($dstflightspec,@org_changes) = @ARGV;
 
 our $dstflight;
+our @changes;
 
 sub spec_re ($) {
     my ($spec) = @_;
@@ -463,6 +464,8 @@ sub changes () {
 	die "$dstflight already has steps\n".Dumper($step) if $step;
     }
 
+    @changes = @org_changes;
+
     while (@changes) {
         my $change = shift @changes;
         $change =~ s/-/_/g;
-- 
1.7.10.4


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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] cs-adjust-flight: Work properly on db transaction retry
  2017-03-20 15:18 [PATCH] cs-adjust-flight: Work properly on db transaction retry Ian Jackson
@ 2017-03-21 12:08 ` Roger Pau Monné
  0 siblings, 0 replies; 2+ messages in thread
From: Roger Pau Monné @ 2017-03-21 12:08 UTC (permalink / raw)
  To: Ian Jackson; +Cc: xen-devel

On Mon, Mar 20, 2017 at 03:18:37PM +0000, Ian Jackson wrote:
> The variable @changes is eaten during processing.  So on db retry,
> there would be changes missing.  (When creating a new flight, this
> would often mean a flight with no jobs, which cannot be executed.)
> 
> CC: Roger Pau Monné <roger.pau@citrix.com>
> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>

Tested-by: Roger Pau Monné <roger.pau@citrix.com>

Thanks, Roger.

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-03-21 12:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-20 15:18 [PATCH] cs-adjust-flight: Work properly on db transaction retry Ian Jackson
2017-03-21 12:08 ` Roger Pau Monné

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.