Skip to content
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

Skip DB check in helpers when main process is running #1291

Merged
merged 3 commits into from
Sep 16, 2020

Conversation

mattmundell
Copy link
Contributor

@mattmundell mattmundell commented Sep 7, 2020

What:

Skip DB check in helpers (--create-user, etc) when main process is running.

Why:

The create_tables in the db check was causing deadlock.

How:

1 tail -f gvmd.log | grep -i "deadlock detected"
2 while true; do gvmd --modify-setting 78eceaec-3385-11ea-b237-28d24461215b --value d1ab52ec-a88a-4ef3-99d5-57123f88a95c; done
3 In GSA refresh the results page.
4 Without patch should see tail output after 1 or 2 refreshes.

Checklist:

The DB check runs create_tables.  Helper processes (--get-users etc) can safely
skip the check when the main process is running, because the main process has
done the check.  This avoids deadlock.
@mattmundell mattmundell marked this pull request as ready for review September 7, 2020 18:14
bjoernricks
bjoernricks previously approved these changes Sep 16, 2020
Copy link
Contributor

@bjoernricks bjoernricks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks legit

@mattmundell mattmundell merged commit 09db986 into gvmd-20.08 Sep 16, 2020
@mattmundell mattmundell deleted the helper-deadlock branch September 16, 2020 12:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants