Skip to content

Commit

Permalink
docs: clarify the replan behaviour with regards to stopped services (#…
Browse files Browse the repository at this point in the history
…537)

A `replan` command will start any services that have been stopped (with
a `stop` command), if the service has `startup: enabled` set. Clarify
that in the documentation.

---------

Co-authored-by: Dave Wilding <tech@dpw.me>
  • Loading branch information
tonyandrewmeyer and dwilding authored Dec 17, 2024
1 parent 3c8d2b6 commit 8b7b7a6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions docs/reference/cli-commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -720,8 +720,12 @@ current plan.

When you update service configuration (by adding a layer), the services changed won't be automatically restarted. `pebble replan ` restarts them and brings the service state in sync with the new configuration.

- The "replan" operation restarts `startup: enabled` services whose configuration have changed between when they started and now; if the configuration hasn't changed, replan does nothing.
- Replan also starts `startup: enabled` services that have not yet been started.
For `startup: enabled` services that are running:

- If the service hasn't changed configuration since it started, replan does nothing to the service.
- If the service has changed configuration since it started, replan restarts the service.

Replan also starts any `startup: enabled` services that have not yet been started, or that have been manually stopped.

### Examples

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/layer-specification.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ services:
<description>
# (Optional) Control whether the service is started automatically when
# Pebble starts. Default is "disabled".
# Pebble starts or performs a 'replan' operation. Default is "disabled".
startup: enabled | disabled

# (Optional) A list of other services in the plan that this service
Expand Down

0 comments on commit 8b7b7a6

Please sign in to comment.