[
https://issues.apache.org/jira/browse/HDDS-1716?focusedWorklogId=264594&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-264594
]
ASF GitHub Bot logged work on HDDS-1716:
----------------------------------------
Author: ASF GitHub Bot
Created on: 21/Jun/19 12:50
Start Date: 21/Jun/19 12:50
Worklog Time Spent: 10m
Work Description: hadoop-yetus commented on pull request #1002:
HDDS-1716. Smoketest results are generated with an internal user
URL: https://github.com/apache/hadoop/pull/1002#discussion_r296221307
##########
File path: hadoop-ozone/dist/src/main/compose/testlib.sh
##########
@@ -75,10 +75,14 @@ execute_robot_test(){
CONTAINER="$1"
TEST="$2"
TEST_NAME=$(basename "$TEST")
- TEST_NAME=${TEST_NAME%.*}
+ TEST_NAME="$(basename $COMPOSE_DIR)-${TEST_NAME%.*}"
set +e
OUTPUT_NAME="$COMPOSE_ENV_NAME-$TEST_NAME-$CONTAINER"
+ docker-compose -f "$COMPOSE_FILE" exec -T "$CONTAINER" mkdir -p
"$RESULT_DIR_INSIDE"
docker-compose -f "$COMPOSE_FILE" exec -e
SECURITY_ENABLED="${SECURITY_ENABLED}" -T "$CONTAINER" python -m robot --log
NONE -N "$TEST_NAME" --report NONE "${OZONE_ROBOT_OPTS[@]}" --output
"$RESULT_DIR_INSIDE/robot-$OUTPUT_NAME.xml" "$SMOKETEST_DIR_INSIDE/$TEST"
+
+ export FULL_CONTAINER_NAME=$(docker-compose -f "$COMPOSE_FILE" ps | grep
"_${CONTAINER}_" | head -n 1 | awk '{print $1}')
Review comment:
shellcheck:10: warning: Declare and assign separately to avoid masking
return values. [SC2155]
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 264594)
Time Spent: 50m (was: 40m)
> Smoketest results are generated with an internal user
> -----------------------------------------------------
>
> Key: HDDS-1716
> URL: https://issues.apache.org/jira/browse/HDDS-1716
> Project: Hadoop Distributed Data Store
> Issue Type: Bug
> Reporter: Elek, Marton
> Assignee: Elek, Marton
> Priority: Minor
> Labels: pull-request-available
> Time Spent: 50m
> Remaining Estimate: 0h
>
> [~eyang] reported the problem in HDDS-1609 that the smoketest results are
> generated a user (the user inside the docker container) which can be
> different from the host user.
> There is a minimal risk that the test results can be deleted/corrupted by an
> other users if the current user is different from uid=1000
> I opened this issue because [~eyang] said me during an offline discussion
> that HDDS-1609 is a more complex issue and not only about the ownership of
> the test results.
> I suggest to handle the two problems in different way. With this patch, the
> permission of the test result files can be fixed easily.
> In HDDS-1609 we can discuss about general security problems and try to find
> generic solution for them.
> Steps to reproduce _this_ problem:
> # Use a user which is different from uid=1000
> # Create a new ozone build (mvn clean install -f pom.ozone.xml -DskipTests)
> # Go to a compose directory (cd
> hadoop-ozone/dist/target/ozone-0.5.0-SNAPSHOT/compose/)
> # Execute tests (./test.sh)
> # check the ownership of the results (ls -lah ./results)
> Current result: the owner of the result files are the user uid=1000
> Expected result: the owner of the files should be always the current user
> (even if the current uid is different)
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]