clustershell icon indicating copy to clipboard operation
clustershell copied to clipboard

clush: one host, multiple ports

Open lpirl opened this issue 10 years ago • 4 comments

I have a container host where every container listens on it's own port but all on localhost. It would be nice to not provide the host name to clush but the port, ex: "localhost:[24002-24009]"

lpirl avatar Nov 13 '14 14:11 lpirl

This kind of change would require a lot of change inside the code.

However, as a workaround, may be you can create ssh alias in your ssh config. ie:

 Host container24002
   Hostname localhost
   Port 24002
 Host container24003
   Hostname localhost
   Port 24003
 ...

And then use clustershell as usual clush -w container[24002-24003] ...

Another way to avoid patching a lot of different places in code would be to write your own Worker which extract the port from the Hostname, like a fork of Ssh Worker...

degremont avatar Nov 14 '14 08:11 degremont

Using ssh aliases is a good idea - I'll go for those until you have implemented all the changes (just kidding). Thanks! It wouldn't offend me if you close the ticket, although you could keep it as an idea for an enhancement.

lpirl avatar Nov 14 '14 10:11 lpirl

An idea for a fix with current Ssh Worker is to introduce placeholders in passed ssh options, so that it could be possible to use the node index as the port (but what index if using nodeset-nD?), and will also require a way to modify the destination host. Other that than, we don't plan to add it as a core feature of Ssh Worker as it mostly rely on ssh system configuration.

thiell avatar Mar 22 '15 10:03 thiell

This is not interesting for me anymore, so feel free to close this if you want.

lpirl avatar Jan 10 '21 15:01 lpirl