Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Record "recover-service" change when recovering/restarting a service #117

Closed
wants to merge 4 commits into from

Commits on May 2, 2022

  1. Add missing state transition to state diagram (canonical#116)

    Somehow I'd missed this when I added the state diagram originally.
    benhoyt committed May 2, 2022
    Configuration menu
    Copy the full SHA
    ceeaaa5 View commit details
    Browse the repository at this point in the history
  2. Record a "recover" change when recovering a svc, and 1 task per restart

    This will enable debugging/introspection on whether a service is
    failing and being auto-restarted. You can introspect it with the
    changes API or the "pebble changes" and "pebble tasks" CLI commands.
    
    The kind (type) of the changes is "recover" and the kind of the tasks
    is "restart".
    
    Example output while I service is begin recovered (change 3 is not yet
    ready):
    
    $ pebble changes
    ID   Status  Spawn                Ready                Summary
    1    Done    today at 16:08 NZST  today at 16:08 NZST  Autostart service "test2"
    2    Done    today at 16:08 NZST  today at 16:09 NZST  Recover service "test2"
    3    Done    today at 16:09 NZST  -                    Recover service "test2"
    
    After it's recovered the change is marked done/Ready:
    
    $ pebble changes
    ID   Status  Spawn                Ready                Summary
    1    Done    today at 16:08 NZST  today at 16:08 NZST  Autostart service "test2"
    2    Done    today at 16:08 NZST  today at 16:09 NZST  Recover service "test2"
    3    Done    today at 16:09 NZST  today at 16:10 NZST  Recover service "test2"
    
    $ pebble tasks 2
    Status  Spawn                Ready                Summary
    Done    today at 16:08 NZST  today at 16:08 NZST  Restart service "test2"
    Done    today at 16:08 NZST  today at 16:08 NZST  Restart service "test2"
    Done    today at 16:09 NZST  today at 16:09 NZST  Restart service "test2"
    
    $ pebble tasks 3
    Status  Spawn                Ready                Summary
    Done    today at 16:09 NZST  today at 16:09 NZST  Restart service "test2"
    
    Fixes canonical#104
    benhoyt committed May 2, 2022
    Configuration menu
    Copy the full SHA
    d91e700 View commit details
    Browse the repository at this point in the history

Commits on May 9, 2022

  1. Configuration menu
    Copy the full SHA
    5074a36 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d398d21 View commit details
    Browse the repository at this point in the history