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

Make cqlsh work with unix domain sockets #67

Merged
merged 2 commits into from
Jan 17, 2024

Conversation

sylwiaszunejko
Copy link
Contributor

@sylwiaszunejko sylwiaszunejko commented Jan 15, 2024

In order to use unix domain sockets with python-driver, we have to wrap hostname in UnixSocketEndPoint (like in this example: http://opensource.docs.scylladb.com/master/operating-scylla/admin-tools/maintenance-socket.html#with-python-driver).

This PR adds checking if hostname is a socket, and if so, it adds wrapping hostname into UnixSocketEndPoint.

I tested it locally using python-driver.

To work correctly it needs 3.26.5 python-driver release (there was no support for unix domain sockets in WhiteListRoundRobinPolicy before).

Fixes: scylladb/scylladb#16489

@fruch
Copy link
Collaborator

fruch commented Jan 15, 2024

Lgtm

But I think we need to wait for
scylladb/python-driver#287

To be merged and released

And then update that cqlsh is dependent on that (and update the requirements.txt, cause this what would be packged by scylla core)

@kbr-scylla
Copy link

But I think we need to wait for
scylladb/python-driver#287

To be merged and released

@fruch @avelanarius that fix was merged -- will we get a driver release soon?

(Sorry for asking for so many driver releases recently... I hope it's not too much of a PITA)

@avelanarius
Copy link

@kbr-scylla @Lorak-mmk will release today.

@avelanarius
Copy link

@kbr-scylla
Copy link

Nice, thanks.

@avelanarius
Copy link

@sylwiaszunejko Python Driver is now released, you can bump the version in

scylla-driver==3.26.3

In order to use WhiteListRoundRobinPolicy we have to wrap
hostname in UnixSocketEndPoint.
This commit adds checking if hostname is a socket, and if so,
it adds wrapping hostname into UnixSocketEndPoint.
@sylwiaszunejko sylwiaszunejko force-pushed the add_unix_socket_handling branch from 601226e to 2865af0 Compare January 17, 2024 16:00
@sylwiaszunejko
Copy link
Contributor Author

I updated the python-driver version in requirements.txt.

@sylwiaszunejko sylwiaszunejko requested a review from fruch January 17, 2024 16:44
Copy link
Collaborator

@fruch fruch left a comment

Choose a reason for hiding this comment

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

Lgtm

@fruch fruch merged commit b8d86b7 into scylladb:master Jan 17, 2024
7 checks passed
@fruch
Copy link
Collaborator

fruch commented Jan 17, 2024

Now we need to update the cqlsh submodule in scylla core to take this change

@kbr-scylla
Copy link

Now we need to update the cqlsh submodule in scylla core to take this change

Queued scylladb/scylladb@cc03949

Do we have some test suite for cqlsh? It would be good to have a regression test

@fruch
Copy link
Collaborator

fruch commented Jan 19, 2024

Now we need to update the cqlsh submodule in scylla core to take this change

Queued scylladb/scylladb@cc03949

Do we have some test suite for cqlsh? It would be good to have a regression test

It has its own tests/CI, and quite good coverage in dtest gating (not the newly introduced feature, but that should be easy to add)

margdoc added a commit to margdoc/scylla that referenced this pull request Jan 25, 2024
After scylladb/scylla-cqlsh#67, the user can use
cqlsh to connect to the node by maintenance socket.
dgarcia360 pushed a commit to dgarcia360/scylla that referenced this pull request Apr 30, 2024
After scylladb/scylla-cqlsh#67, the user can use
cqlsh to connect to the node by maintenance socket.
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.

Maintenance socket follow-up: fix cqlsh
4 participants