Comment 3 for bug 1654116

Revision history for this message
David Ames (thedac) wrote :

This would appear to be a change in Juju behavior for leader-set in juju 2.1b3.

Any charm that uses peer storage will be affected by this.

The charm-helper code that is affected [1] checks for the NotImplementedError. Which is dependent on leader_set [2] throwing NotImplimentedError. Which is checking for OSError. It is very likely that something other than OSError is returned.

We do not appear to be checking for leadership in our charms before attempting leader-set. This was an extension of the old peer storage that straddled the initial implementation of leadership in juju.

It may now be safe to assume leadership functionality is available which may clean some of this up. But we may now need to check is_leader before any leader-set commands are run.

[1] http://bazaar.launchpad.net/~charm-helpers/charm-helpers/devel/view/head:/charmhelpers/contrib/peerstorage/__init__.py#L133
[2] http://bazaar.launchpad.net/~charm-helpers/charm-helpers/devel/view/head:/charmhelpers/core/hookenv.py#L893