Comment 3 for bug 1931632

Revision history for this message
Heitor (heitorpbittencourt) wrote :

Occasionally, this bug makes my units go into a weird state. Sometimes the relations are added but not accounted for.

I deployed the same bundle James described above. The relation for slurmdbd <-> slurmctld was added, as I can see it in `juju status --relations`), but the charms did not "see" them. I have the impression that the relation-created hook did not fire, because when I tried to manually relate the applications, juju gave an error saying the relation already exists.

I removed the relation and re-added it, to make the units run the relation-created functions, but I saw an error in the debug-log i've never seen before:

machine-140: 11:09:29 ERROR unit.slurmctld/35.juju-log slurmdbd:265: Uncaught exception while in charm code:
Traceback (most recent call last):
  File "./src/charm.py", line 403, in <module>
    main(SlurmctldCharm)
  File "/var/lib/juju/agents/unit-slurmctld-35/charm/venv/ops/main.py", line 404, in main
    framework.reemit()
  File "/var/lib/juju/agents/unit-slurmctld-35/charm/venv/ops/framework.py", line 732, in reemit
    self._reemit()
  File "/var/lib/juju/agents/unit-slurmctld-35/charm/venv/ops/framework.py", line 767, in _reemit
    custom_handler(event)
  File "/var/lib/juju/agents/unit-slurmctld-35/charm/src/interface_slurmrestd.py", line 54, in _on_relation_created
    if not self._charm.slurmdbd_info:
  File "./src/charm.py", line 84, in slurmdbd_info
    return self._slurmdbd.get_slurmdbd_info()
  File "/var/lib/juju/agents/unit-slurmctld-35/charm/src/interface_slurmdbd.py", line 106, in get_slurmdbd_info
    relation = self._relation
  File "/var/lib/juju/agents/unit-slurmctld-35/charm/src/interface_slurmdbd.py", line 102, in _relation
    return self.framework.model.get_relation(self._relation_name)
  File "/var/lib/juju/agents/unit-slurmctld-35/charm/venv/ops/model.py", line 143, in get_relation
    return self.relations._get_unique(relation_name, relation_id)
  File "/var/lib/juju/agents/unit-slurmctld-35/charm/venv/ops/model.py", line 470, in _get_unique
    raise TooManyRelatedAppsError(relation_name, num_related, 1)
ops.model.TooManyRelatedAppsError: Too many remote applications on slurmdbd (2 > 1)

I have only 1 slurmdbd and 1 slurmctld.

This is with Juju controller 2.9.4, juju client 2.9.5 (latest/candidate), and the units running on CentOS7.