scylladb / scylla-ccm

Cassandra Cluster Manager, modified for Scylla
Apache License 2.0
22 stars 68 forks source link

"ccm create" prints misleading error message when build/release/scylla is missing #95

Open tgrabiec opened 7 years ago

tgrabiec commented 7 years ago
$ ccm create scylla-2 --scylla --vnodes -n 2 --install-dir=/home/tgrabiec/src/scylla-ccm/../scylla2
Traceback (most recent call last):
  File "/home/tgrabiec/src/scylla-ccm/ccm", line 73, in <module>
    cmd.validate(parser, options, args)
  File "/home/tgrabiec/src/scylla-ccm/ccmlib/cmds/cluster_cmds.py", line 146, in validate
    common.validate_install_dir(options.install_dir)
  File "/home/tgrabiec/src/scylla-ccm/ccmlib/common.py", line 412, in validate_install_dir
    elif isDse(install_dir):
  File "/home/tgrabiec/src/scylla-ccm/ccmlib/common.py", line 359, in isDse
    raise ArgumentError('Installation directory does not contain a bin directory: %s' % install_dir)
ccmlib.common.ArgumentError: Installation directory does not contain a bin directory: /home/tgrabiec/src/scylla-ccm/../scylla2
tgrabiec commented 1 year ago

Now it fails like this:

INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/home/tgrabiec/.pyenv/versions/3.9.10/envs/dtest-3.9.10/lib/python3.9/site-packages/_pytest/main.py", line 269, in wrap_session
INTERNALERROR>     session.exitstatus = doit(config, session) or 0
INTERNALERROR>   File "/home/tgrabiec/.pyenv/versions/3.9.10/envs/dtest-3.9.10/lib/python3.9/site-packages/_pytest/main.py", line 322, in _main
INTERNALERROR>     config.hook.pytest_collection(session=session)
INTERNALERROR>   File "/home/tgrabiec/.pyenv/versions/3.9.10/envs/dtest-3.9.10/lib/python3.9/site-packages/pluggy/_hooks.py", line 265, in __call__
INTERNALERROR>     return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
INTERNALERROR>   File "/home/tgrabiec/.pyenv/versions/3.9.10/envs/dtest-3.9.10/lib/python3.9/site-packages/pluggy/_manager.py", line 80, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR>   File "/home/tgrabiec/.pyenv/versions/3.9.10/envs/dtest-3.9.10/lib/python3.9/site-packages/pluggy/_callers.py", line 60, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/home/tgrabiec/.pyenv/versions/3.9.10/envs/dtest-3.9.10/lib/python3.9/site-packages/pluggy/_result.py", line 60, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "/home/tgrabiec/.pyenv/versions/3.9.10/envs/dtest-3.9.10/lib/python3.9/site-packages/pluggy/_callers.py", line 39, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/home/tgrabiec/.pyenv/versions/3.9.10/envs/dtest-3.9.10/lib/python3.9/site-packages/_pytest/main.py", line 333, in pytest_collection
INTERNALERROR>     session.perform_collect()
INTERNALERROR>   File "/home/tgrabiec/.pyenv/versions/3.9.10/envs/dtest-3.9.10/lib/python3.9/site-packages/_pytest/main.py", line 637, in perform_collect
INTERNALERROR>     hook.pytest_collection_modifyitems(
INTERNALERROR>   File "/home/tgrabiec/.pyenv/versions/3.9.10/envs/dtest-3.9.10/lib/python3.9/site-packages/pluggy/_hooks.py", line 265, in __call__
INTERNALERROR>     return self._hookexec(self.name, self.get_hookimpls(), kwargs, firstresult)
INTERNALERROR>   File "/home/tgrabiec/.pyenv/versions/3.9.10/envs/dtest-3.9.10/lib/python3.9/site-packages/pluggy/_manager.py", line 80, in _hookexec
INTERNALERROR>     return self._inner_hookexec(hook_name, methods, kwargs, firstresult)
INTERNALERROR>   File "/home/tgrabiec/.pyenv/versions/3.9.10/envs/dtest-3.9.10/lib/python3.9/site-packages/pluggy/_callers.py", line 60, in _multicall
INTERNALERROR>     return outcome.get_result()
INTERNALERROR>   File "/home/tgrabiec/.pyenv/versions/3.9.10/envs/dtest-3.9.10/lib/python3.9/site-packages/pluggy/_result.py", line 60, in get_result
INTERNALERROR>     raise ex[1].with_traceback(ex[2])
INTERNALERROR>   File "/home/tgrabiec/.pyenv/versions/3.9.10/envs/dtest-3.9.10/lib/python3.9/site-packages/pluggy/_callers.py", line 39, in _multicall
INTERNALERROR>     res = hook_impl.function(*args)
INTERNALERROR>   File "/mnt/src/scylla-dtest/conftest.py", line 397, in pytest_collection_modifyitems
INTERNALERROR>     _is_enterprise = is_enterprise(cassandra_dir, scylla_version)
INTERNALERROR>   File "/mnt/src/scylla-dtest/tools/marks.py", line 28, in is_enterprise
INTERNALERROR>     return dtest_config.is_enterprise
INTERNALERROR>   File "/mnt/src/scylla-dtest/dtest_config.py", line 102, in is_enterprise
INTERNALERROR>     version = self.get_version_from_build()
INTERNALERROR>   File "/mnt/src/scylla-dtest/dtest_config.py", line 74, in get_version_from_build
INTERNALERROR>     return get_version_from_build(self.cassandra_dir)
INTERNALERROR>   File "/mnt/src/scylla-ccm/ccmlib/common.py", line 690, in get_version_from_build
INTERNALERROR>     with open(build) as f:
INTERNALERROR> FileNotFoundError: [Errno 2] No such file or directory: '/mnt/src/scylla/build/dbuild/build.xml'