tripleo-common/tripleo_common
Oliver Walsh 8afc5d23cd Ensure tripleo ansible inventory file update is atomic
Multiple python-tripleoclient commands can run concurrently
and all attempt to update the same inventory file in
~/tripleo-ansible-inventory.yaml. Make the update atomic to
ensure the inventory file is always complete/valid.

(cherry picked from commit 8e082f45dd)

(squashing commits as the 1st patch is failing in the stein gate without
the fix from the 2nd patch)

Ensure atomic inventory file rename runs on the same mountpoint

Linux rename system call is only supported on the same mountpoint [1].
/tmp is often a tmpfs mount, so instead generate the temp inventory file in
the same directory as the target inventory file.

[1] See EXDEV in https://man7.org/linux/man-pages/man2/rename.2.html

Closes-bug: #1892008

Change-Id: Ifa41bfcb921496978f82aee4e67fdb419cf9ffc5
(cherry picked from commit 77a0c827cb)
2021-03-19 13:54:02 +01:00
..
actions [stable-only] Fix legacy password handling 2021-03-11 08:52:21 +05:30
filters Add logging to capabilities filter 2017-09-20 17:50:42 +00:00
image Update the ceph container url to quay.io 2020-10-22 14:34:22 +00:00
releasenotes/notes Retry previously failed deployments 2018-07-13 12:40:27 -04:00
templates Escape invalid JSON characters during deployment. 2019-11-22 13:10:42 -05:00
tests [stable-only] Fix legacy password handling 2021-03-11 08:52:21 +05:30
utils Prevent duplicated hosts in overcloudrc no_proxy 2020-05-27 16:58:13 -04:00
__init__.py Add ReNo support 2017-01-12 12:06:02 +00:00
_stack_update.py Prompt to clear breakpoints when using deployed-server 2017-08-02 18:05:32 -04:00
arch.py Default to host CPU architecture if none is supplied 2017-08-05 09:11:20 +10:00
constants.py Add passphrase generation for Octavia 2019-05-29 11:58:53 +00:00
exception.py Fail config-download when group:os-apply-config used 2018-01-05 15:58:14 -05:00
i18n.py Update the documentation link for doc migration 2017-07-25 15:00:27 +08:00
inventory.py Ensure tripleo ansible inventory file update is atomic 2021-03-19 13:54:02 +01:00
update.py Refresh DeployIdentifier as well on update 2016-10-14 15:12:55 -04:00