TestReleaseAutoIPs.test__calls_update_host_maps_for_next_ip_managed_subnet can fail randomly

Bug #1511610 reported by Mike Pontillo
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
High
Unassigned

Bug Description

======================================================================
ERROR: maasserver.models.tests.test_interface.TestReleaseAutoIPs.test__calls_update_host_maps_for_next_ip_managed_subnet
----------------------------------------------------------------------
_StringException: Traceback (most recent call last):
  File "/tmp/tarmac/branch.0YArZb/src/maastesting/runtest.py", line 68, in _run_user
    result = function(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/testtools/testcase.py", line 616, in _run_test_method
    return self._get_test_method()()
  File "/tmp/tarmac/branch.0YArZb/src/maasserver/models/tests/test_interface.py", line 2104, in test__calls_update_host_maps_for_next_ip_managed_subnet
    subnet=subnet, interface=interface)
  File "/tmp/tarmac/branch.0YArZb/src/maasserver/testing/factory.py", line 657, in make_StaticIPAddress
    ipaddress.save()
  File "/tmp/tarmac/branch.0YArZb/src/maasserver/models/cleansave.py", line 38, in save
    return super(CleanSave, self).save(*args, **kwargs)
  File "/tmp/tarmac/branch.0YArZb/src/maasserver/models/timestampedmodel.py", line 70, in save
    return super(TimestampedModel, self).save(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/django/db/models/base.py", line 545, in save
    force_update=force_update, update_fields=update_fields)
  File "/usr/lib/python2.7/dist-packages/django/db/models/base.py", line 573, in save_base
    updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
  File "/usr/lib/python2.7/dist-packages/django/db/models/base.py", line 654, in _save_table
    result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
  File "/usr/lib/python2.7/dist-packages/django/db/models/base.py", line 687, in _do_insert
    using=using, raw=raw)
  File "/usr/lib/python2.7/dist-packages/django/db/models/manager.py", line 232, in _insert
    return insert_query(self.model, objs, fields, **kwargs)
  File "/usr/lib/python2.7/dist-packages/django/db/models/query.py", line 1511, in insert_query
    return query.get_compiler(using=using).execute_sql(return_id)
  File "/usr/lib/python2.7/dist-packages/django/db/models/sql/compiler.py", line 898, in execute_sql
    cursor.execute(sql, params)
  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)
IntegrityError: duplicate key value violates unique constraint "maasserver_staticipaddress_ip_key"
DETAIL: Key (ip)=(55.104.24.60) already exists.

(see first stack trace here if this is unreadable: http://paste.ubuntu.com/13005385/)

Tags: tests

Related branches

Gavin Panella (allenap)
tags: added: tests
removed: unit-tests
Changed in maas:
status: Triaged → 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.