Skip to content

CASSANDRA-20181: Remove obsolete cqlsh Dockerfiles on 4.0#4634

Open
arvindKandpal-ksolves wants to merge 2 commits intoapache:cassandra-4.0from
arvindKandpal-ksolves:CASSANDRA-20181-4.0
Open

CASSANDRA-20181: Remove obsolete cqlsh Dockerfiles on 4.0#4634
arvindKandpal-ksolves wants to merge 2 commits intoapache:cassandra-4.0from
arvindKandpal-ksolves:CASSANDRA-20181-4.0

Conversation

@arvindKandpal-ksolves
Copy link
Contributor

@arvindKandpal-ksolves arvindKandpal-ksolves commented Feb 24, 2026

Description

This PR addresses CASSANDRA-20181 on the cassandra-4.0 branch.

Originally, these Dockerfiles were failing to build because they relied on EOL Ubuntu images. Following the discussion in the Jira ticket, it was decided to remove these files entirely to reduce the maintenance burden, as there are alternative ways to run these tests.

Changes

  • Removed: pylib/Dockerfile.ubuntu.py2
  • Removed: pylib/Dockerfile.ubuntu.py3
  • Removed: pylib/Dockerfile.ubuntu.py37
  • Removed: pylib/Dockerfile.ubuntu.py38
  • Updated: pylib/README.asc to remove documentation referencing these Dockerfiles.

Verification

I verified locally that the files are removed and README.asc no longer contains the obsolete instructions.

patch by Arvind Kandpal; for CASSANDRA-20181

@arvindKandpal-ksolves arvindKandpal-ksolves changed the title CASSANDRA-20181: Fix cqlsh docker build failure on 4.0 CASSANDRA-20181: Remove obsolete cqlsh Dockerfiles on 4.0 Feb 26, 2026
Comment on lines -17 to -35
There are Dockerfiles that can be used to test whether cqlsh works with a default, barebones
Python installation. Assuming Cassandra's source is checked out at `$CASSANDRA_DIR`. To test, first
build the Docker image containing the barebones Python installation -

$ docker build . --file Dockerfile.ubuntu.py3 -t ubuntu-lts-py3

Next, run cqlsh inside the newly built image -

$ docker run -v $CASSANDRA_DIR:/code -it ubuntu-lts-py3:latest /code/bin/cqlsh host.docker.internal

If `host.docker.internal` isn't supported, then you can use `--net="host"` with `docker run`:

$ docker run --net="host" -v $CASSANDRA_DIR:/code -it ubuntu-lts-py3:latest /code/bin/cqlsh

This will try to spawn a cqlsh instance inside the Docker container running Ubuntu LTS (18.04)
with minimal Python installation. It will try to connect to the Cassandra instance running on the
Docker host at port 9042. If you have Cassandra running elsewhere, replace host.docker.internal
with the IP / hostname as usual. Please ensure that the IP / host is accessible from _within_ the
Docker container. No newline at end of file
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's instead keep this, but use publicly available images…
(so it remains useful for folk who have docker but not python installed)

To run cqlsh using publicly available Docker images to connect to Cassandra on the same host, with `$CASSANDRA_DIR` pointing to either the source or install directory where `bin/cqlsh` is located.

For Python 3.8:

  docker run -v $CASSANDRA_DIR:/code -it python:3.8-slim /code/bin/cqlsh host.docker.internal

For Python 3.11:

  docker run -v $CASSANDRA_DIR:/code -it python:3.11-slim /code/bin/cqlsh host.docker.internal

If `host.docker.internal` isn't supported, then you can use `--net="host"`:

  docker run --net="host" -v $CASSANDRA_DIR:/code -it python:3.8-slim /code/bin/cqlsh

This will spawn a cqlsh instance inside the Docker container. It will try to connect to the Cassandra instance running on the Docker host at port 9042. If you have Cassandra running elsewhere, replace host.docker.internal with the IP / hostname as usual.

updating the list^ for the python versions each cassandra branch actually supports (does 4.0 support 3.11 ?)

@arvindKandpal-ksolves
Copy link
Contributor Author

Thanks for review, @michaelsembwever ,😃
I will test comments in local and will update all patches accordingly .
And will ensure I will add correct versions in each patch.

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

Successfully merging this pull request may close these issues.

2 participants