IntegrityError after upgrading to 1.6beta5

Bug #1344089 reported by Andreas Hasenack
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Critical
Gavin Panella
1.6
Fix Released
Critical
Gavin Panella

Bug Description

I got this backtrace in maas.log when upgrading from 1.5.2+bzr2282-0ubuntu0.2 to beta5:

ERROR 2014-07-18 10:03:34,155 twisted Unhandled Error
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/__init__.py", line 294, in wrapper
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/maasserver/utils/__init__.py", line 206, in call_with_lock
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/maasserver/utils/async.py", line 145, in call_within_transaction
    return func(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/maasserver/rpc/regionservice.py", line 362, in update
    self._do_insert(cursor)
  File "/usr/lib/python2.7/dist-packages/maasserver/rpc/regionservice.py", line 454, 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)=(courage:pid=13556, fe80::223:55ff:fe2c:5378, 59990) already exists.

Gavin debugged it for me in the mailing list. Turns out this machine has a duplicate ipv6 link-local address because of a bridge:
br0 Link encap:Ethernet HWaddr 00:23:55:2c:53:78
          inet addr:10.1.0.1 Bcast:10.1.255.255 Mask:255.255.0.0
          inet6 addr: fe80::223:55ff:fe2c:5378/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:88357707 errors:0 dropped:0 overruns:0 frame:0
          TX packets:172662349 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:6541281459 (6.5 GB) TX bytes:306129483057 (306.1 GB)

eth0 Link encap:Ethernet HWaddr 78:2b:cb:8e:56:6b
          inet addr:10.0.7.8 Bcast:10.0.7.255 Mask:255.255.255.0
          inet6 addr: fe80::7a2b:cbff:fe8e:566b/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:83209393 errors:0 dropped:1869 overruns:0 frame:0
          TX packets:44154022 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:120405683094 (120.4 GB) TX bytes:4738076825 (4.7 GB)
          Interrupt:19

eth1 Link encap:Ethernet HWaddr 00:23:55:2c:53:78
          inet6 addr: fe80::223:55ff:fe2c:5378/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          RX packets:82937896 errors:3139 dropped:0 overruns:0 frame:3139
          TX packets:188420263 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:6529695865 (6.5 GB) TX bytes:276815240088 (276.8 GB)

eth1 and br0 have the same inet6 addr, since they "share" the mac

# brctl show br0
bridge name bridge id STP enabled interfaces
br0 8000.0023552c5378 no eth1

Tags: landscape

Related branches

Gavin Panella (allenap)
Changed in maas:
status: New → In Progress
importance: Undecided → Critical
assignee: nobody → Gavin Panella (allenap)
Revision history for this message
Gavin Panella (allenap) wrote :

Do I target this to 1.6.0 or 1.6.1?

Changed in maas:
status: In Progress → Fix Committed
Changed in maas:
milestone: none → 1.6.0
milestone: 1.6.0 → none
tags: added: landscape
Changed in maas:
status: Fix Committed → Fix Released
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.