Skip to content

Commit 1c33246

Browse files
committed
Updates per discussion in Madrid
1 parent 2e63a4a commit 1c33246

File tree

1 file changed

+20
-14
lines changed

1 file changed

+20
-14
lines changed

ops/model.py

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1830,9 +1830,12 @@ class ErrorStatus(StatusBase):
18301830

18311831
@StatusBase.register
18321832
class ActiveStatus(StatusBase):
1833-
"""The unit is ready.
1833+
"""The unit or application is ready and active.
18341834
1835-
The unit believes it is correctly offering all the services it has been asked to offer.
1835+
Set this status when the charm is correctly offering all the services it
1836+
has been asked to offer. If the unit or application is operational but
1837+
some feature (like high availability) is in a degraded state, set "active"
1838+
with an appropriate message.
18361839
"""
18371840
name = 'active'
18381841

@@ -1842,33 +1845,36 @@ def __init__(self, message: str = ''):
18421845

18431846
@StatusBase.register
18441847
class BlockedStatus(StatusBase):
1845-
"""The unit requires manual intervention.
1848+
"""The unit or application requires manual intervention.
18461849
1847-
An admin has to manually intervene to unblock the unit and let it proceed.
1850+
Set this status when an administrator has to manually intervene to unblock
1851+
the charm to let it proceed.
18481852
"""
18491853
name = 'blocked'
18501854

18511855

18521856
@StatusBase.register
18531857
class MaintenanceStatus(StatusBase):
1854-
"""The unit is performing maintenance tasks.
1858+
"""The unit or application is performing maintenance tasks.
18551859
1856-
The unit is not yet providing services, but is actively doing work in preparation
1857-
for providing those services. This is a "spinning" state, not an error state. In
1858-
contrast to :class:`WaitingStatus`, "maintenance" reflects activity on this unit
1859-
or charm, not on peers or related units.
1860+
Set this status when the charm is performing an operation such as
1861+
``apt install``, or is waiting for something under its control, such as
1862+
``pebble-ready`` or an exec operation in the workload container. In
1863+
contrast to :class:`WaitingStatus`, "maintenance" reflects activity on
1864+
this unit or charm, not on peers or related units.
18601865
"""
18611866
name = 'maintenance'
18621867

18631868

18641869
@StatusBase.register
18651870
class WaitingStatus(StatusBase):
1866-
"""A unit is unable to progress.
1871+
"""The unit or application is waiting on a charm it's integrated with.
18671872
1868-
The unit is unable to progress to an active state because an application it
1869-
is integrated with is not yet ready. In contrast to
1870-
:class:`MaintenanceStatus`, "waiting" reflects activity on related units,
1871-
not on this unit or charm.
1873+
Set this status when waiting on a charm this is integrated with. For
1874+
example, a web app charm would set "waiting" status when it is integrated
1875+
with a database charm that is not ready yet (it might be creating a
1876+
database). In contrast to :class:`MaintenanceStatus`, "waiting" reflects
1877+
activity on related units, not on this unit or charm.
18721878
"""
18731879
name = 'waiting'
18741880

0 commit comments

Comments
 (0)