-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Giving an invalid --stopcp
on start "corrupts" database
#4637
Comments
Can confirm that I can duplicate this bug. |
I guess we have to make the scheduler deal with this problem at start-up (as apposed to deleting the DB on early shutdown ... or as well as, at least) because it could happen at an unclean shutdown. |
I think it has to happen on shutdown because you could still keyboard interrupt in between DB creation and population? (Just seemed to happen to me actually) |
Not sure I follow you. Or if you didn't follow me 🤣 ... I should have said "I guess we have to make the scheduler deal with this at restart" (not at the original start-up). I mean, even if we tried to fix this at the source - i.e. delete the "corrupted" database just before premature shutdown, so that it does not affect a later restart - that might not be sufficient, because the scheduler (or the host it runs on) can be killed without a chance to clean up after itself. |
I had originally been entirely unclear whether to handle this at shutdown or restart. Why do it at shutdown
Why do it at restart
My Verdict - shutdown (certainty: low)I wonder whether the scheduler shutting down horribly is a different problem to the one described where the scheduler never really gets started because the config is broken. I think it's reasonable to rely on the shutdown logic to clean the database in this case. |
Ah, that makes more sense! So if it finds the If this functionality is in a self-contained function we could do this both on shutdown (because we ought to) and restart (because shutdown itself can be interrupted too) |
That makes sense to me as a proposal @MetRonnie - by making the check self contained I can test it easily and call it wherever if we change our minds later. 😄 |
From team meeting discussion 20220211T1400Z
|
Blocked pending resolution of #4709 |
If you have a not yet run workflow and give an invalid value for
--stopcp
when starting it for the first time, after the workflow shuts down due to the error, you are left with a workflow database with empty tables.Because the
workflow_params
table is empty, if you try to restart the workflow, Cylc thinks the database is corrupted and refuses to play ball.And you can't clean the database because of #4450
Pull requests welcome!
This is an Open Source project - please consider contributing a bug fix
yourself (please read
CONTRIBUTING.md
before starting any work though).The text was updated successfully, but these errors were encountered: