Adding an IP alias to the MAAS server causes IntegrityError

Bug #1405290 reported by Christian Reis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Invalid
Medium
Unassigned

Bug Description

This is MAAS 1.7.1RC2.

After setting up a region and cluster on the same host, I added an alias to the interface that is being managed by MAAS, eth0:1. This caused an OOPS to be registered:

    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)
    --- <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/provisioningserver/utils/twisted.py", line 148, in wrapper
        return func(*args, **kwargs)
      File "/usr/lib/python2.7/dist-packages/maasserver/utils/__init__.py", line 193, in call_with_lock
        return func(*args, **kwargs)
      File "/usr/lib/python2.7/dist-packages/maasserver/utils/async.py", line 153, in call_within_transaction
        return func(*args, **kwargs)
      File "/usr/lib/python2.7/dist-packages/maasserver/rpc/regionservice.py", line 743, in update
        self._do_insert(cursor)
      File "/usr/lib/python2.7/dist-packages/maasserver/rpc/regionservice.py", line 849, in _do_insert
        cursor.execute(statement, values)
      File "/usr/lib/python2.7/dist-packages/django/db/backends/util.py", line 53, in execute
        return self.cursor.execute(sql, params)
      File "/usr/lib/python2.7/dist-packages/django/db/utils.py", line 99, in __exit__
        six.reraise(dj_exc_type, dj_exc_value, traceback)
      File "/usr/lib/python2.7/dist-packages/django/db/backends/util.py", line 53, in execute
        return self.cursor.execute(sql, params)
    django.db.utils.IntegrityError: duplicate key value violates unique constraint "eventloops_name_address_port_key"
    DETAIL: Key (name, address, port)=(malzinho:pid=2347, 10.90.90.1, 36768) already exists.

The IP address on the alias was for a subnet different from the main subnet on the host.

Raphaël Badin (rvb)
Changed in maas:
status: New → Triaged
importance: Undecided → Critical
Revision history for this message
Raphaël Badin (rvb) wrote :

I'm having a hard time reproducing this, can you please provide more information about your setup: name, interface, IP, management for the existing cluster interfaces and the new one?

Revision history for this message
Christian Reis (kiko) wrote :

This machine has the following interfaces: http://paste.ubuntu.com/9885971/

I'm attaching a screenshot of the cluster edit page.

I haven't been able to reproduce this now, but perhaps I might be able to do if I do a fresh install, which I intend to do with the final RC we have out.

Revision history for this message
Christian Reis (kiko) wrote :

The clusters page.

Revision history for this message
Christian Reis (kiko) wrote :

Downgrading as it doesn't seem that easy to trigger.

Changed in maas:
importance: Critical → Medium
description: updated
Changed in maas:
status: Triaged → Invalid
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.