1

I have attempted an upgrade from 1.5.4 to 1.8.0 (from the "stable" line of the PPA) on ULTS14 to go with an upgrade of Juju to 1.24.5 and I get the appended migration error.

Is there a away to get it to progress beyond that point Is it possible to revert to 1.5.4 (or to 1.7.6 for example)? What can I do at this point?

The MAAS instance manages 12 physical servers which are used by a Juju instance.

There is some previous material suggesting a reinstall of the packages, and I tried that, but that did not change the outcome, which I think depends on a data migration issue. Upgrading MAAS from 1.5.4 to 1.7.0 or latest on ubuntu 14.04

Python error during MAAS upgrade

 * Restarting PostgreSQL 9.3 database server
   ...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 0138_perf_index_on_node_events.
 > maasserver:0121_recompute_storage_size
Error in migration: maasserver:0121_recompute_storage_size
Traceback (most recent call last):
......
  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.ProgrammingError: relation "metadataserver_noderesult" does not exist
LINE 1: ..."."name", "metadataserver_noderesult"."data" FROM "metadatas...

To study the state of the MAAS database I have used this SQL query and the results look plausible and consistent, so I guess that the upgrade did not damaged it:

select
  m.mac_address                         as "Ethernet",
  w.name                                as "network",
  w.id                                  as "netid",
  w.ip                                  as "subnet",
  l.ip                                  as "lease",
  w.default_gateway                     as "gw",
  n.hostname                            as "node",
  n.storage                             as "storage",
  n.power_parameters                    as "WoL"
from
  maasserver_macaddress                 as m
    left join maasserver_macaddress_networks as m2n
    on m.id = m2n.macaddress_id
      left join maasserver_network      as w
      on m2n.network_id = w.id
  left join maasserver_dhcplease        as l
    on l.mac = m.mac_address
      inner join maasserver_node        as n
      on m.node_id = n.id
order by
  n.hostname,
  w.ip,
  m.mac_address
PeterG
  • 1,195

2 Answers2

0

It turns out that removing carefully the not-quite-installed 1.8.0 packages and installing 1.7.6 work as expected as per the tests already done. The metadataserver app 0015 "migration" gets applied and that leaves the migrations at 0120 for the maassserver app and 0015 for metadataserver which happen to be the right migration level for 1.7.6.

Important note: to remove the not-quite-installed 1.8.0 packages takes some hand-editing of /var/lib/dpkg/info/status and sometimes a related file to fake them being installed when they aren't.

PeterG
  • 1,195
0

This is being tracked under bug 1495064.

It will be fixed in MAAS 1.9.0 and MAAS 1.8.3.

mpontillo
  • 1,078