Skip to content

Conversation

@vin01
Copy link

@vin01 vin01 commented Nov 21, 2025

Description

Until the latest release of plugin, it was using the older SDK version in release 1.1.2 (Feb 29, 2024). In 1.1.3 however the latest SDK version is in use which includes proper handling of ipv6 addresses directly in the SDK itself: https://github.com/hashicorp/packer-plugin-sdk/pull/246/files

This breaks ipv6 connectivity for openstack plugin because address is returned with square braces around it.

I have kept if/else structure the same to ensure precedence still is given to ipv6 if present and returned first. No logic change.

Error messages from 1.1.3 using latest plugin sdk showing redundant square braces

2025/11/21 09:59:44 packer-plugin-openstack_v1.1.3_x5.0_linux_amd64 plugin: 2025/11/21 09:59:44 [DEBUG] TCP connection to SSH ip/port failed: dial tcp: address [[2a00:1350:2001:211]]:22: missing port in address

Changes to Security Controls

No changes related to security controls.

@vin01 vin01 requested a review from a team as a code owner November 21, 2025 10:21
var addr string
address := element.(map[string]interface{})
address_value := address["addr"].(string)
if address["OS-EXT-IPS:type"] == "floating" {
Copy link

Choose a reason for hiding this comment

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

I think we can get rid of this entire if else workflow now

Copy link
Author

Choose a reason for hiding this comment

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

I think that is needed to use the right precedence (ipv6 > ipv4) and also if explicit config option forces use of v4 or v6.

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.

2 participants