Comment 9 for bug 1166321

Revision history for this message
vaibhav (vaibhav-bhatkar) wrote :

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