tripleo-common/tripleo_common
Oliver Walsh c1af9b7ad9 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
(cherry picked from commit 662b0acd91)

Change-Id: Ifa41bfcb921496978f82aee4e67fdb419cf9ffc5
2020-11-18 12:11:44 +00:00
..
actions Match hostname when doing node delete 2020-05-05 14:11:58 +00:00
filters Add logging to capabilities filter 2017-09-20 17:50:42 +00:00
image Merge "Handle race for the already existing layer" into stable/stein 2020-03-23 23:07:20 +00:00
releasenotes/notes Wire in parameters.convert_docker_params 2019-04-10 13:25:39 -04:00
templates Escape invalid JSON characters during deployment. 2019-11-22 13:06:25 -05:00
tests Update the ceph container url to quay.io 2020-10-22 09:22:49 +05:30
utils Improve step task check to cater for whitespace 2020-03-06 21:42:11 +00:00
__init__.py Add ReNo support 2017-01-12 12:06:02 +00:00
arch.py Default to host CPU architecture if none is supplied 2017-08-05 09:11:20 +10:00
constants.py config: refactor how per step tasks are generated 2020-02-06 09:50:47 +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 2020-11-18 12:11:44 +00:00
update.py Handle swift interactions are strings as necessary 2019-03-01 15:45:56 -07:00