[2.1, 2.0 UI] Error when using dhcp range with pre-existing dynamic reservation

Bug #1608555 reported by Andreas Hasenack on 2016-08-01
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Critical
Newell Jensen
2.0
Critical
Newell Jensen
Trunk
Critical
Newell Jensen

Bug Description

I installed MAAS 2.0.0~rc3+bzr5180-0ubuntu2~16.04.1 from scratch on a fresh xenial VM.

After importing images, I went to the subnet page and started configuring my network (DNS, gateway). I saw a "Reserved" section with a "dynamic range" button and reserved that.

I also reserved two other static ranges, since I was there, to experiment with. In the end I had this (see screenshot):

10.245.201.1 10.245.201.255 MAAS Dynamic Dynamic
10.245.202.1 10.245.202.255 admin Reserved Static range
10.245.203.1 10.245.207.254 admin Reserved Floating IP

The network is 10.245.200.0/255.255.248.0

I then went to the default vlan page and tried to provide dhcp. The form that was presented had the dynamic range already filled in, but with incorrect values:

start: 10.245.205.255
end: 10.245.207.254

I changed them to be start=10.245.201.1 and end=10.245.201.255, just like the range I had defined earlier, but that gives me an error in the UI when I try to apply it:

    The IPRange could not be created because the data didn't validate

And this backtrace in regiond.log (http://pastebin.ubuntu.com/21765219/):
2016-08-01 10:44:32 [-] Error on request (30) vlan.configure_dhcp: The IPRange could not be created because the data didn't validate.
        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 904, 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 937, in callInContext
            return func(*args, **kwargs)
          File "/usr/lib/python3/dist-packages/maasserver/utils/orm.py", line 602, in call_within_transaction
            return func_outside_txn(*args, **kwargs)
          File "/usr/lib/python3/dist-packages/maasserver/utils/orm.py", line 421, 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/vlan.py", line 166, in configure_dhcp
            self._configure_iprange_and_gateway(parameters['extra'])
          File "/usr/lib/python3/dist-packages/maasserver/websockets/handlers/vlan.py", line 144, in _configure_iprange_and_gateway
            iprange_form.save()
          File "/usr/lib/python3/dist-packages/django/forms/models.py", line 459, in save
            construct=False)
          File "/usr/lib/python3/dist-packages/django/forms/models.py", line 86, in save_instance
            " validate." % (opts.object_name, fail_message))
        builtins.ValueError: The IPRange could not be created because the data didn't validate.

Related branches

Andreas Hasenack (ahasenack) wrote :
Andreas Hasenack (ahasenack) wrote :
summary: - Can't use dhcp range with pre-existing dynamic reservation
+ Error when using dhcp range with pre-existing dynamic reservation
tags: removed: kanban-cross-team
summary: - Error when using dhcp range with pre-existing dynamic reservation
+ [2.1, 2.0 UI] Error when using dhcp range with pre-existing dynamic
+ reservation

Hello Andreas, or anyone else affected,

Accepted maas into yakkety-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/maas/2.1.0+bzr5480-0ubuntu1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-needed
Andres Rodriguez (andreserl) wrote :

I've tested this and can confirm it has been fixed. Marking verification-done

tags: added: verification-done
removed: verification-needed
Changed in maas:
status: Fix Committed → Fix Released

The verification of the Stable Release Update for maas has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers