-
Notifications
You must be signed in to change notification settings - Fork 68
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
scylla_node: populate env variable when running scylla-sstable #502
Conversation
if scylla is built in a dtest environment, and the shared libraries which it is linked against cannot be found in the testbed's default ld.so.conf paths, the tests which run scylla-sstable would fail. so, in this change. let's apply the `self._launch_env` when running scylla-sstable as well. previously, these env variables are only applied when launching scylla as a daemon. Signed-off-by: Kefu Chai <[email protected]>
only for testing the CCM CI test using Nix. |
tested using $ scripts/dbuild_collect_so.sh ~/dev/scylladb/build/cmake/scylla /tmp/dynamic_libs_for_dtest
$ SCYLLA_DBUILD_SO_DIR=/tmp/dynamic_libs_for_dtest JAVA_HOME=/usr/lib/jvm/jre-11 pytest --cassandra-dir $HOME/dev/scylladb/build/cmake scylla_sstable_test.py::TestScyllaSstableDumpData::test_scylla_sstable_basic not really a dbuild build. but i also verified by checking the env variables manually. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I'll for @bhalevy to confirm, as the one that was hit by this issue, to validate it's solving it |
nit: s/dtest/dbuild/
|
env = self._launch_env | ||
except AttributeError: | ||
env = os.environ | ||
res = subprocess.run(common_args + sstables, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, check=True, env=env) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. This is almost identical to the change I made in my tree.
if scylla is built in a dtest environment, and the shared libraries which it is linked against cannot be found in the testbed's default ld.so.conf paths, the tests which run scylla-sstable would fail.
so, in this change. let's apply the
self._launch_env
when running scylla-sstable as well. previously, these env variables are only applied when launching scylla as a daemon.