IP Validation fails when adding ipv6 dhcp range

Bug #1840151 reported by Nick Niehoff
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
MAAS
Triaged
Medium
Unassigned
3.4
Won't Fix
Medium
Unassigned

Bug Description

To reproduce:

Create an IPv6 Subnet with CIDR: 2001:470:4009:17::/64
Add Reserved Dynamic range:
start ip: 2001:470:4009:17::10
end ip: 2001:470:4009:17::500

Result:

Error: Requested dynamic range conflicts with an existing IP address or range.

From regiond.log:

2019-08-14 08:34:26 maasserver.websockets.protocol: [critical] Error on request (649) 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.']}

Revision history for this message
Mark Cunningham (mdscunningham) wrote :
Download full text (3.3 KiB)

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: {'st...

Read more...

Changed in maas:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
José Pekkarinen (koalinux) wrote :

2.7 does the same, so seems there was no chance to improve this yet.

José.

Revision history for this message
Mr. Jester (mrjester) wrote :

Still occuring on 2.8.

{"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."]}

Nick Niehoff (nniehoff)
summary: - [2.6, IPv6] IP Validation fails when adding ipv6 dhcp range
+ IP Validation fails when adding ipv6 dhcp range
Revision history for this message
Jerzy Husakowski (jhusakowski) wrote :

The error message should be more informative. We also need to check the validation logic.

Changed in maas:
milestone: none → 3.4.0
Alberto Donato (ack)
Changed in maas:
milestone: 3.4.0 → 3.4.x
Changed in maas:
milestone: 3.4.x → 3.5.x
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.