leader-settings-changed error when deploying a 2-unit cluster
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
PostgreSQL Charm |
Fix Released
|
High
|
Stuart Bishop | ||
postgresql (Juju Charms Collection) |
Triaged
|
High
|
Unassigned |
Bug Description
When deploying a postgresql cluster having 2 units, a master and a slave, the deployment failed with a leader-
2016-01-28 13:50:21 DEBUG juju-log Not the master
2016-01-28 13:50:21 INFO juju-log ** Action leader-
2016-01-28 13:50:21 INFO leader-
2016-01-28 13:50:21 INFO leader-
2016-01-28 13:50:21 INFO leader-
2016-01-28 13:50:21 INFO leader-
2016-01-28 13:50:21 INFO leader-
2016-01-28 13:50:21 INFO leader-
2016-01-28 13:50:21 INFO leader-
2016-01-28 13:50:21 INFO leader-
2016-01-28 13:50:21 INFO leader-
2016-01-28 13:50:21 INFO leader-
2016-01-28 13:50:21 INFO leader-
2016-01-28 13:50:21 INFO leader-
2016-01-28 13:50:21 INFO leader-
2016-01-28 13:50:21 INFO leader-
2016-01-28 13:50:21 INFO leader-
2016-01-28 13:50:21 INFO leader-
2016-01-28 13:50:21 INFO leader-
2016-01-28 13:50:21 INFO leader-
This was using Juju 1.24.7 and r141 of lp:charms/trusty/postgresql.
tags: | added: kanban-cross-team |
Changed in postgresql-charm: | |
status: | New → Fix Released |
importance: | Undecided → High |
assignee: | nobody → Stuart Bishop (stub) |
Changed in postgresql (Juju Charms Collection): | |
assignee: | Stuart Bishop (stub) → nobody |
This is a race, where the charm has been granted restart permission but has not yet joined the peer relation with the master. It should wait in this situation, but instead continues and starts PostgreSQL before the master has been cloned. This causes the clone operation to fail in a later hook, as it is being very careful not to risk data.
I suspect this is fixed naturally as part of the charms.reactive rework - lp:~stub/charms/trusty/postgresql/built if you want to test that.
2016-01-28 13:50:13 INFO juju-log ** Action leader- settings- changed/ handle_ storage_ relation settings- changed/ update_ wal_e_env_ dir settings- changed/ request_ restart settings- changed/ wait_for_ restart settings- changed/ remount settings- changed/ restart_ or_reload
2016-01-28 13:50:13 INFO juju-log ** Action leader-
2016-01-28 13:50:13 INFO juju-log ** Action leader-
2016-01-28 13:50:13 INFO juju-log Restart already requested
2016-01-28 13:50:13 INFO juju-log ** Action leader-
2016-01-28 13:50:13 DEBUG juju-log Not the master
2016-01-28 13:50:13 INFO juju-log ** Action leader-
2016-01-28 13:50:13 INFO juju-log Not yet joined peer relation with postgresql/1 - skipping
2016-01-28 13:50:13 INFO juju-log Not yet joined peer relation with postgresql/1 - skipping
2016-01-28 13:50:13 INFO juju-log ** Action leader-
2016-01-28 13:50:13 INFO juju-log maintenance: Starting PostgreSQL
2016-01-28 13:50:16 INFO juju-log maintenance: Started
2016-01-28 13:50:17 DEBUG juju-log Not the master
2016-01-28 13:50:17 DEBUG juju-log Not the master