canonical / canonical/basic-auth-service-charm

basic-auth-check-relation-departed error

Open
#2 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1
Forks
4
PR merge metrics
No merged PRs in 30d

Description

I had a archive-auth-mirror/0 unit related to a basic-auth unit. When I destroyed the archive-auth-mirror/0 unit, the basic-auth-check-relation-departed failed with the following logs :

```
2018-01-09 13:22:47 INFO juju-log basic-auth-check:35: Reactive main running for hook basic-auth-check-relation-departed
2018-01-09 13:22:47 INFO juju-log basic-auth-check:35: Initializing Snap Layer
2018-01-09 13:22:47 DEBUG basic-auth-check-relation-departed none
2018-01-09 13:22:47 INFO juju-log basic-auth-check:35: Invoking reactive handler: hooks/relations/basic-auth-check/provides.py:23:broken
2018-01-09 13:22:47 INFO juju-log basic-auth-check:35: basic-auth-check relation is gone
2018-01-09 13:22:47 INFO juju-log basic-auth-check:35: Invoking reactive handler: reactive/basic_auth.py:65:configure_basic_auth_service
2018-01-09 13:22:48 INFO juju-log basic-auth-check:35: Writing file /var/snap/basic-auth-service/current/config.yaml root:root 440
2018-01-09 13:22:48 INFO juju-log basic-auth-check:35: Writing file /var/snap/basic-auth-service/current/alembic.ini root:root 440
2018-01-09 13:22:48 INFO juju-log basic-auth-check:35: Invoking reactive handler: reactive/basic_auth.py:84:basic_auth_check_configured
2018-01-09 13:22:48 DEBUG basic-auth-check-relation-departed Traceback (most recent call last):
2018-01-09 13:22:48 DEBUG basic-auth-check-relation-departed File "/var/lib/juju/agents/unit-basic-auth-service-1/charm/hooks/basic-auth-check-relation-departed", line 19, in
2018-01-09 13:22:48 DEBUG basic-auth-check-relation-departed main()
2018-01-09 13:22:48 DEBUG basic-auth-check-relation-departed File "/usr/local/lib/python3.5/dist-packages/charms/reactive/__init__.py", line 78, in main
2018-01-09 13:22:48 DEBUG basic-auth-check-relation-departed bus.dispatch()
2018-01-09 13:22:48 DEBUG basic-auth-check-relation-departed File "/usr/local/lib/python3.5/dist-packages/charms/reactive/bus.py", line 434, in dispatch
2018-01-09 13:22:48 DEBUG basic-auth-check-relation-departed _invoke(other_handlers)
2018-01-09 13:22:48 DEBUG basic-auth-check-relation-departed File "/usr/local/lib/python3.5/dist-packages/charms/reactive/bus.py", line 417, in _invoke
2018-01-09 13:22:48 DEBUG basic-auth-check-relation-departed handler.invoke()
2018-01-09 13:22:48 DEBUG basic-auth-check-relation-departed File "/usr/local/lib/python3.5/dist-packages/charms/reactive/bus.py", line 291, in invoke
2018-01-09 13:22:48 DEBUG basic-auth-check-relation-departed self._action(*args)
2018-01-09 13:22:48 DEBUG basic-auth-check-relation-departed File "/var/lib/juju/agents/unit-basic-auth-service-1/charm/reactive/basic_auth.py", line 88, in basic_auth_check_configured
2018-01-09 13:22:48 DEBUG basic-auth-check-relation-departed basic_auth_check.configure(APPLICATION_PORT)
2018-01-09 13:22:48 DEBUG basic-auth-check-relation-departed File "/var/lib/juju/agents/unit-basic-auth-service-1/charm/hooks/relations/basic-auth-check/provides.py", line 31, in configure
2018-01-09 13:22:48 DEBUG basic-auth-check-relation-departed 'hostname': self.get_local('hostname'),
2018-01-09 13:22:48 DEBUG basic-auth-check-relation-departed File "/usr/local/lib/python3.5/dist-packages/charms/reactive/relations.py", line 359, in get_local
2018-01-09 13:22:48 DEBUG basic-auth-check-relation-departed return self.conversation(scope).get_local(key, default)
2018-01-09 13:22:48 DEBUG basic-auth-check-relation-departed File "/usr/local/lib/python3.5/dist-packages/charms/reactive/relations.py", line 263, in conversation
2018-01-09 13:22:48 DEBUG basic-auth-check-relation-departed raise ValueError("Conversation with scope '%s' not found" % scope)
2018-01-09 13:22:48 DEBUG basic-auth-check-relation-departed ValueError: Conversation with scope 'archive-auth-mirror/0' not found

```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with reactive/basic_auth.py at basic_auth_check_configured and hooks/relations/basic-auth-check/provides.py at configure, then trace how the archive-auth-mirror/0 conversation is accessed during relation-departed. Reproduce the unit-destruction scenario and verify the hook completes without raising a missing-conversation ValueError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.