unit-ceph-mon-2: 12:48:36 INFO unit.ceph-mon/2.juju-log mds:4: Processing 3 ceph broker requests
unit-ceph-mon-1: 12:49:37 INFO unit.unit-ceph-mon-1.collect-metrics error: not implemented for restricted context not implemented
unit-ceph-mon-1: 12:49:37 INFO unit.unit-ceph-mon-1.collect-metrics error: not implemented for restricted context not implemented
unit-ceph-mon-1: 12:49:37 INFO unit.unit-ceph-mon-1.collect-metrics error: not implemented for restricted context not implemented
unit-ceph-mon-1: 12:49:37 INFO unit.unit-ceph-mon-1.collect-metrics error: not implemented for restricted context not implemented
unit-ceph-mon-1: 12:49:37 INFO unit.unit-ceph-mon-1.collect-metrics error: leadership status unknown: not implemented for restricted context not implemented
unit-ceph-mon-1: 12:49:37 INFO unit.unit-ceph-mon-1.collect-metrics Traceback (most recent call last):
unit-ceph-mon-1: 12:49:37 INFO unit.unit-ceph-mon-1.collect-metrics File "/var/lib/juju/agents/unit-ceph-mon-1/charm/hooks/collect-metrics", line 669, in <module>
unit-ceph-mon-1: 12:49:37 INFO unit.unit-ceph-mon-1.collect-metrics hooks.execute(sys.argv)
unit-ceph-mon-1: 12:49:37 INFO unit.unit-ceph-mon-1.collect-metrics File "/var/lib/juju/agents/unit-ceph-mon-1/charm/hooks/charmhelpers/core/hookenv.py", line 731, in execute
unit-ceph-mon-1: 12:49:37 INFO unit.unit-ceph-mon-1.collect-metrics self._hooks[hook_name]()
unit-ceph-mon-1: 12:49:37 INFO unit.unit-ceph-mon-1.collect-metrics File "/var/lib/juju/agents/unit-ceph-mon-1/charm/hooks/collect-metrics", line 121, in collect_metrics
unit-ceph-mon-1: 12:49:37 INFO unit.unit-ceph-mon-1.collect-metrics if not is_leader():
unit-ceph-mon-1: 12:49:37 INFO unit.unit-ceph-mon-1.collect-metrics File "/var/lib/juju/agents/unit-ceph-mon-1/charm/hooks/charmhelpers/core/hookenv.py", line 853, in inner_translate_exc2
unit-ceph-mon-1: 12:49:37 INFO unit.unit-ceph-mon-1.collect-metrics return f(*args, **kwargs)
unit-ceph-mon-1: 12:49:37 INFO unit.unit-ceph-mon-1.collect-metrics File "/var/lib/juju/agents/unit-ceph-mon-1/charm/hooks/charmhelpers/core/hookenv.py", line 883, in is_leader
unit-ceph-mon-1: 12:49:37 INFO unit.unit-ceph-mon-1.collect-metrics return json.loads(subprocess.check_output(cmd).decode('UTF-8'))
unit-ceph-mon-1: 12:49:37 INFO unit.unit-ceph-mon-1.collect-metrics File "/usr/lib/python2.7/subprocess.py", line 574, in check_output
unit-ceph-mon-1: 12:49:37 INFO unit.unit-ceph-mon-1.collect-metrics raise CalledProcessError(retcode, cmd, output=output)
unit-ceph-mon-1: 12:49:37 INFO unit.unit-ceph-mon-1.collect-metrics subprocess.CalledProcessError: Command '['is-leader', '--format=json']' returned non-zero exit status 1
Looks like is_leader does not work in the collect-metrics hook in juju 2.1 beta5 at least.