Closed john-kheir closed 6 years ago
@katia-e as per scrum, we can solve this issue by doing the following:
so for example, if we have install
and uninstall
actions
install, should make sure uninstall state is deleted, then set install to ok
uninstall, should make sure install state is deleted, then set uninstall to ok
Hint: I will personally add some helper methods for this (may be a decorator in zrobot) to help with stat management, because this can really go out of hand if we have many state for the service.
I don't think you need to have a uninstall state.
What we usually do is, once service is installed, you have a state actions:install:ok
when you uninstall the service, you just delete this state. Then you know is it not installed.
@zaibon What if something go wrong with the uninstall ?
Then you endup in a degraded state where you can't really rely on anything I would say.
from #48:
@john-kheir the state and data of a service are only dump on the filesystem at a periodic interval. So could be you looked before the dump happens. You should not take the filesystem as source of truce. Only reposnse from the API as assured to always have last state.
1- Run a blueprint to create an account with action install 2- Run it again to uninstall the account 3- Check the state.yaml file under the account's service folder
Actual Result
state.yaml is still having the install result.