Do not skip gnocchi resource type creation by default in db::sync

The default command-line option for ceilometer-upgrade is to not
skip gnocchi resource type creation. If we do not pass any extra_params
to the ceilometer::db::sync class, we should keep defaults.

This has not failed before in CI because p-o-i was passing
'--skip-metering-database' as extra_params, but now we are removing
that deprecated option in [1].

[1] - https://review.openstack.org/548337

Change-Id: I33c1667e19326ec67c5cf953daa1237175895c4f
This commit is contained in:
Javier Pena 2018-02-28 15:20:47 +01:00 committed by Tobias Urdin
parent 396b3d7dc9
commit e985087545
3 changed files with 5 additions and 3 deletions

View File

@ -7,10 +7,10 @@
# [*extra_params*]
# (Optional) String of extra command line parameters
# to append to the ceilometer-upgrade command.
# Defaults to '--skip-gnocchi-resource-types'.
# Defaults to undef.
#
class ceilometer::db::sync(
$extra_params = '--skip-gnocchi-resource-types',
$extra_params = undef,
) {
include ::ceilometer::deps

View File

@ -47,6 +47,8 @@ describe 'ceilometer with mysql' do
database_connection => 'mysql+pymysql://ceilometer:a_big_secret@127.0.0.1/ceilometer?charset=utf8',
sync_db => false,
}
# NOTE(tobasco): When running the beaker tests we need to exclude the
# gnocchi resource types since the acceptance test does not setup gnocchi itself.
class { '::ceilometer::db::sync':
extra_params => '--skip-gnocchi-resource-types',
}

View File

@ -6,7 +6,7 @@ describe 'ceilometer::db::sync' do
it 'runs ceilometer-upgrade' do
is_expected.to contain_exec('ceilometer-upgrade').with(
:command => 'ceilometer-upgrade --skip-gnocchi-resource-types',
:command => 'ceilometer-upgrade ',
:path => '/usr/bin',
:refreshonly => 'true',
:user => 'ceilometer',