Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Updating the *before_notebook*
20_start-postgresql.sh
and40_prepare_aiida.sh
#476Updating the *before_notebook*
20_start-postgresql.sh
and40_prepare_aiida.sh
#476Changes from 2 commits
6428b39
9bb9234
604d0e6
23c6120
8be6bf6
75e6811
201ba78
25e937b
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to understand why this is needed, since the daemon cannot be running at the container startup.
@sphuber does
verdi daemon stop
do some kind of cleanup that might explain why it is needed here? It is true that we currently don't gracefully stop the daemon when we stop the container so there might perhaps be some stale pid files or something?@mikibonacci what is the exact error that you saw coming from the
verdi storage migrate
command?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Depends on the version. The behavior has changed a bit in the 2.x minor releases. But currently, yes,
verdi daemon stop
should clean up stale PID-files. And it is possible that some other commands will check if the daemon "is running" based on that pid file. Would have to look into more detail if you know exactly which version you are targetingThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! We're currently on 2.5, and hopefully will switch to 2.6 soon.
I was trying to get rid of
verdi daemon stop
because it adds 2s to container startup. Perhaps we can just remove the stale pid files manually?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @danielhollas and @sphuber, the exact error printed in the log is:
2024-07-03 15:41:58 Critical: Migration aborted, the daemon for the profile is still running.
The target AiiDA version is
aiida-core==2.5.1
(build=pyhca7485f_0, channel=conda-forge) indeed.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well if you are absolutely certain that the daemon shouldn't be running, you could just manually remove the pid file
.aiida/daemon/circus-{profile-name}.pid
which should be very fast. Theverdi daemon stop
command will actually try to reach the daemon, which has a 2 second timeout by default.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Command
verdi storage migrate
has access to daemon client, so probably another solution is when--force
flag is used, it does clean stale PID files before migrate.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure that it would be a good idea to have --force ignore a running daemon. The --force flag is there to not have to type out the confirmation message. This has been the case for a long time and users may have grown used to that. If we now also have it start ignoring a running daemon, that might be dangerous.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, then manually delete it as Miki did here is fine.