8b9e7ece48
We should try to make sure the balance is 0, because only 0 balance means that all the devices got exact amount of partitions they wanted to and our ring is balanced. In order to reduce network load we setup cronjobs in a separate deployment task. Those cronjobs will rebalance rings periodically and rsync them from primary controller to secondaries. DocImpact Change-Id: I141c7cb581da2da0ef1b47cefaf5b9c485509ecd Closes-bug: #1409783
14 lines
508 B
Ruby
14 lines
508 B
Ruby
require File.join File.dirname(__FILE__), '../test_common.rb'
|
|
|
|
class SwiftRebalancePostTest < Test::Unit::TestCase
|
|
def test_that_cron_job_is_configured
|
|
if TestCommon::Settings.lookup('role') == 'primary-controller'
|
|
assert TestCommon::Cron.cronjob_exists?('swift', 'swift-rings-rebalance.sh'),
|
|
'No cronjob for swift-rings-rebalance.sh!'
|
|
else
|
|
assert TestCommon::Cron.cronjob_exists?('swift', 'swift-rings-sync.sh'),
|
|
'No cronjob for swift-rings-sync.sh!'
|
|
end
|
|
end
|
|
end
|