]> review.fuel-infra Code Review - puppet-modules/puppet-ceilometer.git/commitdiff
Fix nova notifications
authorFrançois Charlier <fcharlier@ploup.net>
Fri, 21 Dec 2012 22:39:43 +0000 (23:39 +0100)
committerFrançois Charlier <fcharlier@ploup.net>
Fri, 21 Dec 2012 22:42:06 +0000 (23:42 +0100)
Apply nova commit 670b3882 to get notifications on the right
control_exchange

files/patches/670b3882-fix-rpc-control_exchange-regression.patch [new file with mode: 0644]
manifests/init.pp

diff --git a/files/patches/670b3882-fix-rpc-control_exchange-regression.patch b/files/patches/670b3882-fix-rpc-control_exchange-regression.patch
new file mode 100644 (file)
index 0000000..d54e4be
--- /dev/null
@@ -0,0 +1,12 @@
+--- a/nova/flags.py
++++ b/nova/flags.py
+@@ -425,6 +425,9 @@ global_opts = [
+                    'include: libvirt.LibvirtDriver, xenapi.XenAPIDriver, '
+                    'fake.FakeDriver, baremetal.BareMetalDriver, '
+                    'vmwareapi.VMWareESXDriver'),
++    cfg.StrOpt('control_exchange',
++               default='nova',
++               help='AMQP exchange to connect to if using RabbitMQ or Qpid'),
+ ]
+ FLAGS.register_opts(global_opts)
index 064fcb0458ffbbebff680d6e88dc7b6c6b5d125e..c43a2a598ff1b8d1087334b3e3e2035897022e80 100644 (file)
@@ -74,4 +74,19 @@ class ceilometer(
     'DEFAULT/notification_topics'    : value => 'notifications,glance_notifications';
   }
 
+  file { '/tmp/670b3882-fix-rpc-control_exchange-regression.patch':
+    source => 'puppet:///modules/ceilometer/patches/670b3882-fix-rpc-control_exchange-regression.patch'
+  }
+
+  exec { 'patch_nova':
+    command => 'patch -p1 < /tmp/670b3882-fix-rpc-control_exchange-regression.patch',
+    unless  => 'grep -q control_exchange /usr/share/pyshared/nova/flags.py',
+    cwd     => '/usr/share/pyshared',
+    require => Package['python-nova'],
+  }
+
+  Exec['patch_nova'] ~> Service<| title == 'nova-api' |>
+  Exec['patch_nova'] ~> Service<| title == 'nova-compute' |>
+  Exec['patch_nova'] ~> Service<| title == 'nova-network' |>
+
 }