summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPradip Rawat <Pradip.Rawat.CTR@kaminario.com>2016-10-17 15:23:14 +0530
committerPradip Rawat <Pradip.Rawat.CTR@kaminario.com>2016-10-17 15:23:14 +0530
commite89184043f5b8b92aa986d2062ef16c29cea12bd (patch)
tree864b3e0d759b81bb7d6d240bffc7484650420df4
parent9550a4d0e62a676740b7ddede3df90aa7f0e5048 (diff)
Update fuel plugin repo for Kamianrio to restart services
Change-Id: Ie00fe2610149008abfd1d162ad422b7bf36d927b Co-Authored-By: Chaithanya Kopparthi<chaithanyak@biarca.com>
Notes
Notes (review): Code-Review+2: Pradip Rawat <Pradip.Rawat.CTR@kaminario.com> Workflow+1: Pradip Rawat <Pradip.Rawat.CTR@kaminario.com> Verified+2: Jenkins Submitted-by: Jenkins Submitted-at: Mon, 17 Oct 2016 10:04:25 +0000 Reviewed-on: https://review.openstack.org/387314 Project: openstack/fuel-plugin-cinder-kaminario Branch: refs/heads/master
-rw-r--r--deployment_scripts/puppet/manifests/cinder_kaminario.pp12
-rw-r--r--deployment_scripts/puppet/modules/kaminario/files/exception.sh5
-rw-r--r--deployment_scripts/puppet/modules/kaminario/manifests/controller_config.pp13
3 files changed, 21 insertions, 9 deletions
diff --git a/deployment_scripts/puppet/manifests/cinder_kaminario.pp b/deployment_scripts/puppet/manifests/cinder_kaminario.pp
index 481f928..ede8490 100644
--- a/deployment_scripts/puppet/manifests/cinder_kaminario.pp
+++ b/deployment_scripts/puppet/manifests/cinder_kaminario.pp
@@ -3,7 +3,13 @@ notice('MODULAR: cinder_kaminario')
3 3
4class { 'kaminario::krest': }-> 4class { 'kaminario::krest': }->
5class { 'kaminario::driver': }-> 5class { 'kaminario::driver': }->
6class { 'kaminario::config': }~> Exec[cinder_volume] 6class { 'kaminario::config': } ~> Service['cinder_volume']
7 7
8exec {'cinder_volume': 8service { 'cinder_volume':
9 command => '/usr/sbin/service cinder-volume restart',} 9 ensure => running,
10 name => cinder-volume,
11 enable => true,
12 hasstatus => true,
13 hasrestart => true,
14
15}
diff --git a/deployment_scripts/puppet/modules/kaminario/files/exception.sh b/deployment_scripts/puppet/modules/kaminario/files/exception.sh
index a5993e6..529c739 100644
--- a/deployment_scripts/puppet/modules/kaminario/files/exception.sh
+++ b/deployment_scripts/puppet/modules/kaminario/files/exception.sh
@@ -1,2 +1,3 @@
1grep -q -F 'Kaminario' /usr/lib/python2.7/dist-packages/cinder/exception.py || sudo sed -i '$a \ \ \n\nclass KaminarioCinderDriverException(VolumeDriverException):\n\ \message = _("KaminarioCinderDriver failure: %(reason)s")\n\n\nclass KaminarioRetryableException(VolumeDriverException):\n\ \message = _("Kaminario retryable exception: %(reason)s")' /usr/lib/python2.7/dist-packages/cinder/exception.py 1grep -q -F 'Kaminario' /usr/lib/python2.7/dist-packages/cinder/exception.py || \
2 2sudo sed -i '$a \ \ \n\nclass KaminarioCinderDriverException(VolumeDriverException):\n\ \message = _("KaminarioCinderDriver failure: %(reason)s")\n\n\nclass KaminarioRetryableException(VolumeDriverException):\n\ \message = _("Kaminario retryable exception: %(reason)s")' \
3/usr/lib/python2.7/dist-packages/cinder/exception.py
diff --git a/deployment_scripts/puppet/modules/kaminario/manifests/controller_config.pp b/deployment_scripts/puppet/modules/kaminario/manifests/controller_config.pp
index ceb35e0..c3bfa61 100644
--- a/deployment_scripts/puppet/modules/kaminario/manifests/controller_config.pp
+++ b/deployment_scripts/puppet/modules/kaminario/manifests/controller_config.pp
@@ -30,9 +30,14 @@ $plugin_settings = hiera('cinder_kaminario')
30 30
31 cinder_config { 31 cinder_config {
32 'DEFAULT/default_volume_type' : value => $default_volume_type 32 'DEFAULT/default_volume_type' : value => $default_volume_type
33 }~> Exec[cinder_api] 33 }
34
35exec {'cinder_api':
36 command => '/usr/sbin/service cinder-api restart',}
37 34
35service { 'cinder_api':
36 ensure => running,
37 name => cinder-api,
38 enable => true,
39 hasstatus => true,
40 hasrestart => true,
41}
42Cinder_config<||> ~> Service['cinder-api']
38} 43}