Comment 3 for bug 1438579

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to swift (master)

Reviewed: https://review.openstack.org/169231
Committed: https://git.openstack.org/cgit/openstack/swift/commit/?id=d3213fb1fe00ae649ba198577b7e8b37180d3753
Submitter: Jenkins
Branch: master

commit d3213fb1fe00ae649ba198577b7e8b37180d3753
Author: Christian Schwede <email address hidden>
Date: Tue Mar 31 08:51:18 2015 +0000

    Check if device name is valid when adding to the ring

    Currently device names can be empty or start and/or end with spaces.
    This can create unexpected results, for example these three commands
    are all valid:

    swift-ring-builder account.builder add "r1z1-127.0.0.1:6000/" 1
    swift-ring-builder account.builder add "r1z1-127.0.0.1:6000/sda " 1
    swift-ring-builder account.builder add "r1z1-127.0.0.1:6000/ meta" 1

    This patch validates device names and prevents empty names or names
    starting and/or ending with spaces.

    Also fixed the test "test_warn_at_risk" - the test passed if the
    exception was not raised.

    Closes-Bug: 1438579

    Change-Id: I811b0eae7db503279e6429d985275bbab8b29c9f