Skip to content

promise/plugin: Implement check_service_state promise plugin

Add a promise plugin to check that the current state of a supervisord service matches the expected state.

This is step 2 of a 3-step plan to add an "autorun" feature to theia (See discussion in https://lab.nexedi.com/nexedi/slapos/merge_requests/888):

  • Step 1: Add a slapos-node-auto service to slap/standalone: See https://lab.nexedi.com/nexedi/slapos.core/merge_requests/280
  • Step 2: Create this generic promise plugin to check the state of a service.
  • Step 3: Add an autorun option to software/theia with 3 possible values:
    • running: buildout starts slapos-node-auto and a promise is used to check that it is running
    • stopped: buildout stops slapos-node-auto and a promise is used to check that it is stopped
    • undefined: buildout leaves slapos-node-auto as is, the promise is always fulfilled.
Edited by Xavier Thompson

Merge request reports