-
Notifications
You must be signed in to change notification settings - Fork 3
#52: Fixed mount binding for parameters in format key=value #59
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
Conversation
|
||
declare -a mount_point_paths | ||
_get_mount_point_paths "${@}" | ||
_get_mount_point_paths ${@//=/ } |
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.
What happens, if you have '=' as a delimiter and in the value? For example, ./exaslct --flavor-path=flavors/test=test
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.
We also need a test for this.
RCA: Parameters in form key=value are treated by bash as one parameter. Solution: Need to manually remove the = character before checking for mount binding directories.
RCA: When executing 'exaslct ...` without any additional path the list of directories where we need to change owner is empty. Then, chown is executed with an empty directory list. Solution: Avoid calling chown with empty directory list. Fixes #53.
RCA: Parameters in form key=value are treated by bash as one parameter. Solution: Need to manually remove the = character before checking for mount binding directories.
# Please enter the commit message for your changes. Lines starting # with '#' will be kept; you may remove them yourself if you want to. # An empty message aborts the commit. # # Date: Tue Jul 20 16:16:29 2021 -0300 # # On branch bug/#52_fix_mount_binding # Changes to be committed: # modified: ci_tests/run_ci_test_within_docker.sh # modified: installer/checksums/exaslct_installer.sh.sha512sum # modified: installer/exaslct_installer.sh # # Untracked files: # DockerUploadTest.dot # Pipfile # default # ~/ # # Please enter the commit message for your changes. Lines starting # with '#' will be kept; you may remove them yourself if you want to. # An empty message aborts the commit. # # Date: Tue Jul 20 16:16:29 2021 -0300 # # On branch bug/#52_fix_mount_binding # Changes to be committed: # modified: ci_tests/run_ci_test_within_docker.sh # modified: installer/checksums/exaslct_installer.sh.sha512sum # modified: installer/exaslct_installer.sh # modified: starter_scripts/checksums/exaslct_within_docker_container.sh.sha512sum # # Untracked files: # DockerUploadTest.dot # Pipfile # default # ~/ #
539c9fd
to
7760d54
Compare
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.
The following test fails, but the workflow doesn't fail. We need to investigate both.
https://github.com/exasol/script-languages-container-tool/pull/59/checks?check_run_id=3118278886#step:3:665
SCRIPT_DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")" | ||
declare -a mount_point_paths | ||
_get_mount_point_paths "${@}" | ||
mount_point_paths=($("$SCRIPT_DIR"/mount_point_parsing.sh "${@}")) |
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 guess the problem, why the following test fails is, because we call the mount_point_parsing.sh directly. In the other scripts, I called via bash, that's why they don't fail. We have two options, either call the script via bash or set in the installer the permissions (execute) for the script correctly.
Ok, found the reason, why the installer test didn't fail. We run the tests in the following script, but we check if the test fails. We need to collect the return codes from the call to the tests and fail, if any return code was not 0. |
…ut don't break when single test fails. This allows execution of all tests, but recognizing error case.
RCA:
Parameters in form key=value are treated by bash as one parameter.
Solution:
Need to manually remove the = character before checking for mount binding
directories.