我在运行 MAAS 的服务器上启动并运行了基于 KVM 的虚拟机。我按照以下说明操作:http://maas.ubuntu.com/docs/nodes.html#virtual-machine-nodes将 VM 添加到 MAAS,因此我添加了相关字段(Address
,Power ID
& MAC address
),但出现以下 500 错误:
Unable to create Node: __init__() got an unexpected keyword argument 'namedtuple_as_object'
堆栈跟踪来自/var/log/maas/maas.log
:
ERROR 2014-02-10 17:20:55,312 maasserver ################################ Exception: __init__() got an unexpected keyword argument 'namedtuple_as_object' ################################
ERROR 2014-02-10 17:20:55,313 maasserver Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 115, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/usr/lib/python2.7/dist-packages/django/views/decorators/vary.py", line 19, in inner_func
response = func(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/piston/resource.py", line 201, in __call__
else: stream = srl.render(request)
File "/usr/lib/python2.7/dist-packages/piston/emitters.py", line 391, in render
seria = simplejson.dumps(self.construct(), cls=DateTimeAwareJSONEncoder, ensure_ascii=False, indent=4)
File "/usr/lib/python2.7/dist-packages/simplejson/__init__.py", line 296, in dumps
**kw).encode(obj)
TypeError: __init__() got an unexpected keyword argument 'namedtuple_as_object'
我不是 Python 人员,因此不确定上面发生了什么,但我发现了这个错误报告:https://bugs.launchpad.net/ubuntu/+source/python-django-piston/+bug/1184871提到 Python、Django 和 Piston,它们都出现在上面的堆栈跟踪中。
我需要更新上述某个软件包吗?sudo apt-get update
说一切正常。
Ubuntu-1204-precise-64-minimal
在金属本身上运行。
答案1
由于该错误提到已发布了修复程序python-django-活塞包,尝试运行:
sudo apt-get update && sudo apt-get upgrade
如果软件包升级,请重新启动主服务器并重试添加虚拟机。