From: Ian Jackson <ian.jackson@eu.citrix.com>
To: xen-devel@lists.xenproject.org
Cc: "Ian Jackson" <ian.jackson@eu.citrix.com>,
"Roger Pau Monné" <roger.pau@citrix.com>
Subject: [PATCH] cs-adjust-flight: Work properly on db transaction retry
Date: Mon, 20 Mar 2017 15:18:37 +0000 [thread overview]
Message-ID: <1490023117-29293-1-git-send-email-ian.jackson@eu.citrix.com> (raw)
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
next reply other threads:[~2017-03-20 15:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-20 15:18 Ian Jackson [this message]
2017-03-21 12:08 ` [PATCH] cs-adjust-flight: Work properly on db transaction retry Roger Pau Monné
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1490023117-29293-1-git-send-email-ian.jackson@eu.citrix.com \
--to=ian.jackson@eu.citrix.com \
--cc=roger.pau@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).