Adjust scope of neutron agent notify

Shift notify under if condition to meet service resource relationship.
Also function has been modified to exclude creation
files with :: symbols.

Change-Id: I2cbf9c4b2c7a9796b7b7ab53733cc489b03e533b
Related-Bug: #1613724
Closes-bug: #1658952
This commit is contained in:
Michael Polenchuk 2017-01-25 12:27:00 +04:00 committed by Vladimir Kuklin
parent 6cb0342ed8
commit 15be3f5f13
3 changed files with 11 additions and 14 deletions

View File

@ -51,10 +51,9 @@ class openstack_tasks::openstack_network::agents::l3 {
ensure => 'installed',
}
}
if is_file_updated('/etc/neutron/neutron.conf', $title) {
notify{'neutron.conf has been changed, going to restart l3 agent':
} ~> Service['neutron-l3']
if is_file_updated('/etc/neutron/neutron.conf', $title) {
notify{'neutron.conf has been changed, going to restart l3 agent':
} ~> Service['neutron-l3']
}
}
}

View File

@ -55,10 +55,9 @@ class openstack_tasks::openstack_network::agents::metadata {
ensure => 'installed',
}
}
if is_file_updated('/etc/neutron/neutron.conf', $title) {
notify{'neutron.conf has been changed, going to restart neutron metadata':
} ~> Service['neutron-ovs-metadata']
if is_file_updated('/etc/neutron/neutron.conf', $title) {
notify{'neutron.conf has been changed, going to restart neutron metadata':
} ~> Service['neutron-metadata']
}
}
}

View File

@ -8,11 +8,10 @@ module Puppet::Parser::Functions
EOS
) do |args|
file = args[0]
entity = args[1]
file, entity = args
store_dir = "/var/cache/fuel/#{entity}"
store_file = "#{File.basename(file).gsub('/','___')}"
store_dir = "/var/cache/fuel/#{entity.gsub('::','_')}"
store_file = "#{File.basename(file)}"
fullpath = "#{store_dir}/#{store_file}"
FileUtils.mkdir_p store_dir