MAAS fails to add a DHCP snippet with "subnet6 statement is only supported in DHCPv6 mode."

Bug #1585814 reported by Mike Matera
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
High
Lee Trager

Bug Description

On a fresh install of MAAS on 16.04 MAAS cannot add ANY snippet, even a comment. It always fails with:

 {"value": ["subnet6 statement is only supported in DHCPv6 mode."]}

I have tried from the UI and the command line.

Here's the exception:

2016-05-25 15:02:31 [-] Error on request (17) dhcpsnippet.create: {"value": ["subnet6 statement is only supported in DHCPv6 mode."]}
 Traceback (most recent call last):
   File "/usr/lib/python3.5/threading.py", line 862, in run
     self._target(*self._args, **self._kwargs)
   File "/usr/lib/python3/dist-packages/provisioningserver/utils/twisted.py", line 841, in worker
     return target()
   File "/usr/lib/python3/dist-packages/twisted/_threads/_threadworker.py", line 46, in work
     task()
   File "/usr/lib/python3/dist-packages/twisted/_threads/_team.py", line 190, in doWork
     task()
 --- <exception caught here> ---
   File "/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 246, in inContext
     result = inContext.theWork()
   File "/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 262, in <lambda>
     inContext.theWork = lambda: context.call(ctx, func, *args, **kw)
   File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 118, in callWithContext
     return self.currentContext().callWithContext(ctx, func, *args, **kw)
   File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 81, in callWithContext
     return func(*args,**kw)
   File "/usr/lib/python3/dist-packages/provisioningserver/utils/twisted.py", line 874, in callInContext
     return func(*args, **kwargs)
   File "/usr/lib/python3/dist-packages/maasserver/utils/orm.py", line 516, in call_within_transaction
     return func_outside_txn(*args, **kwargs)
   File "/usr/lib/python3/dist-packages/maasserver/utils/orm.py", line 343, in retrier
     return func(*args, **kwargs)
   File "/usr/lib/python3.5/contextlib.py", line 30, in inner
     return func(*args, **kwds)
   File "/usr/lib/python3/dist-packages/maasserver/websockets/handlers/dhcpsnippet.py", line 66, in create
     return super().create(params)
   File "/usr/lib/python3/dist-packages/maasserver/websockets/base.py", line 375, in create
     raise HandlerValidationError(form.errors)
 maasserver.websockets.base.HandlerValidationError: {'value': ['subnet6 statement is only supported in DHCPv6 mode.']}

MAAS Packages:

student@torc0:/var/log$ dpkg -l '*maas*' | cat
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-===============================-============================-============-=================================================
ii maas 2.0.0~beta3+bzr4941-0ubuntu1 all "Metal as a Service" is a physical cloud and IPAM
ii maas-cli 2.0.0~beta3+bzr4941-0ubuntu1 all MAAS client and command-line interface
un maas-cluster-controller <none> <none> (no description available)
ii maas-common 2.0.0~beta3+bzr4941-0ubuntu1 all MAAS server common files
ii maas-dhcp 2.0.0~beta3+bzr4941-0ubuntu1 all MAAS DHCP server
ii maas-dns 2.0.0~beta3+bzr4941-0ubuntu1 all MAAS DNS server
ii maas-proxy 2.0.0~beta3+bzr4941-0ubuntu1 all MAAS Caching Proxy
ii maas-rack-controller 2.0.0~beta3+bzr4941-0ubuntu1 all Rack Controller for MAAS
ii maas-region-api 2.0.0~beta3+bzr4941-0ubuntu1 all Region controller API service for MAAS
ii maas-region-controller 2.0.0~beta3+bzr4941-0ubuntu1 all Region Controller for MAAS
un maas-region-controller-min <none> <none> (no description available)
un python-django-maas <none> <none> (no description available)
un python-maas-client <none> <none> (no description available)
un python-maas-provisioningserver <none> <none> (no description available)
ii python3-django-maas 2.0.0~beta3+bzr4941-0ubuntu1 all MAAS server Django web framework (Python 3)
ii python3-maas-client 2.0.0~beta3+bzr4941-0ubuntu1 all MAAS python API client (Python 3)
ii python3-maas-provisioningserver 2.0.0~beta3+bzr4941-0ubuntu1 all MAAS server provisioning libraries (Python 3)

Logs attached.

Tags: sprint track

Related branches

Revision history for this message
Mike Matera (fatboymaximus) wrote :
Revision history for this message
Mike Matera (fatboymaximus) wrote :

Hello!

The problem went away after I DELETED all of my IPv6 networks. I need them going forward!

Revision history for this message
Andres Rodriguez (andreserl) wrote :

@Mike,

Also, you need to enable DHCP for a IPv6 subnet in any of the VLANs.

Changed in maas:
status: New → Invalid
Revision history for this message
Tom Boucher (trekkie-b) wrote :

I was able to replicate this. I wanted to add the authoritative; snippet and can't as I get the error message.

I have DHCP enabled for both IPv4 and IPv6 subnet

Changed in maas:
status: Invalid → Confirmed
Changed in maas:
milestone: none → 2.5.0beta2
assignee: nobody → Lee Trager (ltrager)
tags: added: sprint track
Lee Trager (ltrager)
Changed in maas:
importance: Undecided → High
status: Confirmed → In Progress
Changed in maas:
status: In Progress → Fix Committed
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.