Config-changed hook failed when relation to Indico charm

Bug #1989466 reported by Arturo Enrique Seijas Fernández
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
K8s Content Cache Charm
New
Undecided
Unassigned

Bug Description

After deploying the content cache charm with Indico charm and the nginx-ingress-integrator the config-changed hook fails.

The content cache charm is configured as follows:
juju config content-cache-k8s backend='https://test.indico/'
juju config content-cache-k8s site='test.indico'

and trace is the following:

Traceback (most recent call last):
  File "./src/charm.py", line 278, in <module>
    main(ContentCacheCharm, use_juju_for_storage=True)
  File "/var/lib/juju/agents/unit-content-cache-k8s-0/charm/venv/ops/main.py", line 406, in main
    _emit_charm_event(charm, dispatcher.event_name)
  File "/var/lib/juju/agents/unit-content-cache-k8s-0/charm/venv/ops/main.py", line 140, in _emit_charm_event
    event_to_emit.emit(*args, **kwargs)
  File "/var/lib/juju/agents/unit-content-cache-k8s-0/charm/venv/ops/framework.py", line 278, in emit
    framework._emit(event)
  File "/var/lib/juju/agents/unit-content-cache-k8s-0/charm/venv/ops/framework.py", line 722, in _emit
    self._reemit(event_path)
  File "/var/lib/juju/agents/unit-content-cache-k8s-0/charm/venv/ops/framework.py", line 767, in _reemit
    custom_handler(event)
  File "./src/charm.py", line 67, in _on_config_changed
    self.configure_workload_container(event)
  File "./src/charm.py", line 134, in configure_workload_container
    container.start(CONTAINER_NAME)
  File "/var/lib/juju/agents/unit-content-cache-k8s-0/charm/venv/ops/model.py", line 1046, in start
    self._pebble.start_services(service_names)
  File "/var/lib/juju/agents/unit-content-cache-k8s-0/charm/venv/ops/pebble.py", line 802, in start_services
    return self._services_action('start', services, timeout, delay)
  File "/var/lib/juju/agents/unit-content-cache-k8s-0/charm/venv/ops/pebble.py", line 831, in _services_action
    raise ChangeError(change.err, change)
ops.pebble.ChangeError: cannot perform the following tasks:
- Start service "content-cache" (cannot start service: exited quickly with code 1)

Reproduction steps:
juju deploy postgresql-k8s
juju deploy redis-k8s redis-cache
juju deploy redis-k8s redis-broker
juju deploy nginx-ingress-integrator
juju trust nginx-ingress-integrator --scope=cluster
juju deploy indico --config site_url=https://test.indico

juju relate redis-cache indico
juju relate redis-broker indico
juju relate indico postgresql-k8s:db
juju relate indico:ingress nginx-ingress-integrator:ingress

juju deploy content-cache-k8s --channel edge --series groovy --force
juju config content-cache-k8s backend='https://test.indico/'
juju config content-cache-k8s site='test.indico'
juju relate nginx-ingress-integrator content-cache-k8s:ingress

Tom Haddon (mthaddon)
description: updated
Revision history for this message
Tom Haddon (mthaddon) wrote :

The reason this hasn't worked is because you've got the two sites in the same model and ingress is at the cluster level (i.e. outside of the model).

I think you want to use the ingress-proxy relation as documented on https://charmhub.io/content-cache-k8s:

juju deploy postgresql-k8s
juju deploy redis-k8s redis-cache
juju deploy redis-k8s redis-broker
juju deploy nginx-ingress-integrator
juju trust nginx-ingress-integrator --scope=cluster
juju deploy indico --config site_url=https://test.indico

juju relate redis-cache indico
juju relate redis-broker indico
juju relate indico postgresql-k8s:db
juju relate indico content-cache-k8s:ingress-proxy
juju relate nginx-ingress-integrator content-cache-k8s:ingress

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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