fuel-library/deployment/puppet/osnailyfacter/modular/swift/rebalance_cronjob_post.rb
Aleksandr Didenko 8b9e7ece48 Setup swift rings rebalance and repush cronjobs
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
2015-03-27 11:43:40 +02:00

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