If a relation name is invalid then everything is blocked

Bug #2004675 reported by Facundo Batista
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Medium
Unassigned

Bug Description

I named a relation badly (`pushgatewayXXX`) and noticed it was a bad name when trying to relate the services

$ juju relate prometheus-pushgateway-k8s testingcharm
ERROR "testingcharm:pushgatewayXXX prometheus-pushgateway-k8s:push-endpoint" is not a valid relation key

Now I'm trying to remove the service(s) to deploy from scratch, and keeps failing:

$ juju remove-application --force --no-wait testingcharm
ERROR "testingcharm:pushgatewayXXX prometheus-pushgateway-k8s:push-endpoint" is not a valid relation key

The status at that point:

App Version Status Scale Charm Channel Rev Address Exposed Message
prometheus-k8s 2.33.5 active 1 prometheus-k8s stable 103 10.152.183.72 no
prometheus-pushgateway-k8s waiting 0/1 prometheus-pushgateway-k8s 8 10.152.183.93 no installing agent
testingcharm waiting 0/1 testingcharm 5 10.152.183.143 no installing agent

Unit Workload Agent Address Ports Message
prometheus-k8s/0* active idle 10.1.24.193
prometheus-pushgateway-k8s/0 error lost 10.1.24.212 crash loop backoff: back-off 2m40s restarting failed container=charm pod=prometheus-pushgateway-k8s-0_welcome(b4b79afc-5f50-4e40-b9a5-10e0e8fb2a4c)
testingcharm/0 error lost 10.1.24.224 crash loop backoff: back-off 2m40s restarting failed container=charm pod=testingcharm-0_welcome(73bd6f93-63a3-4a5e-b453-cebee17ee2b4)

Then I tried with `juju destroy-model welcome --destroy-storage`, it didn't not look good:

Model Controller Cloud/Region Version SLA Timestamp Notes
welcome charm-dev-batteries microk8s/localhost 3.0.2 unsupported 11:07:18-03:00 attempt 1 to destroy model failed (will retry): model not empty, found 3 applications, 10 volumes, 10 filesystems (model not empty)

App Version Status Scale Charm Channel Rev Address Exposed Message
prometheus-k8s 2.33.5 terminated 0/1 prometheus-k8s stable 103 10.152.183.72 no unit stopped by the cloud
prometheus-pushgateway-k8s waiting 0/1 prometheus-pushgateway-k8s 8 10.152.183.93 no installing agent
testingcharm waiting 0/1 testingcharm 5 10.152.183.143 no installing agent

Unit Workload Agent Address Ports Message
prometheus-k8s/0 unknown lost 10.1.24.193 agent lost, see 'juju show-status-log prometheus-k8s/0'
prometheus-pushgateway-k8s/0 error lost 10.1.24.212 crash loop backoff: back-off 5m0s restarting failed container=charm pod=prometheus-pushgateway-k8s-0_welcome(b4b79afc-5f50-4e40-b9a5-10e0e8fb2a4c)
testingcharm/0 error lost 10.1.24.224 crash loop backoff: back-off 5m0s restarting failed container=charm pod=testingcharm-0_welcome(73bd6f93-63a3-4a5e-b453-cebee17ee2b4)

Destroying the controller unblocked me, but we should not reach this stage.

Context:

- juju version: 3.0.2-genericlinux-amd64
- MicroK8s: v1.25.6 revision 4504
- OS: Ubuntu 22.04.1 LTS

The controller/model were created with:

juju bootstrap microk8s charm-dev-batteries
juju add-model --config logging-config="<root>=WARNING; unit=DEBUG" --config update-status-hook-interval="60m" welcome

Revision history for this message
Joseph Phillips (manadart) wrote :

We should allow progression of application destruction through such an error when --force is used.

Changed in juju:
status: New → Triaged
importance: Undecided → Medium
tags: added: integrations relations
Revision history for this message
John Lettman (jplettman) wrote :

I have a managed customer who made a typo in juju offer as follows (note the spelling):

$ juju offer vault:certiricates

As a result, juju status and other Juju commands fail completely with an ERROR message stating the certifacates relation in the vault charm is unavailable. There are no commands that seem to function, including attempts to remove the offer. Juju appears bricked across any commands on that particular model.

$ juju status

ERROR could not fetch application offers: getting relation endpoint for relation "certiricates" and application "vault": application "vault" has no "certiricates" relation

The `juju remove-offer` command does not function; instead, it returns that same error. The controller version is 2.9.37.

I am not able, however, to reproduce it on 2.9.42.

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.