Skip to content
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

"/opt/flocker/bin/trail [test]" failed in scratch flocker installation #2959

Open
shay-berman opened this issue Nov 24, 2016 · 4 comments
Open

Comments

@shay-berman
Copy link

Hello

I installed flocker 1.15 (by the instruction mentioned here)
The I install my flocker driver successfully but when I try to run the flocker driver test, I get this error (exceptions.ImportError: No module named mimic.tap):
I though that clean Flocker installation allows to run /opt/flocker/bin/trial [test] out of the box.
Do I miss something?

here is the full error:

/opt/flocker/bin/trial ibm_storage_flocker_driver.test_ibm_storage_flocker_driver
ibm_storage_flocker_driver
test_ibm_storage_flocker_driver ... [ERROR]

===============================================================================
[ERROR]
Traceback (most recent call last):
File "/opt/flocker/lib/python2.7/site-packages/twisted/trial/runner.py", line 605, in loadByNames
things.append(self.findByName(name))
File "/opt/flocker/lib/python2.7/site-packages/twisted/trial/runner.py", line 409, in findByName
return reflect.namedAny(name)
File "/opt/flocker/lib/python2.7/site-packages/twisted/python/reflect.py", line 303, in namedAny
topLevelPackage = _importAndCheckStack(trialname)
File "/opt/flocker/lib/python2.7/site-packages/twisted/python/reflect.py", line 250, in _importAndCheckStack
reraise(excValue, excTraceback)
File "/opt/flocker/lib/python2.7/site-packages/ibm_storage_flocker_driver/test_ibm_storage_flocker_driver.py", line 19, in
from flocker.node.agents.test.test_blockdevice import (
File "/opt/flocker/lib/python2.7/site-packages/flocker/node/agents/test/test_blockdevice.py", line 122, in
from ..testtools import (
File "/opt/flocker/lib/python2.7/site-packages/flocker/node/agents/testtools/init.py", line 7, in
from ._cinder import (
File "/opt/flocker/lib/python2.7/site-packages/flocker/node/agents/testtools/_cinder.py", line 7, in
from mimic.tap import makeService as mimic_make_service
exceptions.ImportError: No module named mimic.tap

ibm_storage_flocker_driver.test_ibm_storage_flocker_driver

Ran 1 tests in 0.003s

FAILED (errors=1)

If i run
#> /opt/flocker/pip install -r https://github.com/ClusterHQ/flocker/blob/master/requirements/flocker-dev.txt

it install all the dependences and the /opt/flocker/bin/trial [test] running well.

If customer wants to run the driver test, he will have to install the flocker-dev.txt first, is it acceptable?
I though all the dependencies should come with scratched flocker installation.

Thanks
Shay

@wallrj
Copy link
Contributor

wallrj commented Nov 25, 2016

Thanks @shay-berman

You're right. If we encourage people to run the tests on packaged Flocker we should include all the dependencies required to run the tests.

@shay-berman
Copy link
Author

shay-berman commented Nov 26, 2016

In order to run the driver test in production Flocker node, you need to install the following dependencies(in redhat):

yum install enchant gcc python-devel openssl-devel
/opt/flocker/bin/pip install -r /tmp/flocker-dev.txt
#Then the /opt/flocker/trial [driver test] will work

If you encourage customers to run the trial test immediate after installing Flocker driver, then I guess we should fine easier way to run it.
Any suggestions?

@wallnerryan
Copy link
Contributor

wallnerryan commented Nov 29, 2016

@wallrj is this just a documentation update or does this sound more like maybe a re-organize of the requirements would help

@wallrj
Copy link
Contributor

wallrj commented Nov 29, 2016

In #2959 (comment) @wallnerryan

@wallrj is this just a documentation update or does this sound more like maybe a re-organize of the requirements would help

We probably need to re-organise our requirements files.
The enchant library is only required because we include the sphinx spellcheck extension in flocker-dev.txt

Instead, that should probably be separated out into requirements/docs.txt along with the Python dependencies that are required for building the docs.

Also note that @vchernoy and I have been discussing packaging Flocker as a Docker image only, in which case, all the Python and OS dependencies would be included in the Docker image and the tests could be run from inside the Docker container.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants