volume-map and volume-ephemeral-storage should error out if one of the two wasn't specified
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
postgresql (Juju Charms Collection) |
New
|
Undecided
|
Unassigned |
Bug Description
While trying to use a nova volume as the storage of the charm, I ended up with the postgresql unit in a error state.
It happened because I first set the volume-map key to something like {postgresql/0: vol-000001} and only then I set volume-
Steps to reproduce:
1) Deploy the PostgreSQL charm with: juju deploy postgresql
2) Attach the nova volume to the PostgreSQL unit instance id under /dev/vdc
3) Run: juju set postgresql volume-
4) Run: juju set postgresql volume-
5) Run: juju status
Verify that the PostgreSQL unit is in error state as the following:
agent-state-info: 'hook failed: "config-changed"'
6) Run: juju resolved --retry postgresql/0
The unit will remain in the same error state.
It turns out that if both key/values are set at once, it works. So by deploying in the following order works as expected.
1) Deploy the PostgreSQL charm with: juju deploy postgresql
2) Attach the nova volume to the PostgreSQL unit instance id under /dev/vdc
3) Run: juju set postgresql volume-
'juju status' should report no errors this time.