revert to working database system when wal-e-restore fails
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
PostgreSQL Charm |
Triaged
|
High
|
Unassigned |
Bug Description
When restoring a new postgresql server from the PITR backup of another fails the new database system is left broken.
Not sure why the wal-e-restore failed, but the database system is left in a broken state following an attempted restore.
$ juju run-action pg-test/0 --wait wal-e-restore storage-
unit-pg-test-0:
id: 80cbbcd5-
status: completed
timing:
completed: 2018-07-19 21:08:00 +0000 UTC
enqueued: 2018-07-19 21:07:45 +0000 UTC
started: 2018-07-19 21:07:45 +0000 UTC
unit: pg-test/0
Also, the action status reads 'completed' even though the action failed.
cat /var/log/
summary: |
- revert to working database system if wal-e-restore fails + revert to working database system when wal-e-restore fails |
The recovery_ target_ time in recovery.conf was set to an invalid value:
recovery_ target_ time='2018- 07-18 13:22.00.00000+00'
Possibly a locale issue? In any case, it should be validated before writing recovery.conf and destroying the database.