summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Schwede <cschwede@redhat.com>2017-03-30 14:15:28 +0200
committerChristian Schwede <cschwede@redhat.com>2017-03-30 14:39:04 +0200
commitc64538ef8387128226dedbb51cac6548570d84e3 (patch)
tree3e00d4283d5bb32ce2ae4efaf6c5921e4ca9af44
parentea50a20ad871b842e9486fbe6194e2be9fa01974 (diff)
Fix raising an error on rebalance warnings
If the ring has been rebalanced recently, the next call to rebalance will not rebalance again if the time passed is shorter than min_part_time. swift-ring-builder returns an exit code of 1 in this case, which is a warning, but not a hard error (errors will use an exit code of 2). It makes sense therefore to expect an exit code of 0 or 1 and only fail if it's different. Closes-Bug: 1677588 Change-Id: I03dd075c590344a920099c57b6a7530f103e0ede
Notes
Notes (review): Code-Review+2: Emilien Macchi <emilien@redhat.com> Code-Review+1: Juan Antonio Osorio Robles <jaosorior@redhat.com> Code-Review+2: Alex Schultz <aschultz@redhat.com> Workflow+1: Alex Schultz <aschultz@redhat.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Sun, 02 Apr 2017 11:09:52 +0000 Reviewed-on: https://review.openstack.org/451793 Project: openstack/puppet-swift Branch: refs/heads/master
-rw-r--r--manifests/ringbuilder/rebalance.pp1
-rw-r--r--releasenotes/notes/rebalance-exit-codes-ee79621190315a5a.yaml7
2 files changed, 8 insertions, 0 deletions
diff --git a/manifests/ringbuilder/rebalance.pp b/manifests/ringbuilder/rebalance.pp
index 256249e..5d525fd 100644
--- a/manifests/ringbuilder/rebalance.pp
+++ b/manifests/ringbuilder/rebalance.pp
@@ -24,5 +24,6 @@ define swift::ringbuilder::rebalance(
24 path => ['/usr/bin'], 24 path => ['/usr/bin'],
25 refreshonly => true, 25 refreshonly => true,
26 before => Anchor['swift::config::end'], 26 before => Anchor['swift::config::end'],
27 returns => [0, 1],
27 } 28 }
28} 29}
diff --git a/releasenotes/notes/rebalance-exit-codes-ee79621190315a5a.yaml b/releasenotes/notes/rebalance-exit-codes-ee79621190315a5a.yaml
new file mode 100644
index 0000000..30ab704
--- /dev/null
+++ b/releasenotes/notes/rebalance-exit-codes-ee79621190315a5a.yaml
@@ -0,0 +1,7 @@
1---
2fixes:
3 - puppet-swift will no longer raise an error if
4 swift-ring-builder rebalance returns an exit code of 1.
5 This is a warning but not an error in
6 swift-ring-builder; errors use an exit code of 2 in
7 swift-ring-builder.