[2.0b5] ValueError: The IPRange could not be created because the data didn't validate.

Bug #1569960 reported by Andres Rodriguez on 2016-04-13
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MAAS
Medium
Unassigned

Bug Description

While trying to re-configure DHCP in the UI:

2016-04-13 23:06:52 [-] Error on request (27) 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 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/vlan.py", line 153, in configure_dhcp
     self._configure_iprange_and_gateway(parameters['extra'])
   File "/usr/lib/python3/dist-packages/maasserver/websockets/handlers/vlan.py", line 131, 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.

summary: - Sdf
+ ValueError: The IPRange could not be created because the data didn't
+ validate.
description: updated
Changed in maas:
importance: Undecided → Critical
milestone: none → 2.0.0

When we talked earlier, I think you said that after you refreshed the UI the option to change the range went away.

I think the root cause of this issue is most likely that the subnet cached in the UI did not get updated after the initial range was defined. (most likely an issue with the trigger the websocket is listening for)

It's also possible that the behavior will change with the latest code, since showing those fields is based on whether or not a suggestion for a possible dynamic range is seen in the incoming JSON from the server. So it would be good to try to reproduce with the latest code, now that the fix for bug #1569984 has landed.

Meanwhile, I'll manually test and try to reproduce this bug.

Changed in maas:
status: New → Incomplete
Mike Pontillo (mpontillo) wrote :

Marking incomplete, because in order to solve this we need a reproducible steps to reproduce this bug.

mahmoh (mahmoh) wrote :

2.0.0~beta5+bzr5026-0ubuntu1~xenial1

Changed in maas:
status: Incomplete → New
summary: - ValueError: The IPRange could not be created because the data didn't
- validate.
+ [2.0b5] ValueError: The IPRange could not be created because the data
+ didn't validate.
mahmoh (mahmoh) wrote :

For reproduction steps run this here:

https://github.com/jmcdice/ubuntu-os-cloud

Changed in maas:
assignee: nobody → Mike Pontillo (mpontillo)
Mike Pontillo (mpontillo) wrote :

I'm still confused about this bug. The description states that the exception is seen when configuring the IP range in the UI. The reproduction steps are "run the scripts in this git repository". But the scripts seem to set up the IP range.

Do I assume correctly that the scripts don't actually succeed, which means you must manually configure them? What values are entered into the form fields? (Does it match the values in the script, 10.1.0.28 and 10.1.0.100?)

I don't have a system with three interfaces available to run those exact scripts, so it would be helpful if I could get access to the machine to troubleshoot directly. Or I can give it a try tomorrow with a virtual machine.

Changed in maas:
status: New → Incomplete
Changed in maas:
milestone: 2.0.0 → 2.3.x
Mike Pontillo (mpontillo) wrote :

After talking to a MAAS user on IRC, I think this might be related to using the 'Provide DHCP' option when the underlying subnet is unmanaged. We should try to reproduce this again.

Changed in maas:
assignee: Mike Pontillo (mpontillo) → nobody
status: Incomplete → Triaged
milestone: 2.3.x → 2.4.x
importance: Critical → Medium
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments