When using the install.yml playbook for a local docker install, the postgres database is placed in /tmp/pgdocker. On CentOS/RedHat machines, tmpclean will remove these files within a few weeks, rendering the database inoperable.
Run a regular local docker install.
Expected the postgres database to be placed somewhere safer, or for there to be a safer default value.
Leaving the value unset and having a volume within the postgres docker container seems preferable to declaring /tmp/pgdocker by default.
I believe this was discuss in IRC and the answer was that if you want to save your db then use an external db.
or just modify the directory in the inventory file to put it in another location.
I hope you'll reconsider. A user that doesn't read through all of the install vars or accepts that setting at face value will have a non-functioning install within a couple of weeks because of systemd-tmpfiles.service (on CentOS/RHEL 7, at least).
Hello dantheta,
Thanks for reaching out.
We absolutely expect users to read the INSTALL.md in its entirety before installing awx. The INSTALL.md deliberately instructs the reader to review the inventory file and its variables before building or installing awx for exactly this purpose.
We absolutely expect users to read the INSTALL.md in its entirety before installing awx.
Found at customer site:
$ du -sch /tmp/pgdocker
2.5G /tmp/pgdocker
2.5G total
The documentation states:
https://github.com/ansible/awx/blob/devel/INSTALL.md#postgresql-1
AWX requires access to a PostgreSQL database, and by default, one will be created and deployed in a container, and data will be persisted to a host volume. In this scenario, you must set the value of postgres_data_dir to a path that can be mounted to the container. When the container is stopped, the database files will still exist in the specified path.
I have 2 issues with this:
I'd like to see the play fail with a meaningful error message if postgres_data_dir is not set and if you want to keep a default value for that directory for some reason, I'd propose something in /srv but definitely not /tmp as this is not a place that persists data by default.
Most helpful comment
Found at customer site:
$ du -sch /tmp/pgdocker 2.5G /tmp/pgdocker 2.5G totalThe documentation states:
https://github.com/ansible/awx/blob/devel/INSTALL.md#postgresql-1
I have 2 issues with this:
I'd like to see the play fail with a meaningful error message if
postgres_data_diris not set and if you want to keep a default value for that directory for some reason, I'd propose something in/srvbut definitely not/tmpas this is not a place that persists data by default.