nova image-list 和 glance image-list 有什么区别
[摘要:nova image-list 战 glance image-list 有甚么差别? # nova image-list ID Name Status Server b6c93037-c39d-49e6-b849-2ebe1346d689 ]
nova image-list 和 glance image-list 有什么区别?
# nova image-list
ID | Name | Status | Server |
---|---|---|---|
b6c93037-c39d-49e6-b849-2ebe1346d689 | L2image | ACTIVE | |
5a58ac6e-7e4d-4d4f-bc7b-723eddfffc02 | UDimage | ACTIVE | |
c6b5cf09-3d26-40eb-bb49-d25f15022f7a | UEimage | ACTIVE | |
dfa462d8-27b3-456b-b8c1-fab887ceeab8 | cirros-0.3.3 | ACTIVE | |
c98eed1a-4a27-4b33-9703-01c00a0a3358 | eNBimage | ACTIVE |
# glance image-list
ID | Name | Disk Format | Container Format | Size | Status |
---|---|---|---|---|---|
dfa462d8-27b3-456b-b8c1-fab887ceeab8 | cirros-0.3.3 | qcow2 | bare | 13200896 | active |
nova image-list显示了所有的image,而glance image-list只现实了public的image.
应该是因为nova拥有了admin的权限而glance没有。“This is due to your glance doesn’t use keystone as auth strategy.”
看到网上有一个解决方案为
“It seems that while the glance-api.conf file had flavor=keystone the registry file was missing the entry.”
但是我不知道这个所谓的missing the entry是什么概念。
使用glance image-show+ID的话,可以读出所有image的详细信息,但image list依然不会显示这些image。所以我认为不是权限的问题。
随手试了一下换了个api版本,居然就显示了所有image # glance --os-image-api-version 2 image-list
ID | Name |
---|---|
dfa462d8-27b3-456b-b8c1-fab887ceeab8 | cirros-0.3.3 |
c6b5cf09-3d26-40eb-bb49-d25f15022f7a | UEimage |
5a58ac6e-7e4d-4d4f-bc7b-723eddfffc02 | UDimage |
c98eed1a-4a27-4b33-9703-01c00a0a3358 | eNBimage |
b6c93037-c39d-49e6-b849-2ebe1346d689 | L2image |
然后使用了 # glance help image-list
以后,发现了一个选项是--all-tanents
于是输入 # glance image-list --all-tenants
ID | Name | Disk Format | Container Format | Size | Status |
---|---|---|---|---|---|
dfa462d8-27b3-456b-b8c1-fab887ceeab8 | cirros-0.3.3 | qcow2 | bare | 13200896 | active |
c98eed1a-4a27-4b33-9703-01c00a0a3358 | eNBimage | qcow2 | bare | 2320760832 | active |
b6c93037-c39d-49e6-b849-2ebe1346d689 | L2image | qcow2 | bare | 1331363840 | active |
5a58ac6e-7e4d-4d4f-bc7b-723eddfffc02 | UDimage | qcow2 | bare | 1449590784 | active |
c6b5cf09-3d26-40eb-bb49-d25f15022f7a | UEimage | qcow2 | bare | 1477509120 | active |
或者使用 # glance image-list --is-public Flase
ID | Name | Disk Format | Container Format | Size | Status |
---|---|---|---|---|---|
c98eed1a-4a27-4b33-9703-01c00a0a3358 | eNBimage | qcow2 | bare | 2320760832 | active |
b6c93037-c39d-49e6-b849-2ebe1346d689 | L2image | qcow2 | bare | 1331363840 | active |
5a58ac6e-7e4d-4d4f-bc7b-723eddfffc02 | UDimage | qcow2 | bare | 1449590784 | active |
c6b5cf09-3d26-40eb-bb49-d25f15022f7a | UEimage | qcow2 | bare | 1477509120 | active |
也可以看到平时不显示的四个image。
而nova help image-list
只有 --limit <limit> Number of images to return per request
这一个选项。我猜测nova默认是显示所有tenant的image的