Skip to content
This repository has been archived by the owner on Mar 6, 2023. It is now read-only.

Wrong home directory for the prometheus user #166

Closed
ptselios-inmarsat opened this issue Dec 20, 2018 · 7 comments
Closed

Wrong home directory for the prometheus user #166

ptselios-inmarsat opened this issue Dec 20, 2018 · 7 comments

Comments

@ptselios-inmarsat
Copy link

The home directory of the prometheus user is /tmp.
Since this is a system user the home directory should either be the directory of the application or the /dev/null.

@paulfantom
Copy link
Member

paulfantom commented Dec 20, 2018

Previously it wasn't set to anything, but after #153 we changed this behavior.

@michalklempa Would setting /dev/null as prometheus user home directory will work on GCE?

@ptselios-inmarsat
Copy link
Author

Meaning, if I already have prometheus up and running and run the playbook again, it will fail since the ansible's user module will try to chmod the user's home directory and it will fail since the home directory will be /home/prometheus, it tries to change it to /tmp and prometheus is running...

@paulfantom
Copy link
Member

paulfantom commented Dec 20, 2018

Oh, so this is a problem with an upgrade path and not with result itself, got it. I will add a warning in readme and release notes about this problem with a simplest possible solution:

switch prometheus off before an upgrade

@ptselios-inmarsat
Copy link
Author

Hmmm
It's not that simple, unfortunately. I removed my AWS instances and recreated them from scratch.
It failed.
Also, I just run the playbook in order to make sure that the systems are in the desired state. It failed again.
My solution was manually change the entry in the /etc/passwd

@paulfantom
Copy link
Member

paulfantom commented Dec 20, 2018

That is strange. We are running automated daily deployments of our roles against one server (demo.cloudalchemy.org) and it didn't show any signs of problems. As a test I just run this role against vanilla fedora 29 server in digital ocean and it also went ok.

Which ansible version you are using?

@ptselios-inmarsat
Copy link
Author

My setup is CentOS 7 in AWS deployed through Ansible Tower 3.3.1

@lock
Copy link

lock bot commented Mar 24, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked and limited conversation to collaborators Mar 24, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants