Hi, It seems that there is no way to unset an ON_FIRE state previously set by my code. First it is not clear what the new state should be and second some other code could've set the state as well meanwhile.
Here is some background. I am developing sample policies which monitor machines for compliance with certain rules. If the rule is broken the machine should be set ON_FIRE. So far so good. The problem is that once the machines are back in compliant state I need to clear the error. The ON_FIRE state in Lifecycle seems orthogonal to the rest of the states. Logically we can have ON_FIRE while RUNNING or STARTING. It could be a temporary error, not a final state in the state machine. Just as an observation, we could have an entity ON_FIRE and SERVICE_UP at the same time. Possible solutions to the ON_FIRE issue could be: * Forbidding manual setting of ON_FIRE state, instead creating a mechanism to register functions returning the state. By default it would be SERVICE_STATE == RUNNING. The cons is that it is a poll-based approach. * Reference counting the setting of ON_FIRE. The cons is that it is requires tedious housekeeping, leading to bugs. Perhaps a combination of both approaches would be best - use the first one with a long poll, with the ability to trigger the check manually. Any thoughts? Best, Svet.
