← Back to team overview

group.of.nepali.translators team mailing list archive

[Bug 1880495] Re: Upgrade from 1.95 to 2.35 failure because column maasserver_domain.ttl does not exist

 

Migrations are tested in sequence, and skipping several generations of
MAAS releases may not work, even though we take steps to make sure that
the migration process is smooth and painless. The original issue relates
to a problem in the migration scripts that used the logic in MAAS itself
to perform the migration, which should not happen as such migrations
should stand on their own.

** Changed in: maas (Ubuntu)
       Status: New => Invalid

** Changed in: maas (Ubuntu Xenial)
       Status: New => Invalid

** Changed in: maas
       Status: Triaged => Won't Fix

** Changed in: maas
    Milestone: 3.6.x => None

** Tags removed: bug-council

-- 
You received this bug notification because you are a member of नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs
https://bugs.launchpad.net/bugs/1880495

Title:
  Upgrade from 1.95 to 2.35 failure because column maasserver_domain.ttl
  does not exist

Status in MAAS:
  Won't Fix
Status in MAAS 3.3 series:
  Won't Fix
Status in MAAS 3.4 series:
  Won't Fix
Status in MAAS 3.5 series:
  Won't Fix
Status in maas package in Ubuntu:
  Invalid
Status in maas source package in Xenial:
  Invalid

Bug description:
  Upgrading an older Trusty based Maas (1.9.5) to Xenial (2.3.5)
  resulted in a traceback during the do-release-upgrade procedure:

    Applying maasserver.0011_domain_data...Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/django/db/backends/utils.py", line 64, in execute
      return self.cursor.execute(sql, params)
  psycopg2.ProgrammingError: column maasserver_domain.ttl does not exist
  LINE 1: ...ain"."name", "maasserver_domain"."authoritative", "maasserve...
                                                               ^

  
  The above exception was the direct cause of the following exception:

  Traceback (most recent call last):
    File "/usr/lib/python3.5/runpy.py", line 184, in _run_module_as_main
      "__main__", mod_spec)
    File "/usr/lib/python3.5/runpy.py", line 85, in _run_code
      exec(code, run_globals)
    File "/usr/lib/python3/dist-packages/maasserver/__main__.py", line 9, in <module>
      raise SystemExit(execute_from_command_line())
    File "/usr/lib/python3/dist-packages/maasserver/__init__.py", line 73, in execute_from_command_line
      management.execute_from_command_line()
    File "/usr/lib/python3/dist-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
      utility.execute()
    File "/usr/lib/python3/dist-packages/django/core/management/__init__.py", line 346, in execute
      self.fetch_command(subcommand).run_from_argv(self.argv)
    File "/usr/lib/python3/dist-packages/django/core/management/base.py", line 394, in run_from_argv
      self.execute(*args, **cmd_options)
    File "/usr/lib/python3/dist-packages/django/core/management/base.py", line 445, in execute
      output = self.handle(*args, **options)
    File "/usr/lib/python3/dist-packages/maasserver/management/commands/dbupgrade.py", line 426, in handle
      fake_initial=self._south_was_performed(database))
    File "/usr/lib/python3/dist-packages/django/core/management/__init__.py", line 120, in call_command
      return command.execute(*args, **defaults)
    File "/usr/lib/python3/dist-packages/django/core/management/base.py", line 445, in execute
      output = self.handle(*args, **options)
    File "/usr/lib/python3/dist-packages/django/core/management/commands/migrate.py", line 222, in handle
      executor.migrate(targets, plan, fake=fake, fake_initial=fake_initial)
    File "/usr/lib/python3/dist-packages/django/db/migrations/executor.py", line 110, in migrate
      self.apply_migration(states[migration], migration, fake=fake, fake_initial=fake_initial)
    File "/usr/lib/python3/dist-packages/django/db/migrations/executor.py", line 148, in apply_migration
      state = migration.apply(state, schema_editor)
    File "/usr/lib/python3/dist-packages/django/db/migrations/migration.py", line 115, in apply
      operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
    File "/usr/lib/python3/dist-packages/django/db/migrations/operations/special.py", line 183, in database_forwards
      self.code(from_state.apps, schema_editor)
    File "/usr/lib/python3/dist-packages/maasserver/migrations/builtin/maasserver/0011_domain_data.py", line 109, in migrate_staticipaddress_hostname
      domain_id = maasserver.models.dnsresource.get_default_domain()
    File "/usr/lib/python3/dist-packages/maasserver/models/dnsresource.py", line 57, in get_default_domain
      return Domain.objects.get_default_domain().id
    File "/usr/lib/python3/dist-packages/maasserver/models/domain.py", line 108, in get_default_domain
      'updated': now,
    File "/usr/lib/python3/dist-packages/django/db/models/manager.py", line 127, in manager_method
      return getattr(self.get_queryset(), name)(*args, **kwargs)
    File "/usr/lib/python3/dist-packages/django/db/models/query.py", line 405, in get_or_create
      return self.get(**lookup), False
    File "/usr/lib/python3/dist-packages/django/db/models/query.py", line 328, in get
      num = len(clone)
    File "/usr/lib/python3/dist-packages/django/db/models/query.py", line 144, in __len__
      self._fetch_all()
    File "/usr/lib/python3/dist-packages/django/db/models/query.py", line 965, in _fetch_all
      self._result_cache = list(self.iterator())
    File "/usr/lib/python3/dist-packages/django/db/models/query.py", line 238, in iterator
      results = compiler.execute_sql()
    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: column maasserver_domain.ttl does not exist
  LINE 1: ...ain"."name", "maasserver_domain"."authoritative", "maasserve...
                                                               ^

  dpkg: error processing package maas-region-controller (--configure):
   subprocess installed post-installation script returned error exit status 1
  No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                            dpkg: dependency problems prevent configuration of maas:
   maas depends on maas-region-controller (= 2.3.5-6511-gf466fdb-0ubuntu1); however:
    Package maas-region-controller is not configured yet.

  To reproduce, install Maas on Trusty, with a working database, and run
  do-release-upgrade.

  I suspect there's some edge case in this particular database, working
  now on trying to identify it.  The particular database has been around
  for at least 3 years now.

To manage notifications about this bug go to:
https://bugs.launchpad.net/maas/+bug/1880495/+subscriptions