Allow a reconfiguration of the registry when blocked

Bug #1956231 reported by Benjamin Allot
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Docker Registry Charm
New
Undecided
Unassigned

Bug Description

Following a docker upgrade, the registry was unable to start due to some mismatch between the old and new versions regarding runtime.

The simplest way to fix that was to get rid of the current container and start a new one.
To achieve that I had to:
 * manually delete the container
 * unset the flag charm.docker-registry.configured with `juju run --application docker-registry "charms.reactive clear_flag charm.docker-registry.configured`
 * trigger a config-changed: `juju run --application docker-registry "hooks/config-changed"`

We see the following path:
```
2022-01-03 09:53:17 INFO unit.docker-registry/1.juju-log server.go:327 Invoking reactive handler: reactive/docker_registry.py:33:report_status
2022-01-03 09:53:17 INFO unit.docker-registry/1.juju-log server.go:327 Invoking reactive handler: hooks/relations/http/provides.py:11:joined:website
2022-01-03 09:53:17 INFO unit.docker-registry/1.juju-log server.go:327 Invoking reactive handler: hooks/relations/tls-certificates/requires.py:109:broken:cert-provider
2022-01-03 09:53:17 INFO unit.docker-registry/1.juju-log server.go:327 Invoking reactive handler: reactive/docker_registry.py:233:update_reverseproxy_config
2022-01-03 09:53:17 INFO unit.docker-registry/1.juju-log server.go:327 Invoking reactive handler: reactive/apt.py:49:ensure_package_status
2022-01-03 09:53:17 INFO unit.docker-registry/1.juju-log server.go:327 Invoking reactive handler: reactive/docker.py:516:enable_grub_cgroups
2022-01-03 09:53:17 INFO unit.docker-registry/1.juju-log server.go:327 status-set: blocked: registry container is stopped.
```

As you can see, whatever we trigger, we end up blocked at "blocked" status.
The report_status method is triggered when "charm.docker-registry.configured" flag is set.
However, there is nothing in the code that remove this flag whatsoever.

Triggering manually "hooks/config-changed" didn't help for some reason even though it should pass through the "config_changed" method.

I had to manually clear the flag "charm.docker-registry.configured" and remove the old container and manually trigger the config-changed hook to get things back on track.

I suggest we add an action that clears the current container and restart everything (with a mandatory option if the storage is not swift).

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.