[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>