Skip to content

Conversation

tomuben
Copy link
Collaborator

@tomuben tomuben commented Jul 19, 2021

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.

@tomuben tomuben requested a review from tkilias July 19, 2021 17:08

declare -a mount_point_paths
_get_mount_point_paths "${@}"
_get_mount_point_paths ${@//=/ }
Copy link
Collaborator

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

Copy link
Collaborator

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.

tomuben added 10 commits July 20, 2021 18:08
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
#	~/
#
@tomuben tomuben force-pushed the bug/#52_fix_mount_binding branch from 539c9fd to 7760d54 Compare July 20, 2021 21:10
Copy link
Collaborator

@tkilias tkilias left a 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 "${@}"))
Copy link
Collaborator

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.

https://github.com/exasol/script-languages-container-tool/pull/59/checks?check_run_id=3118278886#step:3:665

@tkilias
Copy link
Collaborator

tkilias commented Jul 21, 2021

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.
https://github.com/exasol/script-languages-container-tool/blob/bug/%2352_fix_mount_binding/installer/tests/run_tests.sh
Can you add this, please.

@tomuben tomuben merged commit 803f830 into main Jul 21, 2021
@tomuben tomuben deleted the bug/#52_fix_mount_binding branch July 21, 2021 16:29
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