[Starlingx-discuss] What's the use case of these 2 patches?

Fang, Liang A liang.a.fang at intel.com
Fri Oct 19 03:16:44 UTC 2018


Hi Brent and all

I brought these two patches to yesterday's glance meeting, some update here:

- Regarding the commit from glanceclient: 75967f4c9c9ca582277d036581effcac0c7ee5a9: Show glance_backend rbd or file.
Community suggest to add option "-vv " to "glance image-list", something like "glance -vv image-list". They don't want to show store info in "-v" because in most situation store info is the same, so there will be same values showed in the column in whole page, something like:

| ... | img1                | rbd | ...
| ... | img2                | rbd | ...
| ... | img3                | rbd | ...
| ... | img4                | rbd | ...
| ... | img5                | rbd | ...
...
...

I think it make sense to show this info in -vv, not -v
Do you think is this achieved your original purpose of the patch? If so, I will go ahead to update the patch for "-vv".


- Regarding the commit from glance: f6ad3a44303a1bf9abec91e1d679cdd13fb9c4f6: Add store info in glance image-list and image-show
   Cores mentioned it has been implemented in rocky version which introduced a new feature "multi-store". I tried to setup the multi-store environment and verified this, the store info indeed saved, and the info can be found in database table: image_locations, something like {"backend": "ceph"},  see below:
=====================================================================================
mysql> select * from image_locations where status = 'active';
+----+--------------------------------------+--------------------------------------------------------------------------------------------+---------------------+---------------------+------------+---------+-------------------------+--------+
| id | image_id                             | value                                                                                      | created_at          | updated_at          | deleted_at | deleted | meta_data               | status |
+----+--------------------------------------+--------------------------------------------------------------------------------------------+---------------------+---------------------+------------+---------+-------------------------+--------+
|  1 | 617f2880-f5b9-491f-b569-d2bd088c0bd5 | file:///opt/stack/data/glance/images/617f2880-f5b9-491f-b569-d2bd088c0bd5                  | 2018-10-17 03:15:46 | 2018-10-17 03:15:46 | NULL       |       0 | {}                      | active |
|  9 | 0de67910-661e-4a2c-b5de-bcdc4d4a62db | rbd://b7b109e5-6c2d-4060-b81f-bd5c6fe57e6e/pool1/0de67910-661e-4a2c-b5de-bcdc4d4a62db/snap | 2018-10-18 06:45:24 | 2018-10-18 06:45:24 | NULL       |       0 | {}                      | active |
| 13 | e9af91ba-4d8c-4a3c-b2d7-5fbb5421f065 | file:///opt/stack/data/glance/images/e9af91ba-4d8c-4a3c-b2d7-5fbb5421f065                  | 2018-10-18 08:40:18 | 2018-10-18 08:40:18 | NULL       |       0 | {"backend": "locallvm"} | active |
| 14 | 4804a6b7-6392-4232-9a9e-897d1eeef589 | rbd://b7b109e5-6c2d-4060-b81f-bd5c6fe57e6e/pool1/4804a6b7-6392-4232-9a9e-897d1eeef589/snap | 2018-10-18 08:41:57 | 2018-10-18 08:41:57 | NULL       |       0 | {"backend": "ceph"}     | active |
+----+--------------------------------------+--------------------------------------------------------------------------------------------+---------------------+---------------------+------------+---------+-------------------------+--------+
4 rows in set (0.00 sec)
=====================================================================================

Also Cmd "glance image-show" can show the store id like: "stores           | ceph", see below:
stack at ceph01liang:~$ glance image-show 4804a6b7-6392-4232-9a9e-897d1eeef589
+------------------+----------------------------------------------------------------------------------+
| Property         | Value                                                                            |
+------------------+----------------------------------------------------------------------------------+
| checksum         | f8ab98ff5e73ebab884d80c9dc9c7290                                                 |
| container_format | bare                                                                             |
| created_at       | 2018-10-18T08:41:55Z                                                             |
| disk_format      | raw                                                                              |
| id               | 4804a6b7-6392-4232-9a9e-897d1eeef589                                             |
| min_disk         | 0                                                                                |
| min_ram          | 0                                                                                |
| name             | img2-ceph                                                                        |
| os_hash_algo     | sha512                                                                           |
| os_hash_value    | f0fd1b50420dce4ca382ccfbb528eef3a38bbeff00b54e95e3876b9bafe7ed2d6f919ca35d9046d4 |
|                  | 37c6d2d8698b1174a335fbd66035bb3edc525d2cdb187232                                 |
| os_hidden        | False                                                                            |
| owner            | 60a12b1788ad44468afd983f89a5f8dc                                                 |
| protected        | False                                                                            |
| size             | 13267968                                                                         |
| status           | active                                                                           |
| stores           | ceph                                                                             |
| tags             | []                                                                               |
| updated_at       | 2018-10-18T08:41:57Z                                                             |
| virtual_size     | Not available                                                                    |
| visibility       | public                                                                           |
+------------------+----------------------------------------------------------------------------------+

