我的environments.yaml
样子是这样的:
environments:
test:
type: local
control-bucket: juju-a14dfae3830142d9ac23c499395c2785999
admin-secret: 6608267bbd6b447b8c90934167b2a294999
default-series: oneiric
juju-origin: distro
data-dir: /home/bruno/projects/juju
juju bootstrap
运行完美:
2011-11-22 19:19:31,999 INFO Bootstrapping environment 'test' (type: local)...
2011-11-22 19:19:32,004 INFO Checking for required packages...
2011-11-22 19:19:33,584 INFO Starting networking...
2011-11-22 19:19:34,058 INFO Starting zookeeper...
2011-11-22 19:19:34,283 INFO Starting storage server...
2011-11-22 19:19:40,051 INFO Initializing zookeeper hierarchy
2011-11-22 19:19:40,247 INFO Starting machine agent (origin: distro)...
[sudo] password for bruno:
2011-11-22 19:23:16,054 INFO Environment bootstrapped
2011-11-22 19:23:16,079 INFO 'bootstrap' command finished successfully
接受从已知良好的 charm 进行部署(已尝试使用我正在尝试创建的 charm 进行部署):
juju deploy --repository=/home/bruno/projects/charms_repo/ local:teamspeak
2011-11-22 19:28:49,929 INFO Charm deployed as service: 'teamspeak'
2011-11-22 19:28:49,962 INFO 'deploy' command finished successfully
此后,我可以看到juju debug-log
显示的活动,并且可以看到网络指示灯亮起和熄灭以及硬盘上的活动。
等待...
看看juju status
我得到:
services:
teamspeak:
charm: local:oneiric/teamspeak-1
relations: {}
units:
teamspeak/0:
machine: 0
public-address: 192.168.122.226
relations: {}
state: start_error
juju debug-log
没有帮助,而且我在/var/log/juju
或下没有文件/var/lib/juju
。
最后juju debug-log
只显示这一点:
2011-11-22 19:45:20,790 Machine:0: juju.agents.machine DEBUG: Units changed old:set(['wordpress/0']) new:set(['wordpress/0', 'teamspeak/0'])
2011-11-22 19:45:20,823 Machine:0: juju.agents.machine DEBUG: Starting service unit: teamspeak/0 ...
2011-11-22 19:45:21,137 Machine:0: juju.agents.machine DEBUG: Downloading charm local:oneiric/teamspeak-1 to /home/bruno/projects/juju/bruno-test/charms
2011-11-22 19:45:22,115 Machine:0: juju.agents.machine DEBUG: Starting service unit teamspeak/0
2011-11-22 19:45:22,133 Machine:0: unit.deploy INFO: Creating container teamspeak-0...
2011-11-22 19:47:04,586 Machine:0: unit.deploy INFO: Container created for teamspeak/0
2011-11-22 19:47:04,781 Machine:0: unit.deploy DEBUG: Charm extracted into container
2011-11-22 19:47:04,801 Machine:0: unit.deploy DEBUG: Starting container...
2011-11-22 19:47:07,086 Machine:0: unit.deploy INFO: Started container for teamspeak/0
2011-11-22 19:47:07,107 Machine:0: juju.agents.machine INFO: Started service unit teamspeak/0
我该如何解决这里发生的问题?
答案1
这看起来像是启动钩子中的一个错误。该单元的日志从 lxc 容器符号链接到数据目录:{data-dir}/units/{unit-name}/unit.log
他们也在单位的集装箱里/var/log/juju/{unit-name}.log
对于非启动/安装钩子,您还可以使用 juju debug-hooks 命令来获取代替单元钩子的交互式调试 shell。