-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Fix error while fetching mysql pid from psutil #1620
Conversation
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.
Just a small comment/question, but looks good 💯
except Exception: | ||
self.log.exception("Error while fetching mysql pid from psutil") | ||
except (psutil.AccessDenied, psutil.ZombieProcess, psutil.NoSuchProcess): | ||
continue |
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.
Can we debug log the exception here to help if we run into issues?
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.
Not sure it'd help, if the codepath gets there it means a process died during the iteration. If that process was exactly mysql, the pid would be None
anyways so in terms of responsibilities of the function we're good. If that wasn't mysql, we don't care at all.
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.
this looks great! thank you for doing all of this to the tests.
time.sleep(2) | ||
|
||
return connected | ||
MYSQL_FLAVOR = os.getenv('MYSQL_FLAVOR', 'mysql') |
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.
Why not have the version here too?
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.
It's used only once so I thought it didn't deserve to be a module-global
What does this PR do?
Improves the logic we use to see if the server is running, currently broken as in #1325
Motivation
#1325, thanks @steffenweber for reporting
Review checklist
no-changelog
label attachedAdditional Notes
A test was added to check fix behaviour and prevent regressions