scylladb / scylla-cqlsh

A fork of the cqlsh code
Apache License 2.0
16 stars 30 forks source link

Printing port when connecting by Unix domain socket #68

Open margdoc opened 8 months ago

margdoc commented 8 months ago

When connecting to the scylla node using the following command:

cqlsh /home/margdoc/Workspace/scylla/workdir/0/cql.m 

the first line of the output is:

Connected to  at /home/margdoc/Workspace/scylla/workdir/0/cql.m:9042

cqlsh prints the default port on which it connects to the scylla node but doesn't use it when connecting by maintenance socket.

fruch commented 8 months ago

it's teaching this function https://github.com/scylladb/scylla-cqlsh/blob/b8d86b764d8f2dd6059aa86f52d3deef3a6c392e/bin/cqlsh.py#L613 of a diffrent option probably the same trick used in the commit introducing the unix socket support

stat.S_ISSOCK(os.stat(self.hostname).st_mode)