我对 MAAS 还有其他问题。一个接一个……
设置第二个集群时,我已到达同步图像的步骤。下载似乎工作正常,但集群在 GUI 中仍然处于不同步状态。可能是什么问题?
我/var/lib/maas/boot-resources
有无数的 snapper-yyyymmdd-hhmmss 目录......
在maas.log中,我有:
/var/lib/maas/boot-resources/snapshot-20150307-155155
Mar 7 16:51:56 node6 maas.boot_image_download_service: [ERROR] Failed to download images: <urlopen error [Errno -2] Name or service not known>
在 pserv.log 中,我有:
2015-03-07 16:46:56+0100 [-] Logged OOPS id OOPS-adfa7a97ffe207c7b625e278f29be756: URLError: <urlopen error [Errno -2] Name or service not known>
2015-03-07 16:51:56+0100 [-] Unhandled Error
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 423, in errback
self._startRunCallbacks(fail)
File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 490, in _startRunCallbacks
self._runCallbacks()
File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 577, in _runCallbacks
current.result = callback(current.result, *args, **kw)
File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1155, in gotResult
_inlineCallbacks(r, g, deferred)
--- <exception caught here> ---
File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1097, in _inlineCallbacks
result = result.throwExceptionIntoGenerator(g)
File "/usr/lib/python2.7/dist-packages/twisted/python/failure.py", line 389, in throwExceptionIntoGenerator
return g.throw(self.type, self.value, self.tb)
File "/usr/lib/python2.7/dist-packages/provisioningserver/pserv_services/image_download_service.py", line 130, in maybe_start_download
yield self._start_download()
File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1097, in _inlineCallbacks
result = result.throwExceptionIntoGenerator(g)
File "/usr/lib/python2.7/dist-packages/twisted/python/failure.py", line 389, in throwExceptionIntoGenerator
return g.throw(self.type, self.value, self.tb)
File "/usr/lib/python2.7/dist-packages/provisioningserver/pserv_services/image_download_service.py", line 121, in _start_download
get_proxy_url("https"))
File "/usr/lib/python2.7/dist-packages/twisted/python/threadpool.py", line 191, in _worker
result = context.call(ctx, function, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/twisted/python/context.py", line 118, in callWithContext
return self.currentContext().callWithContext(ctx, func, *args, **kw)
File "/usr/lib/python2.7/dist-packages/twisted/python/context.py", line 81, in callWithContext
return func(*args,**kw)
File "/usr/lib/python2.7/dist-packages/provisioningserver/utils/twisted.py", line 148, in wrapper
return func(*args, **kwargs)
File "/usr/lib/python2.7/dist-packages/provisioningserver/rpc/boot_images.py", line 87, in _run_import
boot_resources.import_images(sources)
File "/usr/lib/python2.7/dist-packages/provisioningserver/import_images/boot_resources.py", line 268, in import_images
install_boot_loaders(snapshot_path, image_descriptions.get_image_arches())
File "/usr/lib/python2.7/dist-packages/provisioningserver/import_images/boot_resources.py", line 102, in install_boot_loaders
boot_method.install_bootloader(destination)
File "/usr/lib/python2.7/dist-packages/provisioningserver/boot/uefi.py", line 191, in install_bootloader
'main', 'amd64')
File "/usr/lib/python2.7/dist-packages/provisioningserver/boot/utils.py", line 160, in get_updates_package
package, archive, component, architecture, release=release)
File "/usr/lib/python2.7/dist-packages/provisioningserver/boot/utils.py", line 136, in get_package
package, archive, component, architecture, release=release)
File "/usr/lib/python2.7/dist-packages/provisioningserver/boot/utils.py", line 115, in get_package_info
packages = get_packages(archive, component, architecture, release=release)
File "/usr/lib/python2.7/dist-packages/provisioningserver/boot/utils.py", line 94, in get_packages
release_file = get_file(release_url)
File "/usr/lib/python2.7/dist-packages/provisioningserver/boot/utils.py", line 52, in get_file
response = urllib2.build_opener().open(url)
File "/usr/lib/python2.7/urllib2.py", line 404, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 422, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 382, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 1214, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/usr/lib/python2.7/urllib2.py", line 1184, in do_open
raise URLError(err)
urllib2.URLError: <urlopen error [Errno -2] Name or service not known>
2015-03-07 16:51:56+0100 [-] Logged OOPS id OOPS-6f24ef492ef8ec698cd54230926ffb2c: URLError: <urlopen error [Errno -2] Name or service not known>
答案1
过了一会儿,发现问题与名称解析有关......
为了回答我的答案中的问题,我所做的就是修复上游 DNS 服务器的问题,以允许对 Internet 域进行名称解析。这解决了问题...
答案2
我只需将“dns-nameservers”和“dns-search”添加到 /etc/network/interface,重启后它就会同步:
auto eth0
iface eth0 inet 静态
地址 192.168.110.2
网络掩码 255.255.255.0
网络 192.168.110.0
广播 192.168.110.255
dns-nameservers 10.196.?.? 192.168.110.2
dns-search 10.196.?.? 192.168.110.2