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

vttablet-up.sh : Adds detection of mysqld launch failure. #5573

Merged
merged 2 commits into from
Dec 19, 2019

Conversation

chrisrgithub
Copy link
Contributor

Given failure, tests for further for presence of apparmor. Exits with error and recommendation to disable.

@morgo
Copy link
Contributor

morgo commented Dec 14, 2019

I think we should try and embed this check in mysqlctl itself. Otherwise, users who don't use our examples won't benefit.

…re, tests for further for presence of apparmor. Exits with error and recommendation to disable.

Signed-off-by: ChrisR <radsurfer@gmail.com>
@deepthi
Copy link
Member

deepthi commented Dec 18, 2019

I think we should try and embed this check in mysqlctl itself. Otherwise, users who don't use our examples won't benefit.

Good point, but worth doing in the example until that is implemented.

deepthi
deepthi previously approved these changes Dec 18, 2019
Copy link
Member

@deepthi deepthi left a comment

Choose a reason for hiding this comment

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

LGTM

err=$?
if [[ $err -ne 0 ]]; then
echo "Checking for apparmor status for mysqld:"
sudo aa-status | grep mysqld
Copy link
Contributor

Choose a reason for hiding this comment

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

Stock Ubuntu will pause and wait for a password here. It is only cloud instances that have sudo no password configured. We should instead recommend running this command to check.

Copy link
Member

Choose a reason for hiding this comment

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

That is right.. @chrisrgithub you will need to remove this check but still print a helpful message.

Comment on lines 30 to 35
function fail() {
echo "ERROR: $1"
exit 1
}

# Travis hostnames are too long for MySQL, so we use IP.
Copy link
Contributor

Choose a reason for hiding this comment

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

This function should already be present, because it is in env.sh

@deepthi deepthi dismissed their stale review December 18, 2019 16:26

Changes needed

…n info.

Signed-off-by: ChrisR <radsurfer@gmail.com>
@chrisrgithub
Copy link
Contributor Author

  • Updated for passive check only, with more info on ways to check for apparmor or selinux protection.
  • Preserved Morgo's more recent changes.
  • Note that if the user simply "tries again", even after disabling apparmor it will hang silently while processing the existing vtdataroot. Hence the advice to empty vtdatarot first before retrying.

@morgo morgo self-requested a review December 19, 2019 15:22
@morgo morgo merged commit bb49ac0 into vitessio:master Dec 19, 2019
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.

3 participants