If we try to support switch in reverse direction, i.e, changing from True to False then first
questions come is what will happen to running instances on compute. As you have rightly
said this is inconsistent. I was thinking that we support "service_enabled=False" only if
there is no entry for the service in the DB. Following is rough algorithm (I am going
to use your config as "service_enabled" has many implications :-) ),
IF There is no entry in the DB for the service THEN
IF register_service_on_startup == False THEN
make the entry in the DB for the service with status set to DISABLED
ELSE
make the entry in the DB for the service with status set to ENABLED
ELSE IF register_service_on_startup == TRUE AND status for the service in the DB is DISABLED
THEN
chagne the status for the service in the DB to ENABLED
ELSE IF register_service_on_startup == False AND There is entry in the DB for the service
THEN
log warning and do nothing
END IF
If we try to support switch in reverse direction, i.e, changing from True to False then first enabled= False" only if
questions come is what will happen to running instances on compute. As you have rightly
said this is inconsistent. I was thinking that we support "service_
there is no entry for the service in the DB. Following is rough algorithm (I am going
to use your config as "service_enabled" has many implications :-) ),
IF There is no entry in the DB for the service THEN service_ on_startup == False THEN service_ on_startup == TRUE AND status for the service in the DB is DISABLED service_ on_startup == False AND There is entry in the DB for the service
IF register_
make the entry in the DB for the service with status set to DISABLED
ELSE
make the entry in the DB for the service with status set to ENABLED
ELSE IF register_
THEN
chagne the status for the service in the DB to ENABLED
ELSE IF register_
THEN
log warning and do nothing
END IF