diff --git a/pkg/dump/dumper.go b/pkg/dump/dumper.go index 7c2ad6803c..f1330ef64e 100644 --- a/pkg/dump/dumper.go +++ b/pkg/dump/dumper.go @@ -109,13 +109,19 @@ func (d *logDumper) DumpAllNodes(ctx context.Context, nodes corev1.NodeList, add node := &nodes.Items[i] ip := "" + ipv6 := "" for _, address := range node.Status.Addresses { if address.Type == "ExternalIP" { ip = address.Address break + } else if address.Type == "InternalIP" && strings.Contains(address.Address, ":") { + ipv6 = address.Address } } + if ip == "" { + ip = ipv6 + } err := d.dumpNode(ctx, node.Name, ip) if err != nil { log.Printf("could not dump node %s (%s): %v", node.Name, ip, err) @@ -420,7 +426,7 @@ var _ sshClientFactory = &sshClientFactoryImplementation{} // Dial implements sshClientFactory::Dial func (f *sshClientFactoryImplementation) Dial(ctx context.Context, host string) (sshClient, error) { - addr := host + ":22" + addr := net.JoinHostPort(host, "22") d := net.Dialer{ Timeout: 15 * time.Second, } diff --git a/pkg/resources/aws/aws.go b/pkg/resources/aws/aws.go index a8a1a216de..7efc4f8d47 100644 --- a/pkg/resources/aws/aws.go +++ b/pkg/resources/aws/aws.go @@ -534,6 +534,9 @@ func DumpInstance(op *resources.DumpOperation, r *resources.Resource) error { } } } + if len(i.PublicAddresses) == 0 && ec2Instance.Ipv6Address != nil { + i.PublicAddresses = append(i.PublicAddresses, *ec2Instance.Ipv6Address) + } for _, tag := range ec2Instance.Tags { key := aws.StringValue(tag.Key) if !strings.HasPrefix(key, awsup.TagNameRolePrefix) {