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

Multiple sstable* tools missing from the PATH of the official Docker image #272

Open
aldobongio opened this issue Dec 21, 2023 · 3 comments

Comments

@aldobongio
Copy link

All the up-to-date Cassandra Docker images are missing multiple sstable-related tools (for instance sstabledump):

#> docker run -d --name test cassandra:4.1.3
#> docker exec -it test ls /opt/cassandra/bin
cassandra  cassandra.in.sh  cqlsh  cqlsh.py  debug-cql  nodetool  sstableloader  sstablescrub  sstableupgrade  sstableutil  sstableverify  stop-server
#> docker stop test
#> docker rm -v test
#> docker run -d --name test cassandra:5.0-beta1
#> docker exec -it test ls /opt/cassandra/bin
cassandra  cassandra.in.sh  cqlsh  cqlsh.py  debug-cql  nodetool  sstableloader  sstablescrub  sstableupgrade  sstableutil  sstableverify  stop-server
#> docker stop test
#> docker rm -v test
docker run -d --name test cassandra:3.11.16
#> docker exec -it test ls /opt/cassandra/bin
cassandra         cassandra.in.sh  cqlsh.bat  debug-cql.bat  source-conf.ps1    sstablescrub      sstableupgrade.bat  sstableverify      stop-server.bat
cassandra.bat     cassandra.ps1    cqlsh.py   nodetool       sstableloader      sstablescrub.bat  sstableutil         sstableverify.bat  stop-server.ps1
cassandra.in.bat  cqlsh            debug-cql  nodetool.bat   sstableloader.bat  sstableupgrade    sstableutil.bat     stop-server
@tianon
Copy link
Member

tianon commented Dec 21, 2023

It looks like for some reason upstream chose to move those into tools/bin instead:

$ docker run --rm cassandra ls -l /opt/cassandra/tools/bin/
total 64
-rwxr-xr-x 1 root root 1774 Jul 18 20:08 auditlogviewer
-rw-r--r-- 1 root root 4666 Jul 18 20:08 cassandra.in.sh
-rwxr-xr-x 1 root root 1677 Jul 18 20:08 cassandra-stress
-rwxr-xr-x 1 root root 1687 Jul 18 20:08 compaction-stress
-rwxr-xr-x 1 root root 2388 Jul 18 20:08 fqltool
-rwxr-xr-x 1 root root 1905 Jul 18 20:08 generatetokens
-rwxr-xr-x 1 root root 1902 Jul 18 20:08 hash_password
-rwxr-xr-x 1 root root 2380 Jul 18 20:08 jmxtool
-rwxr-xr-x 1 root root 1773 Jul 18 20:08 sstabledump
-rwxr-xr-x 1 root root 1782 Jul 18 20:08 sstableexpiredblockers
-rwxr-xr-x 1 root root 1780 Jul 18 20:08 sstablelevelreset
-rwxr-xr-x 1 root root 1781 Jul 18 20:08 sstablemetadata
-rwxr-xr-x 1 root root 1781 Jul 18 20:08 sstableofflinerelevel
-rwxr-xr-x 1 root root 1783 Jul 18 20:08 sstablerepairedset
-rwxr-xr-x 1 root root 1778 Jul 18 20:08 sstablesplit

@aldobongio
Copy link
Author

Good spot. How about adding /opt/cassandra/tools/bin/ to the PATH?

#> docker exec -it <CONTAINER_ID> nodetool version
ReleaseVersion: 3.11.16
#> docker exec -it <CONTAINER_ID> sstabledump
OCI runtime exec failed: exec failed: unable to start container process: exec: "sstabledump": executable file not found in $PATH: unknown

@aldobongio aldobongio changed the title Multiple sstable* tools missing from the official Docker image Multiple sstable* tools missing from the PATH of the official Docker image Dec 21, 2023
@tianon
Copy link
Member

tianon commented Dec 21, 2023

Interesting thought, but I do worry about how many of those are generally intended for use? For example, their Debian packages only put a few of them in PATH: https://github.com/apache/cassandra/blob/5321f88c40cc9ad280a7fb7472194b93e93334c0/debian/cassandra.install#L25-L30

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

No branches or pull requests

2 participants