Skip to content

[DigitalOcean] Include IPv6 addresses in node public/private IPs#2173

Open
Sanjays2402 wants to merge 1 commit into
apache:trunkfrom
Sanjays2402:fix/digitalocean-ipv6-public-ips
Open

[DigitalOcean] Include IPv6 addresses in node public/private IPs#2173
Sanjays2402 wants to merge 1 commit into
apache:trunkfrom
Sanjays2402:fix/digitalocean-ipv6-public-ips

Conversation

@Sanjays2402

Copy link
Copy Markdown
Contributor

[DigitalOcean] Include IPv6 addresses in node public/private IPs

Description

Closes #1738

DigitalOcean_v2_NodeDriver._to_node() only iterated the v4 networks list, so a droplet's public IPv6 address was never reported in Node.public_ips. Each match also reassigned the list (public_ips = [...]) instead of appending, so only the last address of a given type survived. Both lists are now iterated and addresses appended.

This matches the patch proposed in the issue. Note that the existing list_nodes fixture already contains a public IPv6 address (2604:a880:4:1d0::142:9000) that was being silently dropped, so test_list_nodes_success was updated to assert it.

Status

done, ready for review

Checklist (tick everything that applies)

  • Code linting (required, can be done after the PR checks)
  • Documentation
  • Tests
  • ICLA (required for bigger changes)

The DigitalOcean v2 driver's _to_node() only iterated the "v4" networks
list, so a droplet's public IPv6 address was never reported in
Node.public_ips. Each match also reassigned the list rather than
appending, so only the last address of a given type survived.

Iterate both the "v4" and "v6" network lists and append, keeping every
reported address.

Adds a regression test covering a droplet with both an IPv4 and an IPv6
public address, and updates test_list_nodes_success, whose existing
fixture already contains a public IPv6 address that was being dropped.

Closes apache#1738
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.

Digital Ocean compute: public_ips += IPv6 addresses

1 participant