[runner] add logging when we remove all instances inside a webrunner
This shall be helpful when debugging why the data disappeared from a webrunner.
/cc @cedric.leninivin @jerome @Nicolas @alain.takoudjou @rafael
I can see another place where we do
try: ... except: remove folder; pass
( here ). Shouldn't we also log this case ?Why about putting the log in
removeCurrentInstance
directly ?I can see another place where we dotry: ... except: remove folder; pass ( here ). Shouldn't we also log this case ?
This function is used to create a Software Release from scratch. I think (at least I cannot think of a flaw) the
except
is reached only if something went wrong when creating tho software release profile, and after checking thatnot os.path.exists(folderPath)
. Thusshutil.rmtree(folderPath)
can only delete the new folder containing the new software release profile (in~/srv/runner/project/slapos/software/${folder}
).@tomo : if you got confronted to an issue of data disappearing in a webrunner, I can share some experience of debugging this with you. Almost every time, users know when they clicked on "open a new SR" (which has for consequence to delete the current instances, as you know). There are also many other causes that are not directly related to the webrunner, an exemple seen more than once being a user deleting the
proxy.db
manually.Why about putting the log in
removeCurrentInstance
directly ?I wanted to know what function called
removeCurrentInstance
.Indeed, I was confronted to an issue of data disappearing that was quite worrysome as user (Romain) didn't do anything in the webrunner. So I wanted to know at least if function
removeCurrentInstance
was called and from where. I will chat with you @Nicolas to see if we can find something.I can see another place where we do
try: ... except: remove folder; pass
( here ). Shouldn't we also log this case ?I just wanted to log when data inside the instance was removed but if you think it's a good idea, I can add it.
mentioned in commit 76ad5861