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

Unbracketed IPv6 addresses don't work #537

Closed
jeromedalbert opened this issue May 19, 2024 · 1 comment
Closed

Unbracketed IPv6 addresses don't work #537

jeromedalbert opened this issue May 19, 2024 · 1 comment

Comments

@jeromedalbert
Copy link
Contributor

jeromedalbert commented May 19, 2024

Problem

I can use SSHKit with a bracketed IPv6 address like so:

on ['[1fff:0:a88:85a3::ac1f]'] do |host|

But if I try to use an unbracketed IPv6 address

on ['1fff:0:a88:85a3::ac1f'] do |host|

I get the following error:

/Users/jerome/.asdf/installs/ruby/3.3.1/lib/ruby/gems/3.3.0/gems/sshkit-1.22.2/lib/sshkit/runners/parallel.rb:15:in `rescue in block (2 levels) in execute': Exception while executing on host 1fff: getaddrinfo: nodename nor servname provided, or not known (SSHKit::Runner::ExecuteError)

Additional information

Ubracketed IPv6 addresses are valid IPv6 addresses, so I think SSHKit should be able to parse them.

In my particular case, I am encountering this issue when using Kamal. Supplying an unbracketed IPv6 address in the Kamal config/deploy.yml configuration doesn't work because Kamal then passes that IP to SSHKit, as explained in this open issue: basecamp/kamal#588. As mentioned in that issue, using brackets as a workaround doesn't work out of the box and requires further hacks overriding SSHKit's behavior, but these hacks all stem from SSHKit not properly parsing unbracketed IPv6 in the first place. Parsing unbracketed IPv6 addresses correctly in SSHKit would naturally solve those issues and allow Kamal to support unbracketed IPv6 addresses (and maybe bracketed too).

Related issues

@mattbrictson
Copy link
Member

Closed via #538

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