From 204853a12195418152e7f06886ccd747c30cf9c6 Mon Sep 17 00:00:00 2001 From: Bogdan Dobrelya Date: Fri, 31 Jul 2015 16:30:01 +0200 Subject: [PATCH] Add exec post config and network refresh to n-compute Signed-off-by: Bogdan Dobrelya --- resources/nova_compute_puppet/actions/remove.pp | 16 ++++++++++++++++ resources/nova_compute_puppet/actions/run.pp | 15 +++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/resources/nova_compute_puppet/actions/remove.pp b/resources/nova_compute_puppet/actions/remove.pp index fe4757a6..a8a07fb0 100644 --- a/resources/nova_compute_puppet/actions/remove.pp +++ b/resources/nova_compute_puppet/actions/remove.pp @@ -1,4 +1,20 @@ class { 'nova::compute': ensure_package => 'absent', enabled => false, +} + +include nova::params + +exec { 'post-nova_config': + command => '/bin/echo "Nova config has changed"', + refreshonly => true, +} + +exec { 'networking-refresh': + command => '/sbin/ifdown -a ; /sbin/ifup -a', +} + +package { 'nova-common': + name => $nova::params::common_package_name, + ensure => 'absent', } \ No newline at end of file diff --git a/resources/nova_compute_puppet/actions/run.pp b/resources/nova_compute_puppet/actions/run.pp index 3ae0c9f5..8c33baa1 100644 --- a/resources/nova_compute_puppet/actions/run.pp +++ b/resources/nova_compute_puppet/actions/run.pp @@ -46,4 +46,19 @@ class { 'nova::compute': default_availability_zone => $default_availability_zone, default_schedule_zone => $default_schedule_zone, internal_service_availability_zone => $internal_service_availability_zone, +} + +exec { 'networking-refresh': + command => '/sbin/ifdown -a ; /sbin/ifup -a', +} + +exec { 'post-nova_config': + command => '/bin/echo "Nova config has changed"', +} + +include nova::params + +package { 'nova-common': + name => $nova::params::common_package_name, + ensure => $ensure_package, } \ No newline at end of file