Comment 5 for bug 1539466

Revision history for this message
Stuart Bishop (stub) wrote :

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
2016-01-28 13:50:13 INFO juju-log ** Action leader-settings-changed/update_wal_e_env_dir
2016-01-28 13:50:13 INFO juju-log ** Action leader-settings-changed/request_restart
2016-01-28 13:50:13 INFO juju-log Restart already requested
2016-01-28 13:50:13 INFO juju-log ** Action leader-settings-changed/wait_for_restart
2016-01-28 13:50:13 DEBUG juju-log Not the master
2016-01-28 13:50:13 INFO juju-log ** Action leader-settings-changed/remount
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-settings-changed/restart_or_reload
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