MAAS upgrade from 1.5.2+bzr2282-0ubuntu0.2 to experiment failed

Bug #1340896 reported by Narinder Gupta
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Critical
Jeroen T. Vermeulen

Bug Description

getting the following error after upgrading it from 1.5.2+bzr2282-0ubuntu0.2 to experimental version of MAAS. 1.6+bzr2367+2541+285~ppa0~ubuntu14.04.1

Considering dependency proxy for proxy_http:
Module proxy already enabled
Module proxy_http already enabled
Module expires already enabled
Module wsgi already enabled
 * Restarting web server apache2 AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1. Set the 'ServerName' directive globally to suppress this message
                                                                         [ OK ]
squid-deb-proxy stop/waiting
squid-deb-proxy start/running, process 14309
Setting up maas-region-controller (1.6+bzr2367+2541+285~ppa0~ubuntu14.04.1) ...
 * Stopping web server apache2 *
 * Restarting PostgreSQL 9.3 database server [ OK ]
Considering dependency proxy for proxy_http:
Module proxy already enabled
Module proxy_http already enabled
Module expires already enabled
Module wsgi already enabled
 * Restarting message broker rabbitmq-server [ OK ]
Changing password for user "maas_longpoll" ...
...done.
Changing password for user "maas_workers" ...
...done.
Syncing...
Creating tables ...
Installing custom SQL ...
Installing indexes ...
Installed 0 object(s) from 0 fixture(s)

Synced:
 > django.contrib.auth
 > django.contrib.contenttypes
 > django.contrib.sessions
 > django.contrib.sites
 > django.contrib.messages
 > django.contrib.staticfiles
 > piston
 > south

Not synced (use migrations):
 - maasserver
 - metadataserver
(use ./manage.py migrate to migrate these)
Running migrations for maasserver:
 - Migrating forwards to 0089_create_nodegroupinterface_name.
 > maasserver:0075_add_boot_resource_models
 > maasserver:0076_add_osystem_to_bootimage
 > maasserver:0077_remove_null_for_bootsourceselection_release
 > maasserver:0078_add_osystem_to_node
 > maasserver:0079_supported_subarches_for_bootimage
 > maasserver:0080_binary_to_editablebinary_in_bootsource
 > maasserver:0081_ipaddress_table_and_static_dhcp_ranges
 > maasserver:0082_cluster_interface_for_macaddress
 > maasserver:0083_add_license_key_to_node
 > maasserver:0084_add_ssl_key_model
 > maasserver:0085_add_user_to_staticipaddress
 > maasserver:0086_add_xinstall_path_and_type_to_bootimage
 > maasserver:0087_add_licensekey_model
 > maasserver:0088_ip_to_custom_field
 > maasserver:0089_create_nodegroupinterface_name
FATAL ERROR - The following SQL query failed: ALTER TABLE "maasserver_nodegroupinterface" ADD CONSTRAINT "maasserver_nodegroupinterfac_nodegroup_id_670958f79d64f7fd_uniq" UNIQUE ("nodegroup_id", "name")
The error was: cannot ALTER TABLE "maasserver_nodegroupinterface" because it has pending trigger events

Error in migration: maasserver:0089_create_nodegroupinterface_name
Traceback (most recent call last):
  File "/usr/bin/django-admin", line 5, in <module>
    management.execute_from_command_line()
  File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
    utility.execute()
  File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 392, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 242, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 285, in execute
    output = self.handle(*args, **options)
  File "/usr/lib/python2.7/dist-packages/south/management/commands/migrate.py", line 107, in handle
    ignore_ghosts = ignore_ghosts,
  File "/usr/lib/python2.7/dist-packages/south/migration/__init__.py", line 219, in migrate_app
    success = migrator.migrate_many(target, workplan, database)
  File "/usr/lib/python2.7/dist-packages/south/migration/migrators.py", line 235, in migrate_many
    result = migrator.__class__.migrate_many(migrator, target, migrations, database)
  File "/usr/lib/python2.7/dist-packages/south/migration/migrators.py", line 310, in migrate_many
    result = self.migrate(migration, database)
  File "/usr/lib/python2.7/dist-packages/south/migration/migrators.py", line 133, in migrate
    result = self.run(migration)
  File "/usr/lib/python2.7/dist-packages/south/migration/migrators.py", line 107, in run
    return self.run_migration(migration)
  File "/usr/lib/python2.7/dist-packages/south/migration/migrators.py", line 81, in run_migration
    migration_function()
  File "/usr/lib/python2.7/dist-packages/south/migration/migrators.py", line 57, in <lambda>
    return (lambda: direction(orm))
  File "/usr/lib/python2.7/dist-packages/maasserver/migrations/0089_create_nodegroupinterface_name.py", line 25, in forwards
    db.create_unique(u'maasserver_nodegroupinterface', ['nodegroup_id', 'name'])
  File "/usr/lib/python2.7/dist-packages/south/db/generic.py", line 44, in _cache_clear
    return func(self, table, *args, **opts)
  File "/usr/lib/python2.7/dist-packages/south/db/generic.py", line 601, in create_unique
    cols,
  File "/usr/lib/python2.7/dist-packages/south/db/generic.py", line 273, in execute
    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)
django.db.utils.OperationalError: cannot ALTER TABLE "maasserver_nodegroupinterface" because it has pending trigger events

Related branches

Revision history for this message
Julian Edwards (julian-edwards) wrote :

I think this version r2541 is not in the 1.6 branch, unless jtv knows otherwise.

Changed in maas:
status: New → Triaged
importance: Undecided → Critical
assignee: nobody → Jeroen T. Vermeulen (jtv)
milestone: none → 1.6.1
Changed in maas:
status: Triaged → In Progress
Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

Right, this migration is only in trunk as yet. I'm just putting a fix up for review.

Changed in maas:
status: In Progress → Fix Committed
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.