-
Notifications
You must be signed in to change notification settings - Fork 149
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
K8SPSMDB-1018: fix incorrect Bash quoting in ps-entry.sh script #1382
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wpt1313
requested review from
hors,
egegunes,
inelpandzic and
pooknull
as code owners
November 24, 2023 17:51
The variable with `numactl` command was quoted, so it was added to the list of positional parameters as a quoted string, therefore causing `exec "$@"` call to fail. This commit changes the variable to an array, so that it can be properly quoted and does not trigger Shellcheck SC-2086 warning.
wpt1313
force-pushed
the
K8SPSMDB-1018-fix-ps-entry
branch
from
November 24, 2023 19:07
5ecc1ec
to
df36868
Compare
egegunes
approved these changes
Jan 12, 2024
commit: 7de05aa |
hors
approved these changes
Jan 12, 2024
@wpt1313 thank you for contribution |
12 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
CHANGE DESCRIPTION
Problem:
When a MongoDB image that contains
numactl
package is used, the pod fails with the error message:'numactl --interleave=all': not found
Cause:
The entrypoint script for MongoDB container runs
mongod
command preceded withnumactl --interleave=all
if the previous test for numactl returns a success code. Since the variable containing this command is incorrectly quoted when added to the list of positional parameters, the script tries to execute the following command:which fails with the error message:
The error never happens if current Percona MongoDB images are used — as they are missing numactl package providing the mentioned command, so the script conditional check for that command always silently fails.
Solution:
The variable is changed to an array and then properly quoted — so that the command is correctly executed and the code does not trigger Shellcheck SC-2086 warning.
CHECKLIST
Jira
Needs Doc
) and QA (Needs QA
)?Tests
compare/*-oc.yml
)?Config/Logging/Testability