[Unauthorized System] root@T920compute24:/var/lib/docker/volumes# cd /etc/kolla/nova-compute [Note] System unauthorized, Please contact the system supplier. [Unauthorized System] root@T920compute24:/etc/kolla/nova-compute# ls ceph.client.admin.keyring ceph.conf config.json nova.conf [Note] System unauthorized, Please contact the system supplier. [Unauthorized System] root@T920compute24:/etc/kolla/nova-compute#
实际上,kolla
确实使用 volume
挂载了配置文件,但是并没有直接挂载到对应的位置,其中又添加了一次处理,我们先来看宿主机上配置文件所在的位置:
[root@control01 ~]# cd /etc/kolla/nova-compute
[root@control01 nova-compute]# ls
config.json nova.conf
注意到其中的 config.json
在容器里面是看不到的,而 nova.conf
和容器内的是一致的。 kolla 的大致处理流程是这样的:
- 把这个目录挂载到容器的
/var/lib/kolla/config_files
目录 - 在容器的启动脚本中加了处理配置的脚本:
kolla_set_configs
kolla_set_configs
根据/var/lib/kolla/config_files/config.json
中的配置来处理配置文件
现在看一下 config.json
中的内容,是不是很好理解了:
{
"command": "nova-compute",
"config_files": [
{
"source": "/var/lib/kolla/config_files/nova.conf",
"dest": "/etc/nova/nova.conf",
"owner": "nova",
"perm": "0600"
}
],
}
在宿主机下更改 /etc/kolla/nova-compute/nova.conf
,并再次重启容器,再次创建虚机。这次应该没有问题了。
root@T920compute24:/etc/kolla/nova-compute# cat config.json { "command": "nova-compute", "config_files": [ { "source": "/var/lib/kolla/config_files/nova.conf", "dest": "/etc/nova/nova.conf", "owner": "nova", "perm": "0600" }, { "source": "/var/lib/kolla/config_files/ceph.*", "dest": "/etc/ceph/", "owner": "nova", "perm": "0700" } ], "permissions": [ { "path": "/var/log/kolla/nova", "owner": "nova:nova", "recurse": true }, { "path": "/var/lib/nova", "owner": "nova:nova", "recurse": true } ] } [Note] System unauthorized, Please contact the system supplier. [Unauthorized System] root@T920compute24:/etc/kolla/nova-compute#
总结
查服务:
docker ps -a
查日志:
cd /var/log/kolla
改配置:
cd /etc/kolla/<service_name>
重启服务:
docker restart <container_name>