relation to k8s-master via credentials from integrator fails

Bug #1916271 reported by Jeff Hillman
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Openstack Integrator Charm
Fix Released
Undecided
Cory Johns

Bug Description

When configuring openstack integrator to pass keystone credentials from the underlying cloud to kubernetes-master fails.

Configed with

```
juju add-relations kubernetes-master:keystone-credentials openstack-integrator:credentials
```

The charm error with:

```
2021-02-19 15:33:23 DEBUG jujuc server.go:211 running hook tool "juju-log" for openstack-integrator/0-credentials-relation-joined-8642579758643349296
2021-02-19 15:33:23 INFO juju-log credentials:34: Invoking reactive handler: hooks/relations/keystone-credentials/provides.py:21:joined
2021-02-19 15:33:23 DEBUG jujuc server.go:211 running hook tool "juju-log" for openstack-integrator/0-credentials-relation-joined-8642579758643349296
2021-02-19 15:33:23 ERROR juju-log credentials:34: Hook error:
Traceback (most recent call last):
  File "/var/lib/juju/agents/unit-openstack-integrator-0/.venv/lib/python3.8/site-packages/charms/reactive/__init__.py", line 74, in main
    bus.dispatch(restricted=restricted_mode)
  File "/var/lib/juju/agents/unit-openstack-integrator-0/.venv/lib/python3.8/site-packages/charms/reactive/bus.py", line 379, in dispatch
    _invoke(hook_handlers)
  File "/var/lib/juju/agents/unit-openstack-integrator-0/.venv/lib/python3.8/site-packages/charms/reactive/bus.py", line 359, in _invoke
    handler.invoke()
  File "/var/lib/juju/agents/unit-openstack-integrator-0/.venv/lib/python3.8/site-packages/charms/reactive/bus.py", line 181, in invoke
    self._action(*args)
  File "/var/lib/juju/agents/unit-openstack-integrator-0/charm/hooks/relations/keystone-credentials/provides.py", line 23, in joined
    self.set_flag('{relation_name}.connected')
AttributeError: 'KeystoneProvides' object has no attribute 'set_flag'

2021-02-19 15:33:23 WARNING credentials-relation-joined Traceback (most recent call last):
2021-02-19 15:33:23 WARNING credentials-relation-joined File "/var/lib/juju/agents/unit-openstack-integrator-0/charm/hooks/credentials-relation-joined", line 22, in <module>
2021-02-19 15:33:23 WARNING credentials-relation-joined main()
2021-02-19 15:33:23 WARNING credentials-relation-joined File "/var/lib/juju/agents/unit-openstack-integrator-0/.venv/lib/python3.8/site-packages/charms/reactive/__init__.py", line 74, in main
2021-02-19 15:33:23 WARNING credentials-relation-joined bus.dispatch(restricted=restricted_mode)
2021-02-19 15:33:23 WARNING credentials-relation-joined File "/var/lib/juju/agents/unit-openstack-integrator-0/.venv/lib/python3.8/site-packages/charms/reactive/bus.py", line 379, in dispatch
2021-02-19 15:33:23 WARNING credentials-relation-joined _invoke(hook_handlers)
2021-02-19 15:33:23 WARNING credentials-relation-joined File "/var/lib/juju/agents/unit-openstack-integrator-0/.venv/lib/python3.8/site-packages/charms/reactive/bus.py", line 359, in _invoke
2021-02-19 15:33:23 WARNING credentials-relation-joined handler.invoke()
2021-02-19 15:33:23 WARNING credentials-relation-joined File "/var/lib/juju/agents/unit-openstack-integrator-0/.venv/lib/python3.8/site-packages/charms/reactive/bus.py", line 181, in invoke
2021-02-19 15:33:23 WARNING credentials-relation-joined self._action(*args)
2021-02-19 15:33:23 WARNING credentials-relation-joined File "/var/lib/juju/agents/unit-openstack-integrator-0/charm/hooks/relations/keystone-credentials/provides.py", line 23, in joined
2021-02-19 15:33:23 WARNING credentials-relation-joined self.set_flag('{relation_name}.connected')
2021-02-19 15:33:23 WARNING credentials-relation-joined AttributeError: 'KeystoneProvides' object has no attribute 'set_flag'
2021-02-19 15:33:23 ERROR juju.worker.uniter.operation runhook.go:136 hook "credentials-relation-joined" (via explicit, bespoke hook script) failed: exit status 1
2021-02-19 15:33:23 DEBUG juju.machinelock machinelock.go:186 machine lock released for openstack-integrator/0 uniter (run relation-joined (34; unit: kubernetes-master/0) hook)
2021-02-19 15:33:23 DEBUG juju.worker.uniter.operation executor.go:115 lock released for openstack-integrator/0
2021-02-19 15:33:23 INFO juju.worker.uniter resolver.go:143 awaiting error resolution for "relation-joined" hook
2021-02-19 15:33:23 DEBUG juju.worker.uniter agent.go:20 [AGENT-STATUS] error: hook failed: "credentials-relation-joined"
2021-02-19 15:34:11 DEBUG juju.worker.uniter.remotestate watcher.go:636 update status timer triggered for openstack-integrator/0
2021-02-19 15:34:11 INFO juju.worker.uniter resolver.go:143 awaiting error resolution for "relation-joined" hook
2021-02-19 15:34:12 DEBUG juju.worker.meterstatus connected.go:93 got meter status change signal from watcher
2021-02-19 15:35:39 DEBUG juju.worker.uniter.remotestate watcher.go:630 got a relation units change for openstack-integrator/0 : {34 {map[kubernetes-master/0:{1}] map[] []}}
2021-02-19 15:35:39 INFO juju.worker.uniter resolver.go:143 awaiting error resolution for "relation-joined" hook
2021-02-19 15:39:34 DEBUG juju.worker.uniter.remotestate watcher.go:630 got a relation units change for openstack-integrator/0 : {34 {map[kubernetes-master/1:{1}] map[] []}}
2021-02-19 15:39:34 INFO juju.worker.uniter resolver.go:143 awaiting error resolution for "relation-joined" hook
2021-02-19 15:39:42 DEBUG juju.worker.uniter.remotestate watcher.go:636 update status timer triggered for openstack-integrator/0
2021-02-19 15:39:42 INFO juju.worker.uniter resolver.go:143 awaiting error resolution for "relation-joined" hook
2021-02-19 15:44:32 DEBUG juju.worker.uniter.remotestate watcher.go:636 update status timer triggered for openstack-integrator/0
2021-02-19 15:44:32 INFO juju.worker.uniter resolver.go:143 awaiting error resolution for "relation-joined" hook
2021-02-19 15:50:03 DEBUG juju.worker.uniter.remotestate watcher.go:636 update status timer triggered for openstack-integrator/0
2021-02-19 15:50:03 INFO juju.worker.uniter resolver.go:143 awaiting error resolution for "relation-joined" hook
2021-02-19 15:54:16 DEBUG juju.worker.uniter.remotestate watcher.go:636 update status timer triggered for openstack-integrator/0
2021-02-19 15:54:16 INFO juju.worker.uniter resolver.go:143 awaiting error resolution for "relation-joined" hook
```

