|
| 1 | +# Operator Status, State, and Stage Definitions |
| 2 | + |
| 3 | +This document provides concise definitions for the status, state, and stage concepts used throughout the Skyhook operator to track package operations and node lifecycle management. |
| 4 | + |
| 5 | +## Key Relationships |
| 6 | + |
| 7 | +- **Status** reflects the overall health and progress of nodes and the Skyhook resource |
| 8 | +- **State** tracks the execution status of individual package operations |
| 9 | +- **Stage** defines the specific lifecycle phase a package is currently in |
| 10 | + |
| 11 | +- A node's Status is derived from the collective States of its packages |
| 12 | +- Stages progress sequentially, with State indicating success/failure at each stage |
| 13 | +- All stages except for interrupts include validation checks that must succeed for progression |
| 14 | + |
| 15 | +## Usage in Operations |
| 16 | + |
| 17 | +- **Monitoring**: Use Status for high-level health checks and dashboards |
| 18 | +- **Debugging**: Examine State and Stage for detailed package-level troubleshooting |
| 19 | +- **Automation**: State transitions trigger the next appropriate Stage in the lifecycle |
| 20 | +- **Scheduling**: Status values like `blocked` and `paused` control operation scheduling and dependencies |
| 21 | + |
| 22 | +## Status |
| 23 | + |
| 24 | +**Scope**: Applied to the overall Skyhook resource and individual nodes |
| 25 | +**Purpose**: High-level operational status indicating the current condition |
| 26 | + |
| 27 | +| Status | Definition | |
| 28 | +|--------|------------| |
| 29 | +| `complete` | All operations have finished successfully | |
| 30 | +| `blocked` | Operations are prevented from proceeding due to taint toleration issues | |
| 31 | +| `waiting` | Queued for execution but not yet started | |
| 32 | +| `disabled` | Execution is disabled but will continue for other Skyhooks | |
| 33 | +| `paused` | Execution is paused for this and all other Skyhooks supposed to be executed after this one | |
| 34 | +| `in_progress` | Currently executing operations | |
| 35 | +| `erroring` | Experiencing failures or errors | |
| 36 | +| `unknown` | Status cannot be determined or is uninitialized | |
| 37 | + |
| 38 | +## State |
| 39 | + |
| 40 | +**Scope**: Applied to individual packages within a node |
| 41 | +**Purpose**: Current execution state of a specific package operation |
| 42 | + |
| 43 | +| State | Definition | |
| 44 | +|-------|------------| |
| 45 | +| `complete` | Package operation has finished successfully | |
| 46 | +| `in_progress` | Package is actively running (pod has started) | |
| 47 | +| `skipped` | Package/stage was intentionally bypassed in the lifecycle | |
| 48 | +| `erroring` | Package operation is experiencing failures | |
| 49 | +| `unknown` | Package state cannot be determined or is uninitialized | |
| 50 | + |
| 51 | +## Stage |
| 52 | + |
| 53 | +**Scope**: Applied to individual packages |
| 54 | +**Purpose**: Indicates which phase of the package installation/management process is currently executing |
| 55 | + |
| 56 | +| Stage | Definition | |
| 57 | +|-------|------------| |
| 58 | +| `uninstall` & `uninstall-check` | Removal of the package | |
| 59 | +| `upgrade` & `upgrade-check` | Package version update operations | |
| 60 | +| `apply` & `apply-check` | Initial installation/deployment of the package | |
| 61 | +| `config` & `config-check` | Configuration and setup operations | |
| 62 | +| `interrupt` | Execution of interrupt operations (e.g., reboots, service restarts) | |
| 63 | +| `post-interrupt` & `post-interrupt-check` | Operations that run after interrupt completion | |
| 64 | + |
| 65 | +**NOTE**: All stages except for interrupts include validation checks that must succeed for progression |
| 66 | + |
| 67 | +## Stage Flow |
| 68 | + |
| 69 | +The typical stage progression depends on whether the package has interrupts: |
| 70 | + |
| 71 | +### Without Interrupts: |
| 72 | +``` |
| 73 | +uninstall → apply → config |
| 74 | +upgrade → config |
| 75 | +``` |
| 76 | + |
| 77 | +### With Interrupts: |
| 78 | +``` |
| 79 | +uninstall → apply → config → interrupt → post-interrupt |
| 80 | +upgrade → config → interrupt → post-interrupt |
| 81 | +``` |
0 commit comments