[ 
https://issues.apache.org/jira/browse/HDDS-1513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16837715#comment-16837715
 ] 

Eric Yang commented on HDDS-1513:
---------------------------------

We found the root cause of this issue is the hadoop-runner image contains a uid 
hard code.  The user who started the blockade test must run with uid 1000, gid 
100, otherwise the test will fail on creating configuration file, logs 
directory, and failing to create data directory.  One possible solution is to 
run docker image with -u $(id -u):$(id -g).  This will allow bind mount of 
/opt/apache/ozone to the user who owns Ozone binaries without doing chown, 
chmod.  This will also prevent generating files as root user into host user's 
home directory.

> Blockade tests can't be executed
> --------------------------------
>
>                 Key: HDDS-1513
>                 URL: https://issues.apache.org/jira/browse/HDDS-1513
>             Project: Hadoop Distributed Data Store
>          Issue Type: Bug
>          Components: test
>            Reporter: Elek, Marton
>            Assignee: Elek, Marton
>            Priority: Major
>
> This issue is reporeted by [~eyang] offline. I am creating this issue to 
> track the progress:
> Python output:
> {code}
> python -m pytest -s blockade
> ====================================================================== test 
> session starts 
> =======================================================================
> platform linux2 -- Python 2.7.5 -- py-1.4.32 -- pytest-2.7.0
> rootdir: /home/eyang/test/hadoop/hadoop-ozone/dist/src/main/blockade, 
> inifile: 
> collected 17 items 
> blockade/test_blockade_client_failure.py 2019-05-09 
> 14:15:01,062|INFO|MainThread|blockade.py:33 - blockade_destroy()|Running 
> blockade destroy
> Error:
> No blockade exists in this context
> 2019-05-09 14:15:01,506|INFO|MainThread|cluster_utils.py:40 - 
> cluster_setup()|compose file 
> :/home/eyang/test/hadoop/hadoop-ozone/dist/src/main/compose/ozoneblockade/docker-compose.yaml
> 2019-05-09 14:15:01,506|INFO|MainThread|cluster_utils.py:41 - 
> cluster_setup()|number of DNs :3
> Removing network ozoneblockade_default
> WARNING: Network ozoneblockade_default not found.
> Creating network "ozoneblockade_default" with the default driver
> Creating ozoneblockade_om_1           ... done
> Creating ozoneblockade_scm_1          ... done
> Creating ozoneblockade_ozone_client_1 ... done
> Creating ozoneblockade_datanode_1     ... done
> Creating ozoneblockade_datanode_2     ... done
> Creating ozoneblockade_datanode_3     ... done
> 2019-05-09 14:15:05,705|INFO|MainThread|cluster_utils.py:47 - 
> cluster_setup()|Waiting 30s for cluster start up...
> {code}
> Docker ps -a output:
> {code}
> $ docker ps -a
> CONTAINER ID        IMAGE                         COMMAND                  
> CREATED             STATUS                     PORTS               NAMES
> 0b161b5de31b        apache/hadoop-runner          "/usr/local/bin/dumb…"   8 
> seconds ago       Exited (1) 4 seconds ago                       
> ozoneblockade_datanode_1
> 2c093a264ba0        apache/hadoop-runner          "/usr/local/bin/dumb…"   8 
> seconds ago       Exited (1) 4 seconds ago                       
> ozoneblockade_datanode_3
> a8b3d280e3a7        apache/hadoop-runner          "/usr/local/bin/dumb…"   8 
> seconds ago       Exited (1) 5 seconds ago                       
> ozoneblockade_datanode_2
> 14d763fa51fd        apache/hadoop-runner          "/usr/local/bin/dumb…"   8 
> seconds ago       Exited (1) 5 seconds ago                       
> ozoneblockade_scm_1
> e3955aa4b99c        apache/hadoop-runner          "/usr/local/bin/dumb…"   8 
> seconds ago       Exited (1) 5 seconds ago                       
> ozoneblockade_ozone_client_1
> ac2ab9ec2742        apache/hadoop-runner          "/usr/local/bin/dumb…"   8 
> seconds ago       Exited (1) 6 seconds ago                       
> ozoneblockade_om_1```
> {code}
> Docker logs:
> {code}
> $ docker logs 0b161b5de31b
> Traceback (most recent call last):
>   File "/opt/envtoconf.py", line 115, in <module>
>     Simple(sys.argv[1:]).main()
>   File "/opt/envtoconf.py", line 102, in main
>     self.process_envs()
>   File "/opt/envtoconf.py", line 71, in process_envs
>     with open(self.destination_file_path(name, extension) + ".raw", "w") as 
> myfile:
> IOError: [Errno 2] No such file or directory: 
> '/opt/hadoop/etc/hadoop/log4j.properties.raw'```
> {code}
> We found that this test is executed from the wrong directory as 
> blockade/smoketest tests should be executed from the distribution folder 
> (hadoop-ozone/dist/target/ozone-0.5.0-SNAPSHOT/smoketest and 
> hadoop-ozone/dist/target/ozone-0.5.0-SNAPSHOT/blockade)
> [~eyang] confirmed that it was failed from the good directories, too.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to