Initial 'unknown' status for subordinate charms is confusing

Bug #2021989 reported by Alex Lutay
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Medium
Unassigned

Bug Description

Hi,

The issue: juju sets initial status as `unknown` for subordinate charms.
It confuses (even experienced) users, the last example:
https://chat.charmhub.io/charmhub/pl/8p1kdchq57rg8dddfk4njg9hbh

```
> Genc Tato 2:29 PM:

Hi again, I am trying to deploy pgbouncer on my local lxd, using the 1/edge channel:

> juju deploy pgbouncer --channel 1/edge

However, it stays in unknown state forever, and it doesn't even start any VM.

> App Version Status Scale Charm Channel Rev Exposed Message
> pgbouncer unknown 0 pgbouncer 1/edge 34 no

Any ideas why? ...

---

taurus 4:35 PM:

The pgbouncer (VM) is a subordinate charm, you need to relate it with a principal charm first to see the deployment progress.
Unfortunately, Juju keeps an unknown status for subordinate charms, instead of hinting users to relate it to continue...
```

It is a ticket to consider to set 'waiting' status for subordinate charms + message="Missing relation with a principal charm". Unfortunately it cannot be done inside charm as it is not yet launched.

Changed in juju:
assignee: nobody → Caner Derici (cderici)
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Ian Booth (wallyworld) wrote :

Juju displays "unknown" initially by design, because that's a true indication of the state of the system. The charm is expected to communicate its status via the status-set command. Juju does not, and must not, guess what the state of any charm is; it needs to be explicitly told. If the charm does not do so, then that's a charm bug that needs to be fixed. This is not a juju issue.

Changed in juju:
status: Triaged → Invalid
importance: Medium → Undecided
assignee: Caner Derici (cderici) → nobody
Revision history for this message
Alex Lutay (taurus) wrote :

Dear Ian,

The subordinate charm code is not executed until charm is related.

Check the result of the command `juju deploy pgbouncer --channel 1/edge` from your side.

The status will be "unknown" forever (until the user
relates subordinate charm with a principal charm),
but how could user know about missing relation?

Tnx!

Revision history for this message
Ian Booth (wallyworld) wrote :

Hi, thanks for the extra information - I missed the fact that you were talking about a subordinate charm. You are right that until the charm is related, "unknown" is less than optimal. To fit in with what is done elsewhere, perhaps "blocked" would be better. "blocked" is the status used to indicate that a charm cannot function until user intervention occurs; it usually is due to a relation being required.

Changed in juju:
status: Invalid → Triaged
importance: Undecided → Medium
tags: added: ui
Revision history for this message
Alex Lutay (taurus) wrote :

Yes, tnx!

I think Blocked="Relate with principal charm" it the best Status/Message for newly started subordinate charm.

tags: added: canonical-data-platform-eng
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.