[1.9, UI] UI doesn't surface errors when assigning static IP addresses

Bug #1569683 reported by Paul Gear
36
This bug affects 5 people
Affects Status Importance Assigned to Milestone
MAAS
Invalid
Undecided
Unassigned
2.2
Fix Released
Undecided
Unassigned

Bug Description

When editing a node to give it static IPv4 & IPv6 addresses in an unmanaged network, MAAS does not allow selection of arbitrary IP addresses. Worse, it forces the use of the default gateway as the static IP address, which is highly likely to cause operational issues.

Instructions to recreate:

- Use cluster controller with an unmanaged IPv4 subnet (no IPv6 subnet)

- Commission host

- Edit host; attempt to add an IPv4 address on the unmanaged subnet; attempt to add an IPv6 address - in each case it will jump back to the default gateway address with no error message to indicate why.

Revision history for this message
Paul Gear (paulgear) wrote :
Haw Loeung (hloeung)
Changed in maas:
status: New → Confirmed
Revision history for this message
Mike Pontillo (mpontillo) wrote :

This behavior should only occur if the IP address is selected to be "AUTO" *and * the default gateway on the subnet is not known to MAAS. (MAAS attempts to avoid any in-use IP addresses it knows about on the subnet. Though you may need to use the CLI to edit the subnet appropriately.)

How did you edit the host? (Did you try using the "interface link-subnet" CLI command to assign a static IP to the host via the API? Or did you use the web UI?)

Revision history for this message
Paul Gear (paulgear) wrote :

@mpontillo: I did it all through the web UI.

Revision history for this message
Jacek Nykis (jacekn) wrote :

I came across this problem myself.
This bug can cause entire subnet to become unreachable if MAAS happens to assign IP address of the default gateway to a server.
Because of that I'd say importance should be set to Critical.

Revision history for this message
Andres Rodriguez (andreserl) wrote : Re: [Bug 1569683] Re: MAAS constrains IPv4 & IPv6 static address selection on unmanaged interfaces

Jacek,

Can you attach your curtin confíg:

Maas <user> machine get-curtin-config <system_id>

