Move nova host discovery to a new controller_post step
Currently, host discovery is executed from the compute nodes after each compute setup. This will be a problem in future as it requires db access and credentials in nova config file in the compute nodes which is not recommended and will be forbiden in future [1]. This patch is removing it from the compute.pp template and moving it to a new step controller_post that will be executed in the controller after executing the rest of puppet manifests. [1] http://lists.openstack.org/pipermail/openstack-discuss/2020-November/018875.html Change-Id: I3ed2780b55ff6944aa7bf40f259f9c4e03389373
This commit is contained in:
parent
19c71e92d1
commit
2086672ae4
|
@ -265,6 +265,10 @@ def prepare_puppet_modules(config, messages):
|
|||
manifestfile = "%s_compute.pp" % host
|
||||
appendManifestFile(manifestfile, manifestdata, marker='compute')
|
||||
|
||||
manifestdata = getManifestTemplate("controller_post")
|
||||
manifestfile = "%s_controller_post.pp" % config['CONFIG_CONTROLLER_HOST']
|
||||
appendManifestFile(manifestfile, manifestdata, marker='controller')
|
||||
|
||||
|
||||
def finalize(config, messages):
|
||||
for hostname in filtered_hosts(config):
|
||||
|
|
|
@ -94,10 +94,6 @@ class packstack::nova::compute ()
|
|||
passthrough => hiera('CONFIG_NOVA_PCI_PASSTHROUGH_WHITELIST')
|
||||
}
|
||||
|
||||
include ::nova::cell_v2::discover_hosts
|
||||
|
||||
Class['nova::compute'] ~> Class['nova::cell_v2::discover_hosts']
|
||||
|
||||
# Tune the host with a virtual hosts profile
|
||||
ensure_packages(['tuned'], {'ensure' => 'present'})
|
||||
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
stage { "init": before => Stage["main"] }
|
||||
|
||||
Exec { timeout => hiera('DEFAULT_EXEC_TIMEOUT') }
|
||||
Package { allow_virtual => true }
|
||||
|
||||
class {'::packstack::prereqs':
|
||||
stage => init,
|
||||
}
|
||||
|
||||
include ::nova::cell_v2::discover_hosts
|
||||
|
||||
notify {'Discovering compute nodes': } ~> Class['nova::cell_v2::discover_hosts']
|
||||
|
||||
|
Loading…
Reference in New Issue