Statuses
Status messages over 120 characters are truncated in the output of When considering changes to status messages, assume that unit numbers are 2 characters and (charm or snap) revisions are 5 characters |
Application
These statuses have higher priority than any other application status in a charm.
(Kubernetes only) Application not trusted
The charm has not been granted permission to control the Kubernetes StatefulSet partition
App | Status | Message |
---|---|---|
postgresql-k8s |
blocked |
Run `juju trust postgresql-k8s --scope=cluster`. Needed for in-place refreshes |
pause-after-unit-refresh set to invalid value
pause-after-unit-refresh is not set to all
, first
, or none
App | Status | Message |
---|---|---|
postgresql-k8s |
blocked |
pause-after-unit-refresh config must be set to "all", "first", or "none" |
(Machines only) Not possible to determine if a refresh is in progress
On machines, in certain cases, it is not possible to determine if a refresh is in progress.
For example, it is not (easily) possible to immediately differentiate between the following cases:
-
After
juju refresh
, if the charm code is refreshed and the workload version is identical (i.e. same snap revision). (A refresh is not in progress) -
User refreshes from charm revision 602 to 613. Highest unit’s charm code refreshes snap from revision 182 to 183 and raises an uncaught exception in the same Juju event. User refreshes (rollback) to charm revision 602. (A refresh is in progress)
In both of these examples, after a few Juju events (usually a few seconds), it will be possible to determine if a refresh is in progress—as long as no units' charm code is raising an uncaught exception.
App | Status | Message |
---|---|---|
postgresql |
maintenance |
Determining if a refresh is in progress |
(Machines only) Refresh is incompatible
On machines, after the user runs juju refresh
and before any workload is refreshed, the new charm code checks if it supports refreshing from the previous workload & charm code version.
If the refresh is not supported, no workload will be refreshed.
App | Status | Rev | Message |
---|---|---|---|
postgresql |
blocked |
613 |
Refresh incompatible. Rollback with `juju refresh --revision 602` |
This status will only be displayed if an incompatible refresh has not been forced on the first unit to refresh with the force-refresh-start action.
The leader unit will also log an INFO level message to juju debug-log
.
For example:
unit-postgresql-0: 11:34:35 INFO unit.postgresql/0.juju-log charm_refresh:Refresh incompatible. Rollback with `juju refresh`. Continuing this refresh may cause data loss and/or downtime. The refresh can be forced to continue with the `force-refresh-start` action and the `check-compatibility` parameter. Run `juju show-action postgresql force-refresh-start` for more information
(Kubernetes only) Last unit is refreshing
If the Kubernetes StatefulSet partition has been set to allow the last unit to refresh, the refresh cannot be halted using the pause-after-unit-refresh config option.
At that point, a rollback is only possible if Kubernetes decides not to refresh the last unit (because the up-to-date units' pod readiness probes have not all succeeded) and the user runs juju refresh
.
App | Status | Message |
---|---|---|
postgresql-k8s |
maintenance |
Refreshing. To rollback, see docs or `juju debug-log` |
(Machines only) Single unit
Refresh in progress for a single-unit application
App | Status | Rev | Message |
---|---|---|---|
postgresql |
maintenance |
613 |
Refreshing. To rollback, `juju refresh --revision 602` |
Refresh will pause for manual confirmation
(pause-after-unit-refresh is set to all
or set to first
and the second unit has not started to refresh)
Kubernetes
App | Status | Rev | Message |
---|---|---|---|
postgresql-k8s |
blocked |
613 |
Refreshing. Check units >=2 are healthy & run `resume-refresh` on leader. To rollback, see docs or `juju debug-log` |
During every Juju event, the leader unit will also log an INFO level message to juju debug-log
.
For example:
unit-postgresql-k8s-0: 11:34:35 INFO unit.postgresql-k8s/0.juju-log charm_refresh:Refresh in progress. To rollback, run `juju refresh postgresql-k8s --revision 602 --resource postgresql-image=registry.jujucharms.com/charm/kotcfrohea62xreenq1q75n1lyspke0qkurhk/postgresql-image@sha256:e53eb99abd799526bb5a5e6c58180ee47e2790c95d433a1352836aa27d0914a4`
Refresh will not pause for manual confirmation
(pause-after-unit-refresh is set to none
or set to first
and the second unit has refreshed or started to refresh)
App | Status | Message |
---|---|---|
postgresql-k8s |
maintenance |
Refreshing. To pause refresh, run `juju config postgresql-k8s pause-after-unit-refresh=all` |
Unit higher priority
These statuses have higher priority than any other unit status in a charm.
(Kubernetes only) Workload version does not match charm code version
If the user runs juju refresh
with --revision
and without --resource
, the workload(s) will not be refreshed.
This is not supported—Data Platform charms pin a specific workload version for each charm code version.
Similarly, these additional cases are not supported and will have the same user experience:
-
If the user runs
juju refresh
with--resource
and with a--revision
of the charm code that does not pin that specified resource (workload) version, the workload(s) & charm code will be refreshed but will not match -
If the user runs
juju refresh
with--resource
and with--channel
(they should instead only use--channel
), the workload(s) & charm code will be refreshed but may not match -
If the user runs
juju refresh
with--resource
and without--channel
or--revision
, Juju will use the currently tracked channel—which is the same as the previous case
Unit | Workload | Message |
---|---|---|
postgresql-k8s/2 |
blocked |
`juju refresh` was run with missing/incorrect OCI resource. Rollback with instructions in docs or see `juju debug-log` |
This status will only be displayed on the first unit to refresh and only if the workload has not been forced to (attempt to) start with the force-refresh-start action.
The unit will also log an ERROR level message to juju debug-log
.
For example:
unit-postgresql-k8s-2: 11:34:35 ERROR unit.postgresql-k8s/2.juju-log charm_refresh:`juju refresh` was run with missing or incorrect OCI resource. Rollback by running `juju refresh postgresql-k8s --revision 602 --resource postgresql-image=registry.jujucharms.com/charm/kotcfrohea62xreenq1q75n1lyspke0qkurhk/postgresql-image@sha256:e53eb99abd799526bb5a5e6c58180ee47e2790c95d433a1352836aa27d0914a4`. If you are intentionally attempting to refresh to a PostgreSQL container version that is not validated with this release, you may experience data loss and/or downtime as a result of refreshing. The refresh can be forced to continue with the `force-refresh-start` action and the `check-workload-container` parameter. Run `juju show-action postgresql-k8s force-refresh-start` for more information
(Kubernetes only) Refresh is incompatible
On Kubernetes, after the first unit refreshes and before that unit starts its workload, that unit (new charm code) checks if it supports refreshing from the previous workload & charm code version.
If the refresh is not supported, that unit will not start its workload.
Unit | Workload | Message |
---|---|---|
postgresql-k8s/2 |
blocked |
Refresh incompatible. Rollback with instructions in Charmhub docs or see `juju debug-log` |
This status will only be displayed on the first unit to refresh and only if the workload has not been forced to (attempt to) start with the force-refresh-start action.
The unit will also log an INFO level message to juju debug-log
.
For example:
unit-postgresql-k8s-2: 11:34:35 INFO unit.postgresql-k8s/2.juju-log charm_refresh:Refresh incompatible. Rollback by running `juju refresh postgresql-k8s --revision 602 --resource postgresql-image=registry.jujucharms.com/charm/kotcfrohea62xreenq1q75n1lyspke0qkurhk/postgresql-image@sha256:e53eb99abd799526bb5a5e6c58180ee47e2790c95d433a1352836aa27d0914a4`. Continuing this refresh may cause data loss and/or downtime. The refresh can be forced to continue with the `force-refresh-start` action and the `check-compatibility` parameter. Run `juju show-action postgresql-k8s force-refresh-start` for more information
Automatic pre-refresh health checks & preparations failed
Regardless of whether the user runs the pre-refresh-check action before juju refresh
, the charm will run pre-refresh health checks & preparations after juju refresh
—unless it is a rollback.
On machines, the checks & preparations run before any workload is refreshed. These checks & preparations are identical to those in the pre-refresh-check action—except that they are from the new charm code version.
On Kubernetes, the checks & preparations run after the first unit has refreshed. These checks & preparations are a subset of those in the pre-refresh-check action (since some checks & preparations may require that all units have the same workload version). These checks & preparations run on the refreshed unit (i.e. on the new charm code version).
Unit | Workload | Message |
---|---|---|
postgresql-k8s/2 |
blocked |
Rollback with `juju refresh`. Pre-refresh check failed: Backup in progress |
This status will only be displayed on the first unit to refresh and only if the workload has not been forced to refresh (machines) or to attempt to start (Kubernetes) with the force-refresh-start action.
The unit will also log an ERROR level message to juju debug-log
.
For example:
unit-postgresql-k8s-2: 11:34:35 ERROR unit.postgresql-k8s/2.juju-log charm_refresh:Pre-refresh check failed: Backup in progress. Rollback by running `juju refresh postgresql-k8s --revision 602 --resource postgresql-image=registry.jujucharms.com/charm/kotcfrohea62xreenq1q75n1lyspke0qkurhk/postgresql-image@sha256:e53eb99abd799526bb5a5e6c58180ee47e2790c95d433a1352836aa27d0914a4`. Continuing this refresh may cause data loss and/or downtime. The refresh can be forced to continue with the `force-refresh-start` action and the `run-pre-refresh-checks` parameter. Run `juju show-action postgresql-k8s force-refresh-start` for more information
unit-postgresql-2: 11:34:35 ERROR unit.postgresql/2.juju-log charm_refresh:Pre-refresh check failed: Backup in progress. Rollback with `juju refresh`. Continuing this refresh may cause data loss and/or downtime. The refresh can be forced to continue with the `force-refresh-start` action and the `run-pre-refresh-checks` parameter. Run `juju show-action postgresql force-refresh-start` for more information
Unit lower priority
These statuses have lower priority than any other unit status with a message in a charm.
In all of the following examples, all units are healthy. If a unit was unhealthy, that unit’s status would take priority.
Kubernetes
Example: Normal refresh
Unit 2 has refreshed. Units 1 and 0 have not refreshed.
Unit | Workload | Message |
---|---|---|
postgresql-k8s/0* |
active |
PostgreSQL 16.8 running (restart pending); Charm revision 602 |
postgresql-k8s/1 |
active |
PostgreSQL 16.8 running (restart pending); Charm revision 602 |
postgresql-k8s/2 |
active |
PostgreSQL 16.9 running; Charm revision 613 |
Example: Rollback
Units 2 and 1 refreshed from revision 602 & OCI resource e53eb9 to revision 613 & OCI resource 1b926d.
Then, the user ran juju refresh
to revision 602 & OCI resource e53eb9.
Unit 2 has rolled back.
Unit | Workload | Message |
---|---|---|
postgresql-k8s/0* |
active |
PostgreSQL 16.8 running (restart pending); Charm revision 602 |
postgresql-k8s/1 |
active |
PostgreSQL 16.9 running (restart pending); Charm revision 613 |
postgresql-k8s/2 |
active |
PostgreSQL 16.8 running; Charm revision 602 |
Unit 0 will restart even though the workload & charm code version will not change. This is a Juju bug: https://bugs.launchpad.net/juju/+bug/2036246
Example: Charm code refresh without workload refresh
If the charm code is refreshed and the workload version is unchanged, all units will restart.
This happens because juju refresh
updates the Kubernetes StatefulSet.
Unit 2 has refreshed. Units 1 and 0 have not refreshed.
Unit | Workload | Message |
---|---|---|
postgresql-k8s/0* |
active |
PostgreSQL 16.8 running (restart pending); Charm revision 602 |
postgresql-k8s/1 |
active |
PostgreSQL 16.8 running (restart pending); Charm revision 602 |
postgresql-k8s/2 |
active |
PostgreSQL 16.8 running; Charm revision 613 |
Example: Workload is not running before & during refresh
These statuses are only applicable if the workload would also not be running if there was no refresh in progress.
For example, MySQL Router will only run if its charm is related to a MySQL charm. If a MySQL Router charm—that is not related to a MySQL charm—is refreshed, these statuses would be shown.
Unit 2 has refreshed. Units 1 and 0 have not refreshed.
Unit | Workload | Message |
---|---|---|
mysql-router-k8s/0* |
waiting |
Router 8.0.36; Charm revision 602 (restart pending) |
mysql-router-k8s/1 |
waiting |
Router 8.0.36; Charm revision 602 (restart pending) |
mysql-router-k8s/2 |
waiting |
Router 8.0.37; Charm revision 613 |
Example: Refresh to unsupported workload version
The user refreshed to an unsupported workload version (OCI image 68ed80) and forced the refresh to continue with force-refresh-start check-workload-container=false
.
Unit 2 has refreshed. Units 1 and 0 have not refreshed.
Unit | Workload | Message |
---|---|---|
postgresql-k8s/0* |
active |
PostgreSQL 16.8 running (restart pending); Charm revision 602 |
postgresql-k8s/1 |
active |
PostgreSQL 16.8 running (restart pending); Charm revision 602 |
postgresql-k8s/2 |
active |
PostgreSQL running; Charm revision 613; Unexpected container 68ed80 |
Machines
Example: Normal refresh
Unit 2 has refreshed. Units 1 and 0 have not refreshed.
Unit | Workload | Message |
---|---|---|
postgresql/0* |
active |
PostgreSQL 16.8 running; Snap revision 182 (outdated); Charm revision 613 |
postgresql/1 |
active |
PostgreSQL 16.8 running; Snap revision 182 (outdated); Charm revision 613 |
postgresql/2 |
active |
PostgreSQL 16.9 running; Snap revision 183; Charm revision 613 |
Example: Rollback
The user ran juju refresh
to revision 613.
Units 2 and 1 refreshed from snap revision 182 to 183.
Then, the user ran juju refresh
to revision 602.
Unit 2 has rolled back to snap revision 182.
Unit | Workload | Message |
---|---|---|
postgresql/0* |
active |
PostgreSQL 16.8 running; Snap revision 182; Charm revision 602 |
postgresql/1 |
active |
PostgreSQL 16.9 running; Snap revision 183 (outdated); Charm revision 602 |
postgresql/2 |
active |
PostgreSQL 16.8 running; Snap revision 182; Charm revision 602 |
Example: Workload is not running before & during refresh
These statuses are only applicable if the workload would also not be running if there was no refresh in progress.
For example, MySQL Router will only run if its charm is related to a MySQL charm. If a MySQL Router charm—that is not related to a MySQL charm—is refreshed, these statuses would be shown.
Unit 2 has refreshed. Units 1 and 0 have not refreshed.
Unit | Workload | Message |
---|---|---|
mysql-router/0* |
waiting |
Router 8.0.36; Snap revision 182 (outdated); Charm revision 613 |
mysql-router/1 |
waiting |
Router 8.0.36; Snap revision 182 (outdated); Charm revision 613 |
mysql-router/2 |
waiting |
Router 8.0.37; Snap revision 183; Charm revision 613 |
Charm code refreshed without upgrade-charm event
If a unit is raising an uncaught exception, Juju may refresh the charm code without an upgrade-charm event (https://bugs.launchpad.net/juju/+bug/2068500). If this happens, Juju may also refresh that unit’s charm code to a version that is not up-to-date.
Unit | Workload | Message |
---|---|---|
postgresql/2 |
maintenance |
Waiting for Juju upgrade-charm or config-changed event. See `juju debug-log` |