Also, attach /etc/network/*

Thanks!

On Tuesday, July 5, 2016, Jacek Nykis <email address hidden> wrote:

> I came across this problem myself.
> This bug can cause entire subnet to become unreachable if MAAS happens to
> assign IP address of the default gateway to a server.
> Because of that I'd say importance should be set to Critical.
>
> --
> You received this bug notification because you are subscribed to MAAS.
> https://bugs.launchpad.net/bugs/1569683
>
> Title:
> MAAS constrains IPv4 & IPv6 static address selection on unmanaged
> interfaces
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/maas/+bug/1569683/+subscriptions
>

--
Andres Rodriguez (RoAkSoAx)
Ubuntu Server Developer
MSc. Telecom & Networking
Systems Engineer

Revision history for this message
Jacek Nykis (jacekn) wrote : Re: MAAS constrains IPv4 & IPv6 static address selection on unmanaged interfaces

Andres,

Sorry I don't have them. It happened a while ago but also as soon as I realized what happened I powered the system down and changed config in MAAS to avoid bigger problems. Since then everything was redeployed.

It should not be too difficult to replicate in a test lab but basically if MAAS can assign IPs to machines without checking if they are in use bad things can happen.

Revision history for this message
Andres Rodriguez (andreserl) wrote : Re: [Bug 1569683] Re: MAAS constrains IPv4 & IPv6 static address selection on unmanaged interfaces

IF you manage to reproduce it please do attach the config as I don't think
MAAS has anything to do here, but rather curtin/cloud-unit creating
/etc/network/interfaces.d/<I face>.cfg which cause bad things to happen.

On Tuesday, July 5, 2016, Jacek Nykis <email address hidden> wrote:

> Andres,
>
> Sorry I don't have them. It happened a while ago but also as soon as I
> realized what happened I powered the system down and changed config in
> MAAS to avoid bigger problems. Since then everything was redeployed.
>
> It should not be too difficult to replicate in a test lab but basically
> if MAAS can assign IPs to machines without checking if they are in use
> bad things can happen.
>
> --
> You received this bug notification because you are subscribed to MAAS.
> https://bugs.launchpad.net/bugs/1569683
>
> Title:
> MAAS constrains IPv4 & IPv6 static address selection on unmanaged
> interfaces
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/maas/+bug/1569683/+subscriptions
>

--
Andres Rodriguez (RoAkSoAx)
Ubuntu Server Developer
MSc. Telecom & Networking
Systems Engineer

Revision history for this message
Andres Rodriguez (andreserl) wrote : Re: [1.9] MAAS constrains IPv4 & IPv6 static address selection on unmanaged interfaces

I looked through the logs, the issue seems to be this error. This is a UI surfacing error.

2016-04-13 04:07:33 [-] Error on request (146) node.link_subnet: IP address is already in use.
 Traceback (most recent call last):
   File "/usr/lib/python2.7/threading.py", line 783, in __bootstrap
     self.__bootstrap_inner()
   File "/usr/lib/python2.7/threading.py", line 810, in __bootstrap_inner
     self.run()
   File "/usr/lib/python2.7/threading.py", line 763, in run
     self.__target(*self.__args, **self.__kwargs)
   File "/usr/lib/python2.7/dist-packages/provisioningserver/utils/twisted.py", line 791, in _worker
     return super(ThreadPool, self)._worker()
 --- <exception caught here> ---
   File "/usr/lib/python2.7/dist-packages/twisted/python/threadpool.py", line 191, in _worker
     result = context.call(ctx, function, *args, **kwargs)
   File "/usr/lib/python2.7/dist-packages/twisted/python/context.py", line 118, in callWithContext
     return self.currentContext().callWithContext(ctx, func, *args, **kw)
   File "/usr/lib/python2.7/dist-packages/twisted/python/context.py", line 81, in callWithContext
     return func(*args,**kw)
   File "/usr/lib/python2.7/dist-packages/maasserver/utils/orm.py", line 501, in call_within_transaction
     return func_outside_txn(*args, **kwargs)
   File "/usr/lib/python2.7/dist-packages/maasserver/utils/orm.py", line 328, in retrier
     return func(*args, **kwargs)
   File "/usr/lib/python2.7/dist-packages/django/db/transaction.py", line 339, in inner
     return func(*args, **kwargs)
   File "/usr/lib/python2.7/dist-packages/maasserver/websockets/handlers/node.py", line 1172, in link_subnet
     ip_address=params.get("ip_address", None))
   File "/usr/lib/python2.7/dist-packages/maasserver/models/interface.py", line 1110, in update_link_by_id
     static_ip, mode, subnet, ip_address=ip_address)
   File "/usr/lib/python2.7/dist-packages/maasserver/models/interface.py", line 1088, in update_ip_address
     static_ip, subnet, ip_address=ip_address)
   File "/usr/lib/python2.7/dist-packages/maasserver/models/interface.py", line 1014, in _swap_subnet
     "IP address is already in use.")
 maasserver.exceptions.StaticIPAddressUnavailable: IP address is already in use.

summary: - MAAS constrains IPv4 & IPv6 static address selection on unmanaged
+ [1.9] MAAS constrains IPv4 & IPv6 static address selection on unmanaged
interfaces
summary: - [1.9] MAAS constrains IPv4 & IPv6 static address selection on unmanaged
- interfaces
+ [1.9, UI] MAAS constrains IPv4 & IPv6 static address selection on
+ unmanaged interfaces
summary: - [1.9, UI] MAAS constrains IPv4 & IPv6 static address selection on
- unmanaged interfaces
+ [1.9, UI] UI doesn't surface errors when assigning static IP addresses
Revision history for this message
Adam Collard (adam-collard) wrote :

This bug has not seen any activity in the last 6 months, so it is being automatically closed.

If you are still experiencing this issue, please feel free to re-open.

MAAS Team

Changed in maas:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.