compute: restart OVS agent on neutron.conf changes
authorEmilien Macchi <emilien@redhat.com>
Tue, 29 Mar 2016 19:25:20 +0000 (15:25 -0400)
committerEmilien Macchi <emilien@redhat.com>
Tue, 29 Mar 2016 19:27:12 +0000 (15:27 -0400)
Some options in neutron.conf are used bu OVS agent, like logging &
messaging.
During the upgrade process, you need to restart the agent if these
options change.

We could patch puppet-neutron to add a notify, but the community won't
like it because Neutron OVS agent is not able to restart gracefully
until [1] got merged. Until that, we can fix it in TripleO, where we
suppose Puppet runs happenning during bootstraps and upgrades.

Later, we'll drop this code from here and move it in puppet-neutron.

[1] https://review.openstack.org/#/c/297211

Change-Id: I02b17b66e93331ddfb1a7abd8adff672bc7a32d6
Closes-Bug: #1563437

puppet/manifests/overcloud_compute.pp

index 13ae31c..4f63d25 100644 (file)
@@ -154,6 +154,16 @@ elsif hiera('neutron::core_plugin') == 'neutron_plugin_contrail.plugins.opencont
 }
 else {
 
+  # NOTE: this code won't live in puppet-neutron until Neutron OVS agent
+  # can be gracefully restarted. See https://review.openstack.org/#/c/297211
+  # In the meantime, it's safe to restart the agent on each change in neutron.conf,
+  # because Puppet changes are supposed to be done during bootstrap and upgrades.
+  # Some resource managed by Neutron_config (like messaging and logging options) require
+  # a restart of OVS agent. This code does it.
+  # In Newton, OVS agent will be able to be restarted gracefully so we'll drop the code
+  # from here and fix it in puppet-neutron.
+  Neutron_config<||> ~> Service['neutron-ovs-agent-service']
+
   include ::neutron::plugins::ml2
   include ::neutron::agents::ml2::ovs