You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "Sean Busbey (JIRA)" <ji...@apache.org> on 2014/02/18 23:23:20 UTC

[jira] [Created] (ACCUMULO-2376) functional test should not require host configuration files

Sean Busbey created ACCUMULO-2376:
-------------------------------------

             Summary: functional test should not require host configuration files
                 Key: ACCUMULO-2376
                 URL: https://issues.apache.org/jira/browse/ACCUMULO-2376
             Project: Accumulo
          Issue Type: Bug
          Components: test
    Affects Versions: 1.5.1
         Environment: 1.5.1-rc2 on CDH4
            Reporter: Sean Busbey


I am running the functional tests against an ACCUMULO_CONF_DIR just for running tests. It contains only a minimal accumulo-env.sh and accumulo-site.xml. my test user does not have access to the /accumulo directory, the deployed instance's ACCUMULO_CONF_DIR, nor the deployed instance's secret.

Most tests fail with the same error about not being able to find the monitor, SunnyDay is an exemplar

{noformat}
[busbey@master2 auto]$ ls -lah /etc/accumulo/functional/
total 20K
drwxrwxrwx 2 accumulo accumulo 4.0K Feb 18 13:57 .
drwxrwxrwx 6 accumulo accumulo 4.0K Feb 18 12:42 ..
-rwxr-xr-x 1 root root 3.0K Feb 18 12:53 accumulo-env.sh
-rw-r--r-- 1 root root 3.8K Feb 18 13:40 accumulo-site.xml
[busbey@master2 auto]$ reset && ./run.py -f 4 -t SunnyDayTest -v10 | tee --append ~/accumulo-1.5.1-rc2-bin.functional_tests.log
<…. skip tests …>
13:41:13 runTest (simple.readwrite.SunnyDayTest) ............................ INFO:test.auto:killing accumulo processes everywhere
DEBUG:test.auto:master2.example.com: /home/busbey/accumulo-1.5.1-rc2/test/system/auto/pkill.sh 9 4035 accumulo.config.file.*master2-9301
DEBUG:test.auto:master2.example.com: hadoop fs -rmr /user/busbey/accumulo-master2-9301
INFO:test.auto:Error output from command: rmr: DEPRECATED: Please use 'rm -r' instead.
rmr: `/user/busbey/accumulo-master2-9301': No such file or directory
DEBUG:test.auto:Exit code: 1
DEBUG:test.auto:master2.example.com: /home/busbey/accumulo-1.5.1-rc2/bin/accumulo init --clear-instance-name
DEBUG:test.auto:Output from command: Could not infer a Monitor role. You need to either define the MONITOR env variable, define "/etc/accumulo/functional//monitor", or make sure "/etc/accumulo/functional//masters" is non-empty.
INFO:test.auto:Error output from command: egrep: /etc/accumulo/functional//masters: No such file or directory
DEBUG:test.auto:Exit code: 1
DEBUG:test.auto:master2.example.com: /home/busbey/accumulo-1.5.1-rc2/bin/accumulo tserver
DEBUG:test.auto:master2.example.com: /home/busbey/accumulo-1.5.1-rc2/bin/accumulo monitor
DEBUG:test.auto:localhost: /home/busbey/accumulo-1.5.1-rc2/bin/accumulo org.apache.accumulo.server.master.state.SetGoalState NORMAL
DEBUG:test.auto:Output from command: Could not infer a Monitor role. You need to either define the MONITOR env variable, define "/etc/accumulo/functional//monitor", or make sure "/etc/accumulo/functional//masters" is non-empty.
INFO:test.auto:Error output from command: egrep: /etc/accumulo/functional//masters: No such file or directory
DEBUG:test.auto:Exit code: 1
DEBUG:test.auto:master2.example.com: /home/busbey/accumulo-1.5.1-rc2/bin/accumulo master
DEBUG:test.auto:Running shell with 'createtable test_ingest\n'
DEBUG:test.auto:master2.example.com: /home/busbey/accumulo-1.5.1-rc2/bin/accumulo shell -u root -p secret
DEBUG:test.auto:Output from command: Could not infer a Monitor role. You need to either define the MONITOR env variable, define "/etc/accumulo/functional//monitor", or make sure "/etc/accumulo/functional//masters" is non-empty.
INFO:test.auto:Error output from command: egrep: /etc/accumulo/functional//masters: No such file or directory
DEBUG:test.auto:Exit code: 1
INFO:test.auto:Starting Test Ingester
DEBUG:test.auto:master2.example.com: /home/busbey/accumulo-1.5.1-rc2/bin/accumulo org.apache.accumulo.test.TestIngest --debug -i master2-9301 -u root --size 50 --random 56 --rows 20000 --start 0 --cols 1 --createTable -p secret
DEBUG:test.auto:Waiting for /home/busbey/accumulo-1.5.1-rc2/bin/accumulo org.apache.accumulo.test.TestIngest --debug -i master2-9301 -u root --size 50 --random 56 --rows 20000 --start 0 --cols 1 --createTable -p secret to stop in 2430.0 secs
DEBUG:test.auto:err: egrep: /etc/accumulo/functional//masters
DEBUG:test.auto:err: : No such file or directory
DEBUG:test.auto:out: Could not infer a Monitor role. You need to either define the MONITOR env variable, define "/etc/accumulo/functional//monitor", or make sure "/etc/accumulo/functional//masters" is non-empty.
DEBUG:test.auto:Output from command: Could not infer a Monitor role. You need to either define the MONITOR env variable, define "/etc/accumulo/functional//monitor", or make sure "/etc/accumulo/functional//masters" is non-empty.
INFO:test.auto:Error output from command: egrep: /etc/accumulo/functional//masters: No such file or directory
DEBUG:test.auto:Exit code: 1
FAIL
======================================================================
FAIL: runTest (simple.readwrite.SunnyDayTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/busbey/accumulo-1.5.1-rc2/test/system/auto/simple/readwrite.py", line 64, in runTest
    self.waitForStop(self.ingester, waitTime)
  File "/home/busbey/accumulo-1.5.1-rc2/test/system/auto/TestUtils.py", line 417, in waitForStop
    self.assert_(self.processResult(out, err, handle.returncode))
AssertionError

INFO:test.auto:killing accumulo processes everywhere
DEBUG:test.auto:master2.example.com: /home/busbey/accumulo-1.5.1-rc2/test/system/auto/pkill.sh 1 4035 accumulo.config.file.*master2-9301
DEBUG:test.auto:master2.example.com: hadoop fs -rmr /user/busbey/accumulo-master2-9301
INFO:test.auto:Error output from command: rmr: DEPRECATED: Please use 'rm -r' instead.
rmr: `/user/busbey/accumulo-master2-9301': No such file or directory
DEBUG:test.auto:Exit code: 1
DEBUG:test.auto:master2.example.com: /home/busbey/accumulo-1.5.1-rc2/bin/accumulo org.apache.accumulo.server.util.DeleteZooInstance -i master2-9301
DEBUG:test.auto:Output from command: Could not infer a Monitor role. You need to either define the MONITOR env variable, define "/etc/accumulo/functional//monitor", or make sure "/etc/accumulo/functional//masters" is non-empty.
INFO:test.auto:Error output from command: egrep: /etc/accumulo/functional//masters: No such file or directory
DEBUG:test.auto:Exit code: 1
DEBUG:test.auto:master2.example.com: rm -rf /home/busbey/accumulo-1.5.1-rc2/logs/master2-9301
DEBUG:test.auto:Exit code: 0
DEBUG:test.auto:master2.example.com: /home/busbey/accumulo-1.5.1-rc2/test/system/auto/pkill.sh 9 4035 TestIngest.*master2-9301

