Hiera override routines updated
- empty predefined_nets before deployment - create contrail-specific predefined_nets in post-deploy - disable netconfig on already deployed computes Change-Id: Ib62314e27541cbdb3ada42a682d6b28a0213f0fb Closes-bug: #1544580
This commit is contained in:
@@ -18,3 +18,13 @@ file { '/etc/apt/preferences.d/contrail-pin-110':
|
||||
ensure => file,
|
||||
source => 'puppet:///modules/contrail/contrail-pin-110',
|
||||
}
|
||||
|
||||
# Temporary dirty hack. Network configuration fails because of deployed contrail vrouter [FIXME]
|
||||
exec {'no_network_reconfigure':
|
||||
command => '/bin/echo "#NOOP here. Modified by contrail plugin" > /etc/puppet/modules/osnailyfacter/modular/netconfig/netconfig.pp',
|
||||
onlyif => '/usr/bin/test -f /opt/contrail/provision-vrouter-DONE'
|
||||
}
|
||||
exec {'no_openstack_network_reconfigure':
|
||||
command => '/bin/echo "#NOOP here. Modified by contrail plugin" > /etc/puppet/modules/osnailyfacter/modular/openstack-network/openstack-network-compute.pp',
|
||||
onlyif => '/usr/bin/test -f /opt/contrail/provision-vrouter-DONE'
|
||||
}
|
||||
|
||||
@@ -22,26 +22,27 @@ $plugin_yaml = "${plugin_name}.yaml"
|
||||
|
||||
$contrail_plugin = hiera('contrail', undef)
|
||||
|
||||
if ($contrail_plugin) {
|
||||
|
||||
file {'/etc/hiera/override':
|
||||
ensure => directory,
|
||||
}
|
||||
file_line {"${plugin_name}_hiera_override":
|
||||
path => '/etc/hiera.yaml',
|
||||
line => " - override/${plugin_name}",
|
||||
after => ' - override/module/%{calling_module}',
|
||||
} ->
|
||||
file {'/etc/hiera/override':
|
||||
ensure => directory,
|
||||
}
|
||||
|
||||
if empty($contrail::nets) {
|
||||
# Post-install
|
||||
file { "${hiera_dir}/${plugin_yaml}":
|
||||
ensure => file,
|
||||
content => template('contrail/plugins.yaml.erb'),
|
||||
require => File['/etc/hiera/override']
|
||||
}
|
||||
|
||||
package {'ruby-deep-merge':
|
||||
ensure => 'installed',
|
||||
} else {
|
||||
# Pre-install
|
||||
file { "${hiera_dir}/${plugin_yaml}":
|
||||
ensure => file,
|
||||
content => 'quantum_settings:\n predefined_networks: []',
|
||||
require => File['/etc/hiera/override']
|
||||
}
|
||||
|
||||
file_line {"${plugin_name}_hiera_override":
|
||||
path => '/etc/hiera.yaml',
|
||||
line => " - override/${plugin_name}",
|
||||
after => ' - override/module/%{calling_module}',
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user