[2.0a4] Can't assign a 'Static IP' Address

Bug #1562106 reported by Andres Rodriguez on 2016-03-25
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MAAS
Critical
Unassigned

Bug Description

Trying to assign an static IP address, I don't get any feedback in the UI, but I see an error in the logs:

2016-03-26 02:02:30 [-] Error on request (66) machine.link_subnet: record "dom" has no field "domain_id"
        CONTEXT: SQL statement "SELECT pg_notify('domain_update',CAST(dom.domain_id AS text))"
        PL/pgSQL function ipaddress_domain_update_notify() line 26 at PERFORM

        Traceback (most recent call last):
          File "/usr/lib/python3.5/threading.py", line 862, in run
            self._target(*self._args, **self._kwargs)
          File "/usr/lib/python3/dist-packages/provisioningserver/utils/twisted.py", line 842, 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 246, in inContext
            result = inContext.theWork()
          File "/usr/lib/python3/dist-packages/twisted/python/threadpool.py", line 262, in <lambda>
            inContext.theWork = lambda: context.call(ctx, func, *args, **kw)
          File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 118, in callWithContext
            return self.currentContext().callWithContext(ctx, func, *args, **kw)
          File "/usr/lib/python3/dist-packages/twisted/python/context.py", line 81, in callWithContext
            return func(*args,**kw)
          File "/usr/lib/python3/dist-packages/maasserver/utils/orm.py", line 516, in call_within_transaction
            return func_outside_txn(*args, **kwargs)
          File "/usr/lib/python3/dist-packages/maasserver/utils/orm.py", line 343, in retrier
            return func(*args, **kwargs)
          File "/usr/lib/python3.5/contextlib.py", line 30, in inner
            return func(*args, **kwds)
          File "/usr/lib/python3/dist-packages/maasserver/websockets/handlers/machine.py", line 790, in link_subnet
            ip_address=params.get("ip_address", None))
          File "/usr/lib/python3/dist-packages/maasserver/models/interface.py", line 875, in update_link_by_id
            static_ip, mode, subnet, ip_address=ip_address)
          File "/usr/lib/python3/dist-packages/maasserver/models/interface.py", line 853, in update_ip_address
            static_ip, subnet, ip_address=ip_address)
          File "/usr/lib/python3/dist-packages/maasserver/models/interface.py", line 832, in _swap_subnet
            subnet, ip_address=ip_address, swap_static_ip=static_ip)
          File "/usr/lib/python3/dist-packages/maasserver/models/interface.py", line 695, in _link_subnet_static
            static_ip.save()
          File "/usr/lib/python3/dist-packages/maasserver/models/cleansave.py", line 29, in save
            return super(CleanSave, self).save(*args, **kwargs)
          File "/usr/lib/python3/dist-packages/maasserver/models/timestampedmodel.py", line 64, in save
            return super(TimestampedModel, self).save(*args, **kwargs)
          File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 734, in save
            force_update=force_update, update_fields=update_fields)
          File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 762, in save_base
            updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
          File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 827, in _save_table
            forced_update)
          File "/usr/lib/python3/dist-packages/django/db/models/base.py", line 877, in _do_update
            return filtered._update(values) > 0
          File "/usr/lib/python3/dist-packages/django/db/models/query.py", line 580, in _update
            return query.get_compiler(self.db).execute_sql(CURSOR)
          File "/usr/lib/python3/dist-packages/django/db/models/sql/compiler.py", line 1062, in execute_sql
            cursor = super(SQLUpdateCompiler, self).execute_sql(result_type)
          File "/usr/lib/python3/dist-packages/django/db/models/sql/compiler.py", line 840, in execute_sql
            cursor.execute(sql, params)
          File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 64, in execute
            return self.cursor.execute(sql, params)
          File "/usr/lib/python3/dist-packages/django/db/utils.py", line 98, in __exit__
            six.reraise(dj_exc_type, dj_exc_value, traceback)
          File "/usr/lib/python3/dist-packages/django/utils/six.py", line 685, in reraise
            raise value.with_traceback(tb)
          File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 64, in execute
            return self.cursor.execute(sql, params)
        django.db.utils.ProgrammingError: record "dom" has no field "domain_id"
        CONTEXT: SQL statement "SELECT pg_notify('domain_update',CAST(dom.domain_id AS text))"
        PL/pgSQL function ipaddress_domain_update_notify() line 26 at PERFORM

Related branches

summary: - Can't assign a 'Static IP' Address
+ [2.0a4] Can't assign a 'Static IP' Address
Changed in maas:
importance: Undecided → Critical
milestone: none → 2.0.0
status: New → Triaged
LaMont Jones (lamont) on 2016-03-28
Changed in maas:
assignee: nobody → LaMont Jones (lamont)
LaMont Jones (lamont) on 2016-04-04
Changed in maas:
assignee: LaMont Jones (lamont) → nobody
Changed in maas:
status: Triaged → Fix Committed
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers