由于无法下载软件包,Juju 无法部署 charms

由于无法下载软件包,Juju 无法部署 charms

我昨天更新到了 ubuntu 12.04。并使用以下命令安装 juju:

sudo add-apt-repository ppa:juju/pkgs
sudo apt-get update && sudo apt-get install juju

我也安装了 lxc,然后部署了 charms,但服务没有启动,日志显示 python 错误。

2012-05-03 03:57:20,439: twisted@ERROR: I: Retrieving inetutils-ping
2012-05-03 03:57:20,440: twisted@ERROR: I: Validating inetutils-ping
2012-05-03 03:57:20,440: twisted@ERROR: E: Couldn't download packages: libnih1 libglib2.0-0 libpython2.7 hostname liblocale-
gettext-perl libfribidi0 sysvinit-utils libapt-pkg4.11 libnih-dbus1 openssh-client findutils libmagic1 libbz2-1.0 login libm
ount1 base-passwd
2012-05-03 03:57:20,440: twisted@ERROR: failed to execute template 'ubuntu'
2012-05-03 03:57:20,441: twisted@ERROR: aborted
2012-05-03 03:57:20,441: twisted@ERROR: 
2012-05-03 03:57:20,442: juju.agents.machine@ERROR: Error starting unit: cloudfoundry/0
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/juju/agents/machine.py", line 97, in watch_service_units
    yield self.unit_deployer.start_service_unit(unit_name)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1037, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/usr/lib/python2.7/dist-packages/twisted/python/failure.py", line 382, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/usr/lib/python2.7/dist-packages/juju/unit/deploy.py", line 92, in start_service_unit
    self.machine_id, self.client.servers, bundle)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1037, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/usr/lib/python2.7/dist-packages/twisted/python/failure.py", line 382, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/usr/lib/python2.7/dist-packages/juju/machine/unit.py", line 227, in start
    machine_id, bundle, public_key)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1037, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/usr/lib/python2.7/dist-packages/twisted/python/failure.py", line 382, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/usr/lib/python2.7/dist-packages/juju/machine/unit.py", line 204, in _get_container
    machine_id, public_key)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1037, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/usr/lib/python2.7/dist-packages/twisted/python/failure.py", line 382, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/usr/lib/python2.7/dist-packages/juju/machine/unit.py", line 192, in _get_master_template
    yield master_template.create()
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1037, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/usr/lib/python2.7/dist-packages/twisted/python/failure.py", line 382, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/usr/lib/python2.7/dist-packages/juju/lib/lxc/__init__.py", line 281, in create
    yield deferToThread(self._create_wait)
  File "/usr/lib/python2.7/dist-packages/twisted/python/threadpool.py", line 207, 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/juju/lib/lxc/__init__.py", line 274, in _create_wait
    config_file=lxc_config)
  File "/usr/lib/python2.7/dist-packages/juju/lib/lxc/__init__.py", line 60, in _lxc_create
    return _cmd(args)
  File "/usr/lib/python2.7/dist-packages/juju/lib/lxc/__init__.py", line 46, in _cmd
    raise LXCError(stdout_data)
LXCError: debootstrap is /usr/sbin/debootstrap

另一个错误日志:

2012-05-03 03:57:20,558: juju.agents.machine@DEBUG: Units changed old:set(['cloudfoundry/0']) new:set(['cloudfoundry/2'])
2012-05-03 03:57:20,558: juju.agents.machine@DEBUG: Stopping service unit: cloudfoundry/0 ...
2012-05-03 03:57:20,559: unit.deploy@INFO: Stopping service unit cloudfoundry/0...
2012-05-03 03:57:20,559: unit.deploy@DEBUG: Destroying container...
2012-05-03 03:57:20,610: twisted@ERROR: 'dragon-sample-cloudfoundry-0' does not exist
2012-05-03 03:57:20,610: twisted@ERROR: 
2012-05-03 03:57:20,611: juju.agents.machine@ERROR: Error stopping unit: cloudfoundry/0
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/juju/agents/machine.py", line 90, in watch_service_units
    yield self.unit_deployer.kill_service_unit(unit_name)
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1037, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/usr/lib/python2.7/dist-packages/twisted/python/failure.py", line 382, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/usr/lib/python2.7/dist-packages/juju/unit/deploy.py", line 104, in kill_service_unit
    yield deployment.destroy()
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1037, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/usr/lib/python2.7/dist-packages/twisted/python/failure.py", line 382, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/usr/lib/python2.7/dist-packages/juju/machine/unit.py", line 287, in destroy
    yield self.container.destroy()
  File "/usr/lib/python2.7/dist-packages/twisted/internet/defer.py", line 1037, in _inlineCallbacks
    result = result.throwExceptionIntoGenerator(g)
  File "/usr/lib/python2.7/dist-packages/twisted/python/failure.py", line 382, in throwExceptionIntoGenerator
    return g.throw(self.type, self.value, self.tb)
  File "/usr/lib/python2.7/dist-packages/juju/lib/lxc/__init__.py", line 329, in destroy
    yield deferToThread(_lxc_destroy, self.container_name)
  File "/usr/lib/python2.7/dist-packages/twisted/python/threadpool.py", line 207, 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/juju/lib/lxc/__init__.py", line 77, in _lxc_destroy
    return _cmd(["sudo", "lxc-destroy", "-n", container_name])
  File "/usr/lib/python2.7/dist-packages/juju/lib/lxc/__init__.py", line 46, in _cmd
    raise LXCError(stdout_data)
LXCError: 'dragon-sample-cloudfoundry-0' does not exist

顺便问一下,我在machine-agent.log中发现很多安装日志,第一次安装正常吗?

谢谢。

答案1

2012-05-03 03:57:20,440: twisted@ERROR: E: Couldn't download packages: libnih1 libglib2.0-0 libpython2.7 hostname liblocale-gettext-perl libfribidi0 sysvinit-utils libapt-pkg4.11 libnih-dbus1 openssh-client findutils libmagic1 libbz2-1.0 login libmount1 base-passwd

这是一个合法的错误,表示在构建最小 ubuntu 时下载这些软件包失败。在这种情况下,您可能需要删除缓存的引导系统:

sudo rm -rf /var/cache/lxc/precise

然后重试。确保您可以访问archive.ubuntu.com,因为这是用于下载软件包的。

相关内容