summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Schwede <cschwede@redhat.com>2017-03-30 14:15:28 +0200
committerChristian Schwede <cschwede@redhat.com>2017-06-08 13:11:14 +0000
commit9ffca830e59966f5bfafcd4abf74f710eb9e1d16 (patch)
tree1cfe5d3e8e143b8af02452a6611f26f2163002a5
parentd24b7af2593cd4871d044bb9c8af9aba8e93b09e (diff)
Fix raising an error on rebalance warningsstable/newton
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 (cherry picked from commit c64538ef8387128226dedbb51cac6548570d84e3)
Notes
Notes (review): Code-Review+2: Alex Schultz <aschultz@redhat.com> Code-Review+2: Iury Gregory Melo Ferreira <iurygregory@gmail.com> Workflow+1: Iury Gregory Melo Ferreira <iurygregory@gmail.com> Code-Review+1: lidong <lidongbj@inspur.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Fri, 09 Jun 2017 13:12:24 +0000 Reviewed-on: https://review.openstack.org/472253 Project: openstack/puppet-swift Branch: refs/heads/stable/newton
-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.