slapproxy: propagate parent partition state to children
-
mentioned in merge request slapos!760 (closed)
-
Maintainer
I don't understand what you mean, but the parent state is propagated as default to children. On slapos master, if you start a root instance, children are requested to be started (if requested_state is not explicitely set). If you stop root children will be stopped.
in test
test_request_parent_started_children_stopped
, children has arequested_state
which is not modified by the parend. -
Owner
If you stop root children will be stopped.
no, in real slapos master, if you stop the root instance and this instance doesn't explicitely request that its children are stopped, then the children will stay
started
.This is the problem I'm trying to address in slapos!760 (closed)
-
Maintainer
no, in real slapos master, if you stop the root instance and this instance doesn't explicitely request that its children are stopped, then the children will stay
started
.do you mean that when a webrunner is stopped, runner0, runner1 and PBS are still
start_requested
? -
Owner
do you mean that when a webrunner is stopped, runner0, runner1 and PBS are still
start_requested
?yes since webrunner switched to
switch-softwaretype
recipe (slapos@8725ab1a)before this commit, the root instance correctly requested the children partition in the same state as itself.
-
Owner
It seems you did this commit because ERP5 SR was always using
switch-softwaretype
recipe so it didn't have the feature and you implemented it inside slapproxy instead of implementing it inside ERP5 SR.I just want to know if I can safely revert this commit and in the same time, make sure that all SR correctly request the children partition in the same state as the master partition.
-
Maintainer
not sure it was for ERP5 (it was long time ago), maybe it was to solve runner1. But you can revert as slapos@8725ab1a will be used.
-
Owner
It seems to me that slapproxy should mimic what real slapos master is doing and in this case, real slapos master doesn't enforce the children partition state to be the same as parent partition...
Yes, there's at least something clear: full slapos master and slapproxy must behave the same, else we're sure to never fix the whole problem correctly.
-
Owner
In short, slapos master has an alarm for stop all instances from a Stopped hosting subscription:
And another to destroy:
In general, the current behaviour is like this (from slapos master point of view):
- If an HS is destroyed, buildout don't process (so state arent propagated by the children by the instance)
- If an HS is stopped, buildout process but the alarm act as fail safe (to ensure all instance from the cluster are stoped in case some leftover stay behind)
- If an HS is started, ONLY the root instance is started, and propagation are exclusively done by the instances
- If an instance isn't requested anymore by nobody, it is excluded the tree and it is marked to be removed regardless of the state (currently for safety this alarm is disabled):
Notice, if is acceptable that an started instance request something in stopped state.
Peharps this should be moved to a discussion in a forum.
-
Maintainer
I did not remember about this alarm, so the commit is trying to reproduce what the alarm does.
If an instance isn't requested anymore by nobody, it is excluded the tree and it is marked to be removed regardless of the state (currently for safety this alarm is disabled):
The Alarm is enabled for IMT to cleanup unlinked VM.