Status

See first: Juju | Status

See also: How to set a charm’s status

In charm development, status refers to the workload status of the application or individual units of the application as it responds to events. Each status consists of a status value and a message. Juju will show the application and unit statuses in the juju status output.

Contents:

Possible statuses

The possible status values are listed below, along with a link to their ops.StatusBase subclass for use in ops. They are listed in order from highest to lowest priority, where in case of multiple statuses the higher priority status is what gets surfaced to the user:

  • error: the unit is in error, likely from a hook failure (this status is set by Juju, not by the charm)
  • blocked: the unit requires manual intervention from the Juju user, as specified by the charm author (see status notes or the charm’s docs)
  • maintenance: the unit is performing maintenance tasks to get up and running
  • waiting: the unit is waiting on an application it’s integrated with
  • active: the unit is ready and offering the services it has been designed to offer
  • unknown: the initial, unknown status when the unit has not set its status yet

@tmihoc Can the blocked status be explained a bit more? It seems its purpose is not well understood (see also It's probably ok for a unit to go into error state - #14 by dylanstathis). What is manual intervention? This can be anything (like ssh’ing into the unit and fixing something, or just running basic juju commands like relate or config) and can also be applied to an error state. I would expect the charm to go into BlockedStatus if we know (and can indicate in the message) exactly what the admin can do using juju’s cli (like relate, config). cc @jameinel

@bartz My understanding is that the necessary manual intervention differs from charm to charm and, as such, ought to be clarified by the charm authors (e.g., you shouldn’t just see the charm go into blocked – there should also be a prompt telling you what you need to do next). I will double-check this and, if corroborated, update the doc to say that more explicitly.

Certainly the intent is that Blocked is meant to be “something isn’t right, here is the information I can give you”. Usually that is “I need to be related to a database” or “my configuration has no possible resolution because you have conflicting values”.

1 Like