7 Commits

Author SHA1 Message Date
Emilien Macchi
0b0553fdf7 Move instanceha into scripts
So we can clear out the extraconfig directory sometimes soon.

Change-Id: I8a5baeff456a569fb0e398b33dd90166d8720b41
2019-07-18 19:13:08 +00:00
James Slagle
79d9113e5d Use ansible for HostsConfig
Replace the HostsConfig SoftwareDeployment with an ansible task.

implements: blueprint reduce-deployment-resources
Change-Id: Ifd4bc4ce5618587c341ecbf37f82777ae6fc2f4a
2019-06-17 12:05:27 +00:00
Natal Ngétal
6e901b3d6b [Templates] Use str_replace for hosts.
There is a limit to how long input data can be for the heat script hook.

Change-Id: I48286e300874d7d8311d2ef14f95b6fc87ed579c
Closes-Bug: #1772673
2018-11-12 16:33:27 +01:00
Alex Schultz
e34cfb63d9 Cleanup hosts name on initial install
When we initially install our heat hosts configuration, we need to make
sure the short hostname for the host is not currently defined within the
hosts file as it will conflict with our definitions later in the file.

We only do this on initial installation as we don't want to touch the
file after the initial deployment outside of the matching host entries.
This also is restricted to just the short hostname which is consumed via
the configuration management for determining bootstrap configurations as
well as used by some services during startup (rabbitmq)

Change-Id: If55cf8f90ee7be4acd40fda1f72bb1f31d218b57
Related-Blueprint: all-in-one
2018-07-09 15:02:08 -06:00
Steven Hardy
92b238ea17 Avoid awk error in hosts-config.sh for large deployments
This ports the fixes made to the legacy 51-hosts script, which this
script is derived from, to tht.

See related t-i-e patch Ibe0a9f6ec10d55750e3b0e16301236141f988d69

Change-Id: Ide922af93a5d185bd592e220327326f1d244c4e2
Closes-Bug: #1674732
2017-04-07 10:50:39 +01:00
Steve Baker
f592e195e2 Don't rely on lsb_release for hosts template write
This is problematic for the containerised heat-agents, lsb_release has
to be bind-mounted in, and atomic host doesn't even have lsb_release
installed.

Instead just write to every /etc/cloud/templates/hosts.*.tmpl file.

Change-Id: If2aab7e9b1e03aa657baf1c33aa4392ef7044075
2016-12-08 20:09:26 +00:00
Dan Prince
f02742a981 Configure /etc/hosts via os-collect-config script
This patch moves the t-i-e element code for hosts configuration
into a t-h-t shell script that gets driven by a os-collect-config
script hook.

This helps accomplish several goals:

 - moves us away from t-i-e

 - gives us better signal handling in the error case (where the
   previous element relied on 99-refresh-completed

 - Allows the t-h-t undercloud installer to more easily consume this
   since it doesn't rely on the old os-apply-config metadata (which
   that installer doesn't support).

Change-Id: I73c3d4818ef531a3559fab272521f44519e2f486
2016-11-30 14:22:36 -05:00