Reported by customer c478:
Customer reported an AIO installation failure:
While running "cfy_manager install", we encountered "2020-02-18 18:56:01,507 - [MAIN] - ERROR - ProcessExecutionError: Failed running command: sudo -E -u postgres /usr/bin/psql -t -X -c SELECT COUNT FROM managers where hostname='zldcmtn23aecc1d41mngr01' (could not change directory to "/home/REDACTED": Permission denied
ERROR: relation "managers" does not exist
LINE 1: SELECT COUNT FROM managers where hostname='zldcmtn23aecc1...
We had a Zoom session and started with a fresh VM. We encountered the following error during installation:
2020-02-19 15:10:12,151 - [MAIN] - ERROR - InitializationError: Status reporter is not installed, path does not exist: /opt/status-reporter/status_reporter_configuration.yaml
The customer advised they had manually fixed that earlier and continued. We did the same and ran into the same database error. Permissions issues, specifically umask = 0027, resulted in the database not being configured.
Should be easily reproducable with umask 0027.
OS (CLI), HA cluster, cloud provider
Steps to reproduce:
sudo usermod -aG wheel,adm,systemd-journal <INSTALL-USER>
logout and back in
proceed with normal installation
Update: This isn’t a umask issue, instead it’s an issue with us assuming the installation user will be a member of the adm group and still expecting os.path.exists to work when the user isn’t.
This can be fixed by making the check for file existence use sudo instead of the python stdlib.
We determined that there are two workarounds for 5.0.5:
Make sure the installation user is a member of the adm group.
Run the install using sudo.
The second approach makes cfy not work as the installation user unless the profile is manually copied or created afterwards, but the manager itself works without issue.
Fix has been merged to master, will be tested after the next automatic build.
Tested with no adm group membership and confirmed working.