======================================================================
FAIL: runTest (simple.readwrite.SunnyDayTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/busbey/accumulo-1.5.1-rc2/test/system/auto/simple/readwrite.py", line 64, in runTest
    self.waitForStop(self.ingester, waitTime)
  File "/home/busbey/accumulo-1.5.1-rc2/test/system/auto/TestUtils.py", line 417, in waitForStop
    self.assert_(self.processResult(out, err, handle.returncode))
AssertionError

----------------------------------------------------------------------
Ran 1 test in 3.230s

FAILED (failures=1)
{noformat}

Work around: create configuration files with invalid host names in the ACCUMULO_CONF_DIR used for testing (presuming your goal is to ensure you do not overlap with an existing Accumulo cluster)

{noformat}
[busbey@master2 auto]$ sudo su -
[root@master2 ~]# cd /etc/accumulo/functional
[root@master2 functional]# echo "notahost.example.com" > masters
[root@master2 functional]# for conf_file in slaves gc tracers monitor; do cp masters ${conf_file}; done
[root@master2 functional]# ls -lah
total 36K
drwxrwxrwx 2 accumulo accumulo 4.0K Feb 18 14:11 .
drwxrwxrwx 6 accumulo accumulo 4.0K Feb 18 12:42 ..
-rwxr-xr-x 1 root root 3.0K Feb 18 12:53 accumulo-env.sh
-rw-r--r-- 1 root root 3.8K Feb 18 13:40 accumulo-site.xml
-rw-r--r-- 1 root     root       21 Feb 18 14:11 gc
-rw-r--r-- 1 root     root       21 Feb 18 14:00 masters
-rw-r--r-- 1 root     root       21 Feb 18 14:11 monitor
-rw-r--r-- 1 root     root       21 Feb 18 14:11 slaves
-rw-r--r-- 1 root     root       21 Feb 18 14:11 tracers
[busbey@master2 auto]$ reset && ./run.py -f 4 -t SunnyDayTest | tee --append ~/accumulo-1.5.1-rc2-bin.functional_tests.log
14:12:43 runTest (simple.readwrite.SunnyDayTest) ............................ ok

----------------------------------------------------------------------
Ran 1 test in 39.742s

OK
{noformat}



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)