帮酷LOGO
0 0 评论
  • 显示原文与译文双语对照的内容
文章标签:STA  LXC  juju  State  CHAR  charm  STAT  

问题:

所以我试图开始使用 Juju,并尝试在本地使用LXC来实现这个目的。

我按照以下说明操作: 如何为本地使用配置 juju

不幸的是,这对我似乎不起作用。

状态显示以下内容:


$ juju status


machines:


 0:


 agent-state: running


 dns-name: localhost


 instance-id: local


 instance-state: running


services:


 mysql:


 charm: cs:precise/mysql-1


 relations:


 db:


 - wordpress


 units:


 mysql/0:


 agent-state: pending


 machine: 0


 public-address: null


 wordpress:


 charm: cs:precise/wordpress-0


 exposed: true


 relations:


 db:


 - mysql


 units:


 wordpress/0:


 agent-state: pending


 machine: 0


 open-ports: []


 public-address: null


2012-05-10 14:09:38,155 INFO 'status' command finished successfully



可以看到代理状态是'挂起',并且没有 public 地址,我可以访问新创建的站点。 我在这里找不到什么东西?

更新: 尝试破坏环境,再次尝试了( 多次)。 这是调试日志的输出:


~$ juju debug-log 


2012-05-11 08:50:23,790 INFO Enabling distributed debug log.


2012-05-11 08:50:23,806 INFO Tailing logs - Ctrl-C to stop.


2012-05-11 08:50:42,338 Machine:0: juju.agents.machine DEBUG: Units changed old:set([]) new:set(['mysql/0'])


2012-05-11 08:50:42,339 Machine:0: juju.agents.machine DEBUG: Starting service unit: mysql/0.. .


2012-05-11 08:50:42,459 Machine:0: unit.deploy DEBUG: Downloading charm cs:precise/mysql-1 to/home/andre/.juju/data/andre-local/charms


2012-05-11 08:50:42,620 Machine:0: unit.deploy DEBUG: Using <juju.machine.unit.UnitContainerDeployment object at 0x9c54b6c> for mysql/0 in/home/andre/.juju/data/andre-local


2012-05-11 08:50:42,648 Machine:0: unit.deploy DEBUG: Starting service unit mysql/0...


2012-05-11 08:50:42,649 Machine:0: unit.deploy DEBUG: Creating master container...


2012-05-11 08:54:33,992 Machine:0: unit.deploy DEBUG: Created master container andre-local-0-template


2012-05-11 08:54:33,993 Machine:0: unit.deploy INFO: Creating container mysql-0...


2012-05-11 08:56:18,760 Machine:0: unit.deploy INFO: Container created for mysql/0


2012-05-11 08:56:19,466 Machine:0: unit.deploy DEBUG: Charm extracted into container


2012-05-11 08:56:19,569 Machine:0: unit.deploy DEBUG: Starting container...


2012-05-11 08:56:22,707 Machine:0: unit.deploy INFO: Started container for mysql/0


2012-05-11 08:56:22,707 Machine:0: unit.deploy INFO: Started service unit mysql/0


2012-05-11 08:56:23,012 Machine:0: juju.agents.machine DEBUG: Units changed old:set(['mysql/0']) new:set(['wordpress/0', 'mysql/0'])


2012-05-11 08:56:23,039 Machine:0: juju.agents.machine DEBUG: Starting service unit: wordpress/0.. .


2012-05-11 08:56:23,154 Machine:0: unit.deploy DEBUG: Downloading charm cs:precise/wordpress-0 to/home/andre/.juju/data/andre-local/charms


2012-05-11 08:56:23,396 Machine:0: unit.deploy DEBUG: Using <juju.machine.unit.UnitContainerDeployment object at 0x9c519cc> for wordpress/0 in/home/andre/.juju/data/andre-local


2012-05-11 08:56:23,620 Machine:0: unit.deploy DEBUG: Starting service unit wordpress/0...


2012-05-11 08:56:23,621 Machine:0: unit.deploy INFO: Creating container wordpress-0...


2012-05-11 08:58:24,739 Machine:0: unit.deploy INFO: Container created for wordpress/0


2012-05-11 08:58:25,163 Machine:0: unit.deploy DEBUG: Charm extracted into container


2012-05-11 08:58:25,397 Machine:0: unit.deploy DEBUG: Starting container...


2012-05-11 08:58:27,982 Machine:0: unit.deploy INFO: Started container for wordpress/0


2012-05-11 08:58:27,983 Machine:0: unit.deploy INFO: Started service unit wordpress/0



这是状态命令( 使用详细标志)的结果:


~$ juju -v status


2012-05-11 08:51:53,464 DEBUG Initializing juju status runtime


2012-05-11 08:51:53,625:4030(0xb7345b00):ZOO_INFO@log_env@658: Client environment:zookeeper.version=zookeeper C client 3.3.5


2012-05-11 08:51:53,625:4030(0xb7345b00):ZOO_INFO@log_env@662: Client environment:host.name=andre-ufo


2012-05-11 08:51:53,625:4030(0xb7345b00):ZOO_INFO@log_env@669: Client environment:os.name=Linux


2012-05-11 08:51:53,625:4030(0xb7345b00):ZOO_INFO@log_env@670: Client environment:os.arch=3.2.0-24-generic-pae


