Currently slapos know two state for instance processes, started which mean that all processes will be started and stopped to stop all processes. In some cases we want to tell which processes are expected to be running on a specific instance. For example, we want to move a qemu image and we don't want to copy data when qemu is running, or some processes already EXITED (like mariadb_update) will be started every time slapgrid will reprocess the partition while this restart is not needed and usefull.
"stopped": ["mariadb_update", "httpd", ...],
"restarted": ["cron", ...],
When slapgrid will process a partition, he will read the file called .slappartXX-requested-process-state from the partition base directory which contains the JSON with list of processes to not stop or to restart, then will apply requested state. All other processes which are not in stopped or restarted state will be placed in started state (the default).
For restart state, slapgrid will check if the requested timestamp (which is mandatory for restart) is upper than the previous slapgrid execution timestamp, if true the processes can be restarted. The timestamp should ne be in the future.
To immediately apply the state in requested file, slapos bang cab be called to force reprocess the partition and let supervisord apply requested state to processes. Bang is called from recipe or other software (Monitor).
This definition file is only applied when then software instance state is started. If the instance is stopped or destroyed, this file will be ignored and all processes will be stopped.