我尝试在 ULTS14 上将版本从 1.5.4 升级到 1.8.0(从 PPA 的“稳定”系列),并将 Juju 升级到 1.24.5,但出现了附加的迁移错误。
有没有办法让它继续发展下去?是否可以恢复到 1.5.4(或者例如 1.7.6)?我现在能做什么?
MAAS 实例管理 12 台物理服务器,由 Juju 实例使用。
之前有一些资料建议重新安装软件包,我尝试过,但并没有改变结果,我认为这取决于数据迁移问题。 在 ubuntu 14.04 上将 MAAS 从 1.5.4 升级到 1.7.0 或最新版本
* 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...
为了研究 MAAS 数据库的状态,我使用了这个 SQL 查询,结果看起来合理且一致,所以我猜测升级并没有损坏它:
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
答案1
事实证明,删除小心根据已完成的测试,未完全安装的 1.8.0 软件包和安装的 1.7.6 均按预期工作。应用metadataserver
0015“迁移”后,应用程序的迁移级别为 0120 maassserver
,而 0015metadataserver
恰好是 1.7.6 的正确迁移级别。
重要的提示:要删除未完全安装的 1.8.0 软件包,需要进行一些手动编辑/var/lib/dpkg/info/status
,有时还需要相关文件来假装它们已安装,而实际上并未安装。
答案2
正在跟踪错误 1495064。
它将是在 MAAS 1.9.0 和 MAAS 1.8.3 中修复的。