It appears that set_flag is not currently implemented anywhere

Tags: cpe-onsite
Revision history for this message
Cory Johns (johnsca) wrote :

Dmitrii is fixing this in charms.reactive and once that is reviewed and released, the charm will be rebuilt for 1.20+ck1 to include that fix.

Changed in charm-openstack-integrator:
milestone: none → 1.20+ck1
status: New → In Progress
assignee: nobody → Dmitrii Shcherbakov (dmitriis)
Revision history for this message
Cory Johns (johnsca) wrote :

Correction, I made the PR in reactive: https://github.com/juju-solutions/charms.reactive/pull/233

Changed in charm-openstack-integrator:
assignee: Dmitrii Shcherbakov (dmitriis) → Cory Johns (johnsca)
Revision history for this message
George Kraft (cynerva) wrote :

Previously reported here: https://bugs.launchpad.net/charm-openstack-integrator/+bug/1914650

I'll mark that one as the duplicate since the work is happening here.

Revision history for this message
Cory Johns (johnsca) wrote :

This is released in charms.reactive 1.4.1 and will be included in the 1.20+ck1 charm build.

https://charmsreactive.readthedocs.io/en/latest/changelog.html

Changed in charm-openstack-integrator:
status: In Progress → Fix Committed
Revision history for this message
George Kraft (cynerva) wrote :

No backport needed.

Revision history for this message
George Kraft (cynerva) wrote :

No cherry-pick needed, I should say.

Changed in charm-openstack-integrator:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.