puppet-swift fails on rebalance warnings

Bug #1677588 reported by Christian Schwede
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
puppet-swift
Fix Released
High
Christian Schwede

Bug Description

If swift-ring-builder rebalance raises a warning, it will exit with an exit code of 1. That happens for example when rebalancing within min_part_hours, which is by default 1 hour (ie redeploy again with a changed topology within an hour).

If swift-ring-builder raises an error it will use an exit code of 2. Exit codes of 0 and 1 are ok/warnings only, and should not raise a Puppet error therefore.

Changed in tripleo:
assignee: nobody → Christian Schwede (cschwede)
status: New → In Progress
Revision history for this message
Emilien Macchi (emilienm) wrote :
no longer affects: tripleo
Changed in puppet-swift:
status: New → In Progress
importance: Undecided → High
assignee: nobody → Christian Schwede (cschwede)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to puppet-swift (master)

Reviewed: https://review.openstack.org/451793
Committed: https://git.openstack.org/cgit/openstack/puppet-swift/commit/?id=c64538ef8387128226dedbb51cac6548570d84e3
Submitter: Jenkins
Branch: master

commit c64538ef8387128226dedbb51cac6548570d84e3
Author: Christian Schwede <email address hidden>
Date: Thu Mar 30 14:15:28 2017 +0200

    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

Changed in puppet-swift:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to puppet-swift (stable/ocata)

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/452535

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to puppet-swift (stable/ocata)

Reviewed: https://review.openstack.org/452535
Committed: https://git.openstack.org/cgit/openstack/puppet-swift/commit/?id=6d02419ef932b54aca5c60d9d3b1efe67ecfd0f3
Submitter: Jenkins
Branch: stable/ocata

commit 6d02419ef932b54aca5c60d9d3b1efe67ecfd0f3
Author: Christian Schwede <email address hidden>
Date: Thu Mar 30 14:15:28 2017 +0200

    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
    (cherry picked from commit c64538ef8387128226dedbb51cac6548570d84e3)

tags: added: in-stable-ocata
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/puppet-swift 11.0.0

This issue was fixed in the openstack/puppet-swift 11.0.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/puppet-swift 10.3.1

This issue was fixed in the openstack/puppet-swift 10.3.1 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to puppet-swift (stable/newton)

Fix proposed to branch: stable/newton
Review: https://review.openstack.org/472253

Revision history for this message
Christian Schwede (cschwede) wrote :

Turns out this is also an issue when adding more disks to an existing 3-replica setup. When doing this a rebalance will only move a single replica at a time, and this will create a ring that is not perfectly balanced - and should be rebalanced again after some time. Thus swift-ring-builder exits with an exitcode of 1.

Currently this fails in Newton (because the patch has not yet been backported).

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to puppet-swift (stable/newton)

Reviewed: https://review.openstack.org/472253
Committed: https://git.openstack.org/cgit/openstack/puppet-swift/commit/?id=9ffca830e59966f5bfafcd4abf74f710eb9e1d16
Submitter: Jenkins
Branch: stable/newton

commit 9ffca830e59966f5bfafcd4abf74f710eb9e1d16
Author: Christian Schwede <email address hidden>
Date: Thu Mar 30 14:15:28 2017 +0200

    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
    (cherry picked from commit c64538ef8387128226dedbb51cac6548570d84e3)

tags: added: in-stable-newton
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/puppet-swift 9.6.0

This issue was fixed in the openstack/puppet-swift 9.6.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.