keystone nrpe relation throws python traceback
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
NRPE Charm |
Fix Released
|
Medium
|
Unassigned | ||
OpenStack Keystone Charm |
Fix Released
|
Medium
|
Haw Loeung |
Bug Description
While deploying Openstack with juju 1 and xenial, I've run into an odd problem relating the keystone charm to nrpe charm, it's throwing a python traceback:
2017-10-04 07:10:50 INFO nrpe-external-
2017-10-04 07:10:50 INFO nrpe-external-
joined", line 3, in <module>
2017-10-04 07:10:50 INFO nrpe-external-
2017-10-04 07:10:50 INFO nrpe-external-
2017-10-04 07:10:50 INFO nrpe-external-
2017-10-04 07:10:50 INFO nrpe-external-
2017-10-04 07:10:50 INFO nrpe-external-
2017-10-04 07:10:50 INFO nrpe-external-
2017-10-04 07:10:50 INFO nrpe-external-
2017-10-04 07:10:50 INFO nrpe-external-
2017-10-04 07:10:50 INFO nrpe-external-
2017-10-04 07:10:50 INFO nrpe-external-
2017-10-04 07:10:50 INFO nrpe-external-
2017-10-04 07:10:50 INFO nrpe-external-
2017-10-04 07:10:50 INFO nrpe-external-
2017-10-04 07:10:50 INFO nrpe-external-
2017-10-04 07:10:50 INFO nrpe-external-
2017-10-04 07:10:50 INFO nrpe-external-
2017-10-04 07:10:50 INFO nrpe-external-
2017-10-04 07:10:50 INFO nrpe-external-
2017-10-04 07:10:50 INFO nrpe-external-
2017-10-04 07:10:50 INFO nrpe-external-
2017-10-04 07:10:50 INFO nrpe-external-
2017-10-04 07:10:50 INFO nrpe-external-
2017-10-04 07:10:50 INFO nrpe-external-
2017-10-04 07:10:50 INFO nrpe-external-
2017-10-04 07:10:50 INFO nrpe-external-
2017-10-04 07:10:50 INFO nrpe-external-
2017-10-04 07:10:50 ERROR juju.worker.
This is only occuring with the keystone charm, none of the others are giving an error similar to this, and its happening across multiple redeploys of the charm.
Keystone is using charm version 17.02, nrpe is from lp:nrpe-charm.
Please let me know if you need any further information.
Changed in charm-keystone: | |
milestone: | none → 17.11 |
Changed in charm-keystone: | |
status: | Fix Committed → Fix Released |
Changed in nrpe-charm: | |
status: | In Progress → Triaged |
assignee: | Haw Loeung (hloeung) → nobody |
Changed in charm-nrpe: | |
status: | Triaged → Fix Released |
importance: | Undecided → Medium |
It looks like there is a specific code path for a subordinate to find out information about the principle for juju 1.X:
def principal_unit(): get('JUJU_ PRINCIPAL_ UNIT', None) 'JUJU_UNIT_ NAME'] ids(reltype) : unit(unit)
continue
subordinate = md.pop( 'subordinate' , None)
return unit
"""Returns the principal unit of this unit, otherwise None"""
# Juju 2.2 and above provides JUJU_PRINCIPAL_UNIT
principal_unit = os.environ.
# If it's empty, then this unit is the principal
if principal_unit == '':
return os.environ[
elif principal_unit is not None:
return principal_unit
# For Juju 2.1 and below, let's try work out the principle unit by
# the various charms' metadata.yaml.
for reltype in relation_types():
for rid in relation_
for unit in related_units(rid):
md = _metadata_
if not md:
if not subordinate:
return None
It looks like the principle is returning invalid yaml.