Files
puppet-nova/spec/classes/nova_cron_archive_deleted_rows_spec.rb
Emilien Macchi 14f31f40a7 crontab to move deleted instance rows to another database table
Create a crontab which moves deleted instances rows to another database table that you don't have to backup.
This is done to optimize database management at scale.
Depending on the amount of deleted instances that you get on a daily
basis you want to modify the $max_rows parameter.

This feature is implemented as in nova CLI and addressed by this
blueprint: https://blueprints.launchpad.net/nova/+spec/db-archiving

Change-Id: Ia03fa6862aefcbcc7d7949b08d00bacf679cb548
Signed-off-by: Emilien Macchi <emilien.macchi@enovance.com>
2014-09-08 07:06:01 -04:00

22 lines
567 B
Ruby

require 'spec_helper'
describe 'nova::cron::archive_deleted_rows' do
let :facts do
{ :osfamily => 'Debian' }
end
it 'configures a cron' do
should contain_cron('nova-manage db archive_deleted_rows').with(
:command => 'nova-manage db archive_deleted_rows --max_rows 100 >>/var/log/nova/nova-rowsflush.log 2>&1',
:environment => 'PATH=/bin:/usr/bin:/usr/sbin',
:user => 'nova',
:minute => 1,
:hour => 0,
:monthday => '*',
:month => '*',
:weekday => '*'
)
end
end