Remove dynamic scoping with File from class nova.
Resource defaults are applied to all file resources in class nova using File. In some circumstances the scope of these defaults becomes too wide, causing a dependency cycle. This commit removes the dynamic scoping and instead explicitly defines the parameters of each file resource to avoid creating dependency cycles. Functionality should otherwise be identical. Change-Id: I41d85e65ea73c54ce1a8be292ef3f781e17e48a7 Closes-Bug: 1349765
This commit is contained in:
@@ -394,10 +394,11 @@ class nova(
|
||||
|
||||
if $nova_public_key or $nova_private_key {
|
||||
file { '/var/lib/nova/.ssh':
|
||||
ensure => directory,
|
||||
mode => '0700',
|
||||
owner => nova,
|
||||
group => nova,
|
||||
ensure => directory,
|
||||
mode => '0700',
|
||||
owner => 'nova',
|
||||
group => 'nova',
|
||||
require => Package['nova-common'],
|
||||
}
|
||||
|
||||
if $nova_public_key {
|
||||
@@ -433,9 +434,9 @@ class nova(
|
||||
file { $nova_private_key_file:
|
||||
content => $nova_private_key[key],
|
||||
mode => '0600',
|
||||
owner => nova,
|
||||
group => nova,
|
||||
require => File['/var/lib/nova/.ssh'],
|
||||
owner => 'nova',
|
||||
group => 'nova',
|
||||
require => [ File['/var/lib/nova/.ssh'], Package['nova-common'] ],
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -448,12 +449,6 @@ class nova(
|
||||
Package['nova-common'] -> Nova_config<| |> -> File['/etc/nova/nova.conf']
|
||||
Nova_config<| |> ~> Exec['post-nova_config']
|
||||
|
||||
File {
|
||||
require => Package['nova-common'],
|
||||
owner => 'nova',
|
||||
group => 'nova',
|
||||
}
|
||||
|
||||
# TODO - see if these packages can be removed
|
||||
# they should be handled as package deps by the OS
|
||||
package { 'python':
|
||||
@@ -484,7 +479,10 @@ class nova(
|
||||
}
|
||||
|
||||
file { '/etc/nova/nova.conf':
|
||||
mode => '0640',
|
||||
mode => '0640',
|
||||
owner => 'nova',
|
||||
group => 'nova',
|
||||
require => Package['nova-common'],
|
||||
}
|
||||
|
||||
# used by debian/ubuntu in nova::network_bridge to refresh
|
||||
@@ -647,6 +645,9 @@ class nova(
|
||||
file { $log_dir_real:
|
||||
ensure => directory,
|
||||
mode => '0750',
|
||||
owner => 'nova',
|
||||
group => 'nova',
|
||||
require => Package['nova-common'],
|
||||
}
|
||||
nova_config { 'DEFAULT/log_dir': value => $log_dir_real;}
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user