From 3653345f1cb1a3663dfb28473caa80643027be5c Mon Sep 17 00:00:00 2001 From: Alex Schultz Date: Fri, 12 May 2017 09:36:17 -0600 Subject: [PATCH] Fix upgrade command Make our upgrade class match devstack. https://github.com/openstack/watcher/blob/2d98d5e743d8a1ed1bcb9ca4ff79774491b4ee96/devstack/lib/watcher#L238 Change-Id: I02ce5e52f78282c394b086b8643655dbe226bd68 --- manifests/db/upgrade.pp | 2 +- releasenotes/notes/fix-db-upgrade-5dc1d2c07d26774a.yaml | 4 ++++ spec/classes/watcher_db_upgrade_spec.rb | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) create mode 100644 releasenotes/notes/fix-db-upgrade-5dc1d2c07d26774a.yaml diff --git a/manifests/db/upgrade.pp b/manifests/db/upgrade.pp index f3951e4..9ac2c8d 100644 --- a/manifests/db/upgrade.pp +++ b/manifests/db/upgrade.pp @@ -16,7 +16,7 @@ class watcher::db::upgrade( include ::watcher::deps exec { 'watcher-db-manage-upgrade': - command => "watcher-db-manage ${extra_params} upgrade", + command => "watcher-db-manage ${extra_params} upgrade head", path => '/usr/bin', user => 'watcher', refreshonly => true, diff --git a/releasenotes/notes/fix-db-upgrade-5dc1d2c07d26774a.yaml b/releasenotes/notes/fix-db-upgrade-5dc1d2c07d26774a.yaml new file mode 100644 index 0000000..c88a6c9 --- /dev/null +++ b/releasenotes/notes/fix-db-upgrade-5dc1d2c07d26774a.yaml @@ -0,0 +1,4 @@ +--- +fixes: + - | + Fix db upgrade class to use 'watcher-db-manager upgrade head'. diff --git a/spec/classes/watcher_db_upgrade_spec.rb b/spec/classes/watcher_db_upgrade_spec.rb index 05592e4..d8e3972 100644 --- a/spec/classes/watcher_db_upgrade_spec.rb +++ b/spec/classes/watcher_db_upgrade_spec.rb @@ -6,7 +6,7 @@ describe 'watcher::db::upgrade' do it 'runs watcher-db-manage' do is_expected.to contain_exec('watcher-db-manage-upgrade').with( - :command => 'watcher-db-manage --config-file /etc/watcher/watcher.conf upgrade', + :command => 'watcher-db-manage --config-file /etc/watcher/watcher.conf upgrade head', :path => '/usr/bin', :user => 'watcher', :refreshonly => 'true', @@ -30,7 +30,7 @@ describe 'watcher::db::upgrade' do it { is_expected.to contain_exec('watcher-db-manage-upgrade').with( - :command => 'watcher-db-manage --config-file /etc/watcher/watcher01.conf upgrade', + :command => 'watcher-db-manage --config-file /etc/watcher/watcher01.conf upgrade head', :path => '/usr/bin', :user => 'watcher', :refreshonly => 'true',