MAAS - 导入 PXE 文件 - 不是 gzip 文件?

MAAS - 导入 PXE 文件 - 不是 gzip 文件?

我目前正在尝试通过命令行导入启动映像,因为通过 GUI 导入启动映像时会挂起

运行命令“maas-import-pxe-files”时,我收到如下所示的 IO 错误

MAAS 在 Intel NUC ubuntu 14.04 上运行

2015-07-09 10:45:22,369 INFO Importing boot resources.
2015-07-09 10:45:22,616 INFO Inserting file boot-kernel (tag=b146783134b20619cd92c998e567c959d6ca2687b7609fb952f5740b3348e907, size=5806368).
2015-07-09 10:45:22,617 INFO Inserting file di-kernel (tag=d4fc2ba26cad96f4360cb36f04c26b2f50dceee9413c206431148b87e4958909, size=5800024).
2015-07-09 10:45:22,617 INFO Inserting file boot-initrd (tag=d9f59b43a593b4b7bb04dc1329e29c9dfca86dd0d8f9f06ce0966bc184dfe763, size=24887599).
2015-07-09 10:45:22,617 INFO Inserting file di-initrd (tag=71fb5916ad1ee63a1de85e2ed623400201be76566704b7a94503b46637412f44, size=21268557).
2015-07-09 10:45:22,618 INFO Inserting file boot-kernel (tag=f74a01a9e4f31a3372d25459bf41169feac2a653b4984e469be0ced10e09bb1e, size=5461488).
2015-07-09 10:45:22,618 INFO Inserting file di-kernel (tag=a0a4180fb69827d7eeca973032190253ba42f8a79812658f9e57fe6ab49b652f, size=5463416).
2015-07-09 10:45:22,618 INFO New root image: /var/lib/maas/boot-resources/cache/root-image-7d824be933989af25fcc7c81554fc3e1ad7fddf5e97bb4a2abc8c37b17ed02b4.
2015-07-09 10:45:31,998 ERROR Unhandled exception; unable to continue.
Traceback (most recent call last):
  File "/usr/sbin/maas-import-pxe-files", line 30, in <module>
    main(args)
  File "/usr/lib/python2.7/dist-packages/provisioningserver/import_images/boot_resources.py", line 509, in main
    writer.write(source['path'], source['keyring'])
  File "/usr/lib/python2.7/dist-packages/provisioningserver/import_images/boot_resources.py", line 309, in write
    super(RepoWriter, self).sync(reader, rpath)
  File "/usr/lib/python2.7/dist-packages/simplestreams/mirrors/__init__.py", line 88, in sync
    return self.sync_index(reader, path, data, content)
  File "/usr/lib/python2.7/dist-packages/simplestreams/mirrors/__init__.py", line 240, in sync_index
    self.sync(reader, path=epath)
  File "/usr/lib/python2.7/dist-packages/simplestreams/mirrors/__init__.py", line 86, in sync
    return self.sync_products(reader, path, data, content)
  File "/usr/lib/python2.7/dist-packages/simplestreams/mirrors/__init__.py", line 318, in sync_products
    self.insert_item(item, src, target, pgree, ipath_cs)
  File "/usr/lib/python2.7/dist-packages/provisioningserver/import_images/boot_resources.py", line 355, in insert_item
    links = self.insert_root_image(tag, checksums, size, contentsource)
  File "/usr/lib/python2.7/dist-packages/provisioningserver/import_images/boot_resources.py", line 341, in insert_root_image
    self._cache.insert(root_image_tag, uncompressed, mutable=False)
  File "/usr/lib/python2.7/dist-packages/simplestreams/objectstores/__init__.py", line 134, in insert
    buf = reader.read(self.read_size)
  File "/usr/lib/python2.7/dist-packages/simplestreams/contentsource.py", line 164, in read
    return self.fd.read(size)
  File "/usr/lib/python2.7/gzip.py", line 261, in read
    self._read(readsize)
  File "/usr/lib/python2.7/gzip.py", line 296, in _read
    self._read_gzip_header()
  File "/usr/lib/python2.7/gzip.py", line 190, in _read_gzip_header
    raise IOError, 'Not a gzipped file'
IOError: Not a gzipped fil

不确定这是否与它可以下载的数据量有关,但看起来有些文件在 1.4GB 时就很难下载了 - 是否有我可以提高的限制设置?

    /var/lib/maas/boot-resources/cache$ ls -lh
total 3.4G
-rw-r--r-- 43 root root  21M Jul  7 10:47 71fb5916ad1ee63a1de85e2ed623400201be76566704b7a94503b46637412f44
-rw-r--r--  1 root root 261M Jul  7 10:48 7d824be933989af25fcc7c81554fc3e1ad7fddf5e97bb4a2abc8c37b17ed02b4
-rw-r--r-- 43 root root 5.3M Jul  7 10:47 a0a4180fb69827d7eeca973032190253ba42f8a79812658f9e57fe6ab49b652f
-rw-r--r-- 43 root root 5.6M Jul  7 10:46 b146783134b20619cd92c998e567c959d6ca2687b7609fb952f5740b3348e907
-rw-r--r-- 43 root root 5.6M Jul  7 10:46 d4fc2ba26cad96f4360cb36f04c26b2f50dceee9413c206431148b87e4958909
-rw-r--r-- 43 root root  24M Jul  7 10:47 d9f59b43a593b4b7bb04dc1329e29c9dfca86dd0d8f9f06ce0966bc184dfe763
-rw-r--r-- 43 root root 5.3M Jul  7 10:47 f74a01a9e4f31a3372d25459bf41169feac2a653b4984e469be0ced10e09bb1e
-rw-r--r-- 43 root root 1.4G Jul  7 10:47 root-image-6ff7ae2389224763c785146794ee4b357dcf9e5f44597d6273282281b3262da9
-rw-r--r--  1 root root 1.4G Jul 14 12:45 root-image-7d824be933989af25fcc7c81554fc3e1ad7fddf5e97bb4a2abc8c37b17ed02b4.part
-rw-r--r-- 43 root root 313M Jul  7 10:48 root-tgz-6ff7ae2389224763c785146794ee4b357dcf9e5f44597d6273282281b3262da9

答案1

从 /etc/maas/bootresources.yaml 中删除了“Precise”,现在它可以正常工作

相关内容