charm can block itself if the installation hook fails after installing packages
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
PostgreSQL Charm |
New
|
Undecided
|
Unassigned |
Bug Description
I have postgresql units deployed that are stuck in a "blocked" state with the message, "
PostgreSQL config from previous install found at /etc/postgresql
Looking through the unit logs what appears to have happened is that the install hook failed with an unrelated error enabling wal-e:
2021-08-11 16:32:09 WARNING unit.postgresql
nv', '/snap/
2021-08-11 16:32:09 ERROR juju.worker.
This appears to have caused the charm to get into a confused state, where it installed the postgresql apt packages, but didn't update its own state to remember that. Then when it attempted to retry the install it found the postgresql data directory that it created an misattributed it to being a previous installation.