So, the store info already saved in latest code, do you think is this achieved your original purpose of the patch? If so, I guess the patch can be marked as merged.

Thanks
Liang

-----Original Message-----
From: Fang, Liang A 
Sent: Wednesday, October 10, 2018 11:44 PM
To: Rowsell, Brent <Brent.Rowsell at windriver.com>; Ding, Jack <Jack.Ding at windriver.com>; Church, Robert <Robert.Church at windriver.com>; starlingx-discuss at lists.starlingx.io
Subject: RE: What's the use case of these 2 patches?

OK, thank you Brent, let me try my best to convince community to accept these two patches.

Regards
Liang
-----Original Message-----
From: Rowsell, Brent [mailto:Brent.Rowsell at windriver.com] 
Sent: Wednesday, October 10, 2018 8:50 PM
To: Fang, Liang A <liang.a.fang at intel.com>; Ding, Jack <Jack.Ding at windriver.com>; Church, Robert <Robert.Church at windriver.com>; starlingx-discuss at lists.starlingx.io
Subject: RE: What's the use case of these 2 patches?

Liang,

This was a small usability improvement to help the user distinguish the glance backend type in a multi backend environment.

Brent 

-----Original Message-----
From: Fang, Liang A [mailto:liang.a.fang at intel.com] 
Sent: Wednesday, October 10, 2018 4:49 AM
To: Fang, Liang A <liang.a.fang at intel.com>; Ding, Jack <Jack.Ding at windriver.com>; Church, Robert <Robert.Church at windriver.com>; Rowsell, Brent <Brent.Rowsell at windriver.com>; starlingx-discuss at lists.starlingx.io
Subject: RE: What's the use case of these 2 patches?

Related review URL:
https://review.openstack.org/#/c/605014/
https://review.openstack.org/#/c/605006/

Compare with upstream glance, starlingx added "Store" column as below
+-----+--------+-------+-----------------+-----+------------+--------+---------+
| ID   | Name | Store | Disk_format | ...    | Size           | Status |Owner|
+-----+--------+-------+-----------------+-----+------------+--------+---------+
| xxx | img1   | file     | raw                    | ...   | 10737418 | active | xxx      |
| xxx | img2   | file     | raw                    | ...   | 5086345   | active | xxx      |
+-----+--------+-------+-----------------+-----+------------+--------+---------+

Regards
Liang
-----Original Message-----
From: Fang, Liang A [mailto:liang.a.fang at intel.com] 
Sent: Wednesday, October 10, 2018 4:35 PM
To: jack.ding at windriver.com; robert.church at windriver.com; Rowsell, Brent <Brent.Rowsell at windriver.com>; starlingx-discuss at lists.starlingx.io
Subject: [Starlingx-discuss] What's the use case of these 2 patches?

Hi

I'm working on upstreaming below 2 patches and the code review was slightly blocked because community need to know the use case:
Commit from glanceclient: 75967f4c9c9ca582277d036581effcac0c7ee5a9: Show glance_backend rbd or file.
Commit from glance: f6ad3a44303a1bf9abec91e1d679cdd13fb9c4f6: Add store info in glance image-list and image-show

Could anybody share the original intention of these two patches? What's the use case of saving/showing the store info? It seems end user cannot do anything with this information. Thanks!

Regards
Liang

_______________________________________________
Starlingx-discuss mailing list
Starlingx-discuss at lists.starlingx.io
http://lists.starlingx.io/cgi-bin/mailman/listinfo/starlingx-discuss


More information about the Starlingx-discuss mailing list