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

docs/setting-up-ipv6-in-a-zone.md: IPv6 instructions not valid for Bhyve/KVM zones #76

Open
blackhelicoptersdotnet opened this issue Oct 21, 2024 · 4 comments

Comments

@blackhelicoptersdotnet
Copy link

blackhelicoptersdotnet commented Oct 21, 2024

The procedure for configuring IPv6 set out in docs/blob/master/docs/setting-up-ipv6-in-a-zone.md does not work for Linux in Bhyve or KVM zones.

The addrconf value gets passed to cloud-init as an IP address but cloud-init has no idea what to do with it, and so it throws an error.

# cloud-init status -l
status: error
extended_status: error
boot_status_code: enabled-by-generator
last_update: Mon, 21 Oct 2024 00:52:15 +0000
detail:
Cloud-init enabled by systemd cloud-init-generator
errors:
	- Address addrconf is not a valid ip address
	- Address addrconf is not a valid ip address
recoverable_errors:
ERROR:
	- Address addrconf is not a valid ip network
	- Address addrconf is not a valid ip network
WARNING:
	- failed stage init
	- failed stage init-local

/var/lib/cloud/instances/c3cfc40e-9b68-4330-bbd1-5f36f4439815/network-config.json

{
 "config": [
  {
   "mac_address": "e2:7f:c1:50:eb:99",
   "name": "net0",
   "subnets": [
    {
     "address": "10.64.1.130/26",
     "gateway": "10.64.1.129",
     "type": "static"
    },
    {
     "address": "addrconf",
     "type": "static"
    }
   ],
   "type": "physical"
  },
  {
   "address": [
    "10.64.255.1"
   ],
   "search": [],
   "type": "nameserver"
  }
 ],
 "version": 1
} 
@blackhelicoptersdotnet
Copy link
Author

blackhelicoptersdotnet commented Oct 21, 2024

I've got a PR pending in cloud-init to fix the issue there, but it might not be backported to images that are presently in the wild, and so the docs may continue to cause some confusion.

canonical/cloud-init#5831

@bahamat
Copy link
Member

bahamat commented Oct 21, 2024

Hi @blackhelicoptersdotnet,

Yes, this is most definitely a bug in cloud-init not recognizing how we designate address auto configuration.

One thing about your cloud-init PR, in SmartOS addrconf means either stateless (i.e., SLAAC), or stateful (DHCPv6) configuration. I notice that you set subnet = {"type": "dhcp6"}. If cloud-init has a distinction for SLAAC, that should be accounted for. Otherwise, that PR looks good from my perspective.

@blackhelicoptersdotnet
Copy link
Author

@bahamat I was thinking the same thing. It turns out that dhcp6 in cloud-init is imprecisely named; in practice it results in SmartOS addrconf style behaviour on most/all distros.

There are other options, such as ipv6_dhcpv6-stateful to force specific behaviour.

@bahamat
Copy link
Member

bahamat commented Oct 22, 2024

@blackhelicoptersdotnet Ok, great. Sounds good.

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