maas-cluster fails to register if the host has an IPv6 address

Bug #1379568 reported by James Troup
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Critical
Jeroen T. Vermeulen

Bug Description

When a MAAS cluster controller is installed on a host with IPv6 it
will fail to register with the region controller.
/var/log/maas/maas.log says:

Oct 9 21:48:47 gremlin maas.cluster: [INFO] Could not register with region controller: BAD REQUEST.

There's no more detail but using tcpdump I was able to see that it was
doing a POST to /MAAS/api/1.0/nodegroups/?op=register with the
following payload:

'[{"interface": "lxcbr0", "ip": "10.0.3.1", "subnet_mask": "255.255.255.0"}, {"interface": "br0", "ip": "10.124.0.10", "subnet_mask": "255.255.248.0"}, {"interface": "br0", "ip": "2001:67c:1360:1::1:2", "subnet_mask": "ffff:ffff:ffff:ffff:ffff:ffff:ffff:fffc"}]'

Based on that, I guessed the problem was the IPv6 address and indeed,
when I deleted the IPv6 from br0, the cluster was able to register
with the region controller.

This is MAAS 1.7beta5 from the experimental PPA.

Tags: canonical-is

Related branches

James Troup (elmo)
tags: added: canonical-is
Revision history for this message
Julian Edwards (julian-edwards) wrote :

Sorry if you're not the best person to look at this jtv. I'll happily fix it if you don't know where the problem lies.

Changed in maas:
status: New → Triaged
importance: Undecided → Critical
milestone: none → 1.7.0
assignee: nobody → Jeroen T. Vermeulen (jtv)
Revision history for this message
James Troup (elmo) wrote :

And the response is:

Invalid interface: {u'interface': u'br0', u'ip': u'2001:67c:1360:1::1:2', u'subnet_mask': u'ffff:ffff:ffff:ffff:ffff:ffff:ffff:fffc'} ({u'subnet_mask': [u'IPv6 netmask is always 64 bits wide. Leave it blank.']}).

Revision history for this message
James Troup (elmo) wrote :

NodeGroupInterfaceForm.clean():

| ipv6_netmask = IPAddress('ffff:ffff:ffff:ffff::')
| if netmask and IPAddress(netmask) != ipv6_netmask:
| set_form_error(
| self, 'subnet_mask',
| "IPv6 netmask is always 64 bits wide. Leave it blank.")

This is just epic bong.

Trivial counter example: http://www.rfc-editor.org/rfc/rfc6164.txt

Changed in maas:
status: Triaged → In Progress
Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

My apologies for this. I had been told always to use 64-bit netmasks for the nodes, and I was aware that other netmasks existed, but I just wasn't expecting this code to attempt to register a non-64-bit subnet and then crash.

I'm attaching a fix that accepts non-64-bit netmasks. Something it doesn't do yet is actually configure user-configured netmasks on the node, so this will fix the crash but still won't give you full support for other netmasks on node networks. I can fix that too, if it's a sensible thing to support, but I wanted to get the crash out of the way first.

Changed in maas:
status: In Progress → Fix Committed
Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

The fix for this problem has landed, and I'm in the process of landing full support for arbitrary IPv6 netmasks. James, hopefully your crash will be gone as of maas trunk r3235. And as of r3237 or so, you should be able to use subnets of different sizes for managing nodes as well.

Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.