2012-05-11 08:51:53,625:4030(0xb7345b00):ZOO_INFO@log_env@671: Client environment:os.version=#37-Ubuntu SMP Wed Apr 25 10:47:59 UTC 2012


2012-05-11 08:51:53,626:4030(0xb7345b00):ZOO_INFO@log_env@679: Client environment:user.name=andre


2012-05-11 08:51:53,626:4030(0xb7345b00):ZOO_INFO@log_env@687: Client environment:user.home=/home/andre


2012-05-11 08:51:53,626:4030(0xb7345b00):ZOO_INFO@log_env@699: Client environment:user.dir=/home/andre


2012-05-11 08:51:53,626:4030(0xb7345b00):ZOO_INFO@zookeeper_init@727: Initiating client connection, host=192.168.122.1:41779 sessionTimeout=10000 watcher=0xb7780620 sessionId=0 sessionPasswd=<null> context=0x9242ee8 flags=0


2012-05-11 08:51:53,627:4030(0xb6b90b40):ZOO_INFO@check_events@1585: initiated connection to server [192.168.122.1:41779]


2012-05-11 08:51:53,649:4030(0xb6b90b40):ZOO_INFO@check_events@1632: session establishment complete on server [192.168.122.1:41779], sessionId=0x1373ae057d90007, negotiated timeout=10000


2012-05-11 08:51:53,651 DEBUG Environment is initialized.


machines:


 0:


 agent-state: running


 dns-name: localhost


 instance-id: local


 instance-state: running


services:


 mysql:


 charm: cs:precise/mysql-1


 relations:


 db:


 - wordpress


 units:


 mysql/0:


 agent-state: pending


 machine: 0


 public-address: null


 wordpress:


 charm: cs:precise/wordpress-0


 relations:


 db:


 - mysql


 units:


 wordpress/0:


 agent-state: pending


 machine: 0


 public-address: null




回答 1:

我正在进行同样的错误,并且 #juju, 能够确定我的防火墙在主机上打开,阻止了主机连接到主机。

尝试运行:

 
sudo ufw disable



 

然后:


sudo juju destroy-environment



然后把东西 fire。 如果这是第一次引导计算机上的环境,请注意,初始魅力下载需要花费一些时间,所以在部署一个单元之后,需要 15分钟。

这也是一个打开的Bug 插件,因为应该自动处理这个情况。


回答 2:

如果这是第一次引导本地环境,它将需要几个( 根据下载大约 400MB 个服务器映像数据所需的时间) 来构建第一个主映像。 在"数据目录"路径( 在 environments.yaml 文件中定义) 中,有一个描述这里进程的machine-agent.log:


2012-05-09 10:04:03,848: juju.agents.machine@INFO: Machine agent started id:0


2012-05-09 10:05:08,175: juju.agents.machine@DEBUG: Units changed old:set([]) new:set(['mysql/0'])


2012-05-09 10:05:08,176: juju.agents.machine@DEBUG: Starting service unit: mysql/0.. .


2012-05-09 10:05:08,222: unit.deploy@DEBUG: Downloading charm cs:precise/mysql-1 to/home/marco/.juju/local/marco-local/charms


2012-05-09 10:05:08,314: unit.deploy@DEBUG: Using <juju.machine.unit.UnitContainerDeployment object at 0x9cccbec> for mysql/0 in/home/marco/.juju/local/marco-local


2012-05-09 10:05:08,375: unit.deploy@DEBUG: Starting service unit mysql/0...


2012-05-09 10:05:08,376: unit.deploy@DEBUG: Creating master container...



稍后,你将看到以下内容:


2012-05-09 10:09:40,699: unit.deploy@DEBUG: Created master container marco-local-0-template


2012-05-09 10:09:40,699: unit.deploy@INFO: Creating container mysql-0...


2012-05-09 10:10:31,429: unit.deploy@INFO: Container created for mysql/0


2012-05-09 10:10:31,483: unit.deploy@DEBUG: Charm extracted into container



几分钟后,主容器创建了哪些细节。

最后,并非每个"本地"boostrap都有效,尝试运行 juju destroy-environment,然后运行 juju bootstrap


回答 3:

我也有同样的问题。 我在 master-customize.log 中发现由于 apt-cacher-ng ( 我不确定我觉得这是不是发生了因为我的笔记本电脑在下载过程中挂起) 中的包损坏而导致失败。 我通过访问来纠正这个问题 http://localhost:3142/acng-report.html 检查:

  • 通过文件名和文件目录( 不推荐) 进行验证,
  • 然后通过校验和( 慢速) 验证文件内容,同时检测损坏的文件,
  • 然后立即截断损坏的文件。

点击开始扫描和/或者过期。 然后我就能够破坏juju环境并成功地重新部署它。


回答 4:

你可以尝试允许juju网络的( libvirt ) 具有以下功能,而不是禁用 ufw:


sudo ufw allow from `ip addr show virbr0|tail -n 1 |cut -d' ' -f 6` to any



我在 Ubuntu 12.04上的例子




文章标签:STA  STAT  CHAR  State  LXC  charm  juju  

Copyright © 2011 HelpLib All rights reserved.    知识分享协议 京ICP备05059198号-3  |  如果智培  |  酷兔英语