tempest/releasenotes/notes/tempest-init-global-config-dir-location-changes-12260255871d3a2b.yaml
Matthew Treinish 3fe57b329c Fix the init command global conf dir path
This commit fixes how we use the global configuration path as part of
the tempest init command. The concept behind the global config dir is
that is used as an initial preseed of the local etc/ dirs that get
used in each workspace. However, right now the init command relies on
python packaging to try and figure out where this dir lives. This is
because we implicitly are relying on the data_files construct in the
python packaging ecosystem to create this global configuration dir.
This however is a mistake and causes nondeterminism and lots of bugs
because python packaging is never consistent in how it handles these.

Instead of futily attempting to guess where python might put the data
files and hoping that we got it right, this commit switches to an
opinionated stance on where these directories live, it becomes a
documented set of places and the burden is switched to the installer
and or user to make sure these directories are correctly populated.
While this requires an extra step in some installation scenarios it's
a necessary extra step to ensure things actually work. As part of
this change it was also necessary to update certain functions to be
more resilient against the absence of any files in the global config
dir.

Partially-Implements: bp tempest-run-cmd
Change-Id: Ic4e67362db053848e6ad03b0eae9e55faa87766f
2016-06-23 14:27:25 +00:00

13 lines
765 B
YAML

---
upgrade:
- The location on disk that the *tempest init* command looks for has changed.
Previously it would attempt to use python packaging's data files to guess
where setuptools/distutils were installing data files, which was incredibly
unreliable and depended on how you installed tempest and which versions of
setuptools, distutils, and python you had installed. Instead, now it will
use either /etc/tempest, $XDG_CONFIG_PATH/.config/tempest, or
~/.tempest/etc (attempted in that order). If none of these exist it will
create an empty ~/.tempest/etc directory. If you were relying on the
previous behavior and none of these directories were being used you will
need to move the files to live in one of these directories.