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

sqlness test suite lacks isolation #4779

Closed
v0y4g3r opened this issue Sep 27, 2024 · 1 comment · Fixed by #4780
Closed

sqlness test suite lacks isolation #4779

v0y4g3r opened this issue Sep 27, 2024 · 1 comment · Fixed by #4780
Assignees
Labels
C-bug Category Bugs

Comments

@v0y4g3r
Copy link
Contributor

v0y4g3r commented Sep 27, 2024

What type of bug is this?

User Experience

What subsystems are affected?

Other

Minimal reproduce step

Inside project root:

mkdir /tmp/{greptime,metasrv,flownode,demo,export}
sudo chown -R root:root /tmp/{greptime,metasrv,flownode,demo,export}
cargo sqlness

What did you expect to see?

sqlness test cases all pass since we expected that each test uses their own directory like `/tmp/sqlness[...]/

What did you see instead?

metasrv log file at /tmp/sqlnessVeVVks/greptime-sqlness-metasrv.log
Generating metasrv config file in /tmp/sqlnessVeVVks/greptimedb-metasrv/metasrv-1727471462905.toml, full content:
[wal]

provider = "raft_engine"


thread 'main_spawn' panicked at /home/lei/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tracing-appender-0.2.3/src/rolling.rs:154:14:
initializing rolling file appender failed: InitError { context: "failed to create log directory", source: Os { code: 13, kind: PermissionDenied, message: "Permission denied" } }
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
thread 'main' panicked at src/cmd/src/bin/greptime.rs:86:10:
Couldn't join on the associated thread: Any { .. }
thread 'main' panicked at tests/runner/src/env.rs:289:13:
metasrv doesn't up in 10 seconds, quit.
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

What operating system did you use?

NA

What version of GreptimeDB did you use?

latest

Relevant log output and stack trace

No response

@v0y4g3r v0y4g3r added the C-bug Category Bugs label Sep 27, 2024
@v0y4g3r
Copy link
Contributor Author

v0y4g3r commented Sep 27, 2024

This creates annoying permission issues when a host is shared by multiple users. The first user to run cargo sqlness owns the created directories, preventing others from running cargo sqlness.

There're two leaked directories:

  • while creating metasrv/frontend/datanode/flownode instances, the log output is not specified, so all go to /tmp/greptimedb
  • those copy to/from cases all share /tmp/demo and /tmp/export directories.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category Bugs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant