Comment 1 for bug 1840151

Revision history for this message
Mark Cunningham (mdscunningham) wrote : Re: [2.6, IPv6] IP Validation fails when adding ipv6 dhcp range

I am able to replicate this on my setup as well

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.3 LTS
Release: 18.04
Codename: bionic

MAAS version: 2.6.0

Creating a smaller CIDR block (/96, /128) do not have this issue. Also, incrementing the fifth (5th) segment of the IP address succeeds, where anything defined in the first block fails.

Create an IPv6 Subnet with CIDR: fd00:e81d:a6d7:55::/64

This succeeds fine using a range of IPs not at the start of the CIDR block:

Add Reserved Dynamic range:
start: fd00:e81d:a6d7:55:1::bfff
end: fd00:e81d:a6d7:55:1::ffff

However, this fails with the error:
-- Error: Requested dynamic range conflicts with an existing IP address or range.

Add Reserved Dynamic range:
start: fd00:e81d:a6d7:55::bfff
end: fd00:e81d:a6d7:55::ffff

-----
Results from /var/log/maas/regiond.log

2019-08-20 17:49:18 maasserver.websockets.protocol: [critical] Error on request (52) iprange.create: {"start_ip": ["Requested dynamic range conflicts with an existing IP address or range."], "end_ip": ["Requested dynamic range conflicts with an existing IP address or range."]}
 Traceback (most recent call last):
   File "/usr/lib/python3.6/threading.py", line 864, in run
     self._target(*self._args, **self._kwargs)
   File "/usr/lib/python3/dist-packages/provisioningserver/utils/twisted.py", line 861, 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 250, in inContext
     result = inContext.theWork()
   File "/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 266, in <lambda>
     inContext.theWork = lambda: context.call(ctx, func, *args, **kw)
   File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 122, in callWithContext
     return self.currentContext().callWithContext(ctx, func, *args, **kw)
   File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 85, in callWithContext
     return func(*args,**kw)
   File "/usr/lib/python3/dist-packages/provisioningserver/utils/twisted.py", line 894, in callInContext
     return func(*args, **kwargs)
   File "/usr/lib/python3/dist-packages/provisioningserver/utils/twisted.py", line 235, in wrapper
     result = func(*args, **kwargs)
   File "/usr/lib/python3/dist-packages/maasserver/utils/orm.py", line 756, in call_within_transaction
     return func_outside_txn(*args, **kwargs)
   File "/usr/lib/python3/dist-packages/maasserver/utils/orm.py", line 563, in retrier
     return func(*args, **kwargs)
   File "/usr/lib/python3.6/contextlib.py", line 52, in inner
     return func(*args, **kwds)
   File "/usr/lib/python3/dist-packages/maasserver/websockets/base.py", line 400, in prep_user_execute
     return method(params)
   File "/usr/lib/python3/dist-packages/maasserver/websockets/base.py", line 484, in create
     raise HandlerValidationError(form.errors)
 maasserver.websockets.base.HandlerValidationError: {'start_ip': ['Requested dynamic range conflicts with an existing IP address or range.'], 'end_ip': ['Requested dynamic range conflicts with an existing IP address or range.']}