Comment 4 for bug 1421595

Revision history for this message
Aleksandr Didenko (adidenko) wrote :

There is no need to add hooks. Such override files are handled via tweaks::ubuntu_service_override resource which has strict dependency:

File[$file_name] -> Package <| name == $package_name |> -> Exec[$exec_name]

File[$file_name] - creates override file
Exec[$exec_name] - removes override file

But I see no dependency between File and Package in the snapshot logs for 'cinder-volume'. This is possible only if Package <| name == $package_name |> resource is not found in the puppet catalogue.

We have tweaks::ubuntu_service_override for 'cinder-volume' in openstack::compute class but not in openstack::cinder.

So here's the root cause.

node-1 is multirole, deployment steps were:

1) puppet apply for compute role, evaluate openstack::compute class which has tweaks::ubuntu_service_override { 'cinder-volume':} in it. But it does not have Package['cinder-volume']. So remove exec evaluated before file was created:

2015-02-13T06:22:53.939259+00:00 info: (/Stage[main]/Openstack::Compute/Tweaks::Ubuntu_service_override[cinder-volume]/Exec[remove_cinder-volume_override]) Evaluated in 0.07 seconds
2015-02-13T06:22:54.021568+00:00 info: (/Stage[main]/Openstack::Compute/Tweaks::Ubuntu_service_override[cinder-volume]/File[create_cinder-volume_override]) Evaluated in 0.01 seconds

2) puppet apply for cinder role, evaluate openstack::cinder class which does not have tweaks::ubuntu_service_override { 'cinder-volume':} in it. So it just installed a package and /etc/init/cinder-volume.override was already there since previous deployment step (compute role).

Solution: move cinder-volume tweaks::ubuntu_service_override into appropriate class (from openstack::compute to openstack::cinder). We can also add direct dependency into tweaks::ubuntu_service_override definition:

File[$file_name] -> Package <| name == $package_name |> -> Exec[$exec_name]
File[$file_name] -> Exec[$exec_name]

just to make sure we remove override file even if package is not found.