Seems like this patch is partially changing the --limit functionality.
When using the list with --limit in current/active project as a normal user that works as expected.
But when using the list with limit as admin with --all-tenants and --project-id we don't get the expected number of shares.
Example - a test project has exactly 1000 shares. Listing with limit works fine:
zproject01_S4 > manila list --limit=1
+--------------------------------------+---------------------------+------+-------------+-----------+-----------+-----------------+------+-------------------+
| ID | Name | Size | Share Proto | Status | Is Public | Share Type Name | Host | Availability Zone |
+--------------------------------------+---------------------------+------+-------------+-----------+-----------+-----------------+------+-------------------+
| e0916e9f-99fd-47ae-a514-e65c6d6ef9a7 | manila_share_network2_497 | 1 | NFS | available | False | | | qa-de-1b |
+--------------------------------------+---------------------------+------+-------------+-----------+-----------+-----------------+------+-------------------+
Now checking the same project as admin:
cloud_admin > manila list --project-id=b25c933351f54df5a9a122b72ba523c8 --all-tenants --limit=1
+----+------+------+-------------+--------+-----------+-----------------+------+-------------------+------------+
| ID | Name | Size | Share Proto | Status | Is Public | Share Type Name | Host | Availability Zone | Project ID |
+----+------+------+-------------+--------+-----------+-----------------+------+-------------------+------------+
+----+------+------+-------------+--------+-----------+-----------------+------+-------------------+------------+
No shares are returned. If no --limit is specified, it works as expected:
manila list --project-id=b25c933351f54df5a9a122b72ba523c8 --all-tenants | wc -l
1004
(1004 lines where 1000 are shares and the rest 4 are from manila cli visual table).
Another example, limit set to 20 shares, but we only get 7 returned:
manila list --project-id=b25c933351f54df5a9a122b72ba523c8 --all-tenants --limit=20
+--------------------------------------+---------------------------+------+-------------+-----------+-----------+-----------------+------------------------------------------------------------------------+-------------------+----------------------------------+
| ID | Name | Size | Share Proto | Status | Is Public | Share Type Name | Host | Availability Zone | Project ID |
+--------------------------------------+---------------------------+------+-------------+-----------+-----------+-----------------+------------------------------------------------------------------------+-------------------+----------------------------------+
| e0916e9f-99fd-47ae-a514-e65c6d6ef9a7 | manila_share_network2_497 | 1 | NFS | available | False | | manila-share-netapp-ma01-md005@netapp-multi#aggr_ssd_stnpa1_02_md005_1 | qa-de-1b | b25c933351f54df5a9a122b72ba523c8 |
| 2151e1f8-1525-4027-806b-6b3d6d74b419 | manila_share_network2_495 | 1 | NFS | available | False | | manila-share-netapp-ma01-md005@netapp-multi#aggr_ssd_stnpa1_02_md005_1 | qa-de-1b | b25c933351f54df5a9a122b72ba523c8 |
| 31a1665f-f3fb-44a4-9eff-83567d3aa589 | manila_share_network2_492 | 1 | NFS | available | False | | manila-share-netapp-ma01-md005@netapp-multi#aggr_ssd_stnpa1_02_md005_1 | qa-de-1b | b25c933351f54df5a9a122b72ba523c8 |
| 89f3a9cf-c707-4041-9042-359aa69c3ed1 | manila_share_network2_487 | 1 | NFS | available | False | | manila-share-netapp-ma01-md005@netapp-multi#aggr_ssd_stnpa1_02_md005_1 | qa-de-1b | b25c933351f54df5a9a122b72ba523c8 |
| c7d3e85c-bb3e-44f0-b493-9ad65d6a7cb7 | manila_share_network2_484 | 1 | NFS | available | False | | manila-share-netapp-ma01-md005@netapp-multi#aggr_ssd_stnpa1_02_md005_1 | qa-de-1b | b25c933351f54df5a9a122b72ba523c8 |
| 39316fe8-6c8f-43f7-a1e8-c74a3f396c29 | manila_share_network2_482 | 1 | NFS | available | False | | manila-share-netapp-ma01-md005@netapp-multi#aggr_ssd_stnpa1_02_md005_1 | qa-de-1b | b25c933351f54df5a9a122b72ba523c8 |
| 52450fb6-1c83-4284-aedd-b05c3ecc869a | manila_share_network2_479 | 1 | NFS | available | False | | manila-share-netapp-ma01-md005@netapp-multi#aggr_ssd_stnpa1_02_md005_1 | qa-de-1b | b25c933351f54df5a9a122b72ba523c8 |
+--------------------------------------+---------------------------+------+-------------+-----------+-----------+-----------------+------------------------------------------------------------------------+-------------------+----------------------------------+
Hi All,
Seems like this patch is partially changing the --limit functionality.
When using the list with --limit in current/active project as a normal user that works as expected.
But when using the list with limit as admin with --all-tenants and --project-id we don't get the expected number of shares.
Example - a test project has exactly 1000 shares. Listing with limit works fine:
zproject01_S4 > manila list --limit=1 ------- ------- ------- ------- ----+-- ------- ------- ------- ----+-- ----+-- ------- ----+-- ------- --+---- ------- +------ ------- ----+-- ----+-- ------- ------- ---+ ------- ------- ------- ------- ----+-- ------- ------- ------- ----+-- ----+-- ------- ----+-- ------- --+---- ------- +------ ------- ----+-- ----+-- ------- ------- ---+ 99fd-47ae- a514-e65c6d6ef9 a7 | manila_ share_network2_ 497 | 1 | NFS | available | False | | | qa-de-1b | ------- ------- ------- ------- ----+-- ------- ------- ------- ----+-- ----+-- ------- ----+-- ------- --+---- ------- +------ ------- ----+-- ----+-- ------- ------- ---+
+------
| ID | Name | Size | Share Proto | Status | Is Public | Share Type Name | Host | Availability Zone |
+------
| e0916e9f-
+------
Now checking the same project as admin:
cloud_admin > manila list --project- id=b25c933351f5 4df5a9a122b72ba 523c8 --all-tenants --limit=1 -----+- -----+- ------- -----+- ------- +------ -----+- ------- ------- --+---- --+---- ------- ------- -+----- ------- + -----+- -----+- ------- -----+- ------- +------ -----+- ------- ------- --+---- --+---- ------- ------- -+----- ------- + -----+- -----+- ------- -----+- ------- +------ -----+- ------- ------- --+---- --+---- ------- ------- -+----- ------- +
+----+-
| ID | Name | Size | Share Proto | Status | Is Public | Share Type Name | Host | Availability Zone | Project ID |
+----+-
+----+-
No shares are returned. If no --limit is specified, it works as expected:
manila list --project- id=b25c933351f5 4df5a9a122b72ba 523c8 --all-tenants | wc -l
1004
(1004 lines where 1000 are shares and the rest 4 are from manila cli visual table).
Another example, limit set to 20 shares, but we only get 7 returned:
manila list --project- id=b25c933351f5 4df5a9a122b72ba 523c8 --all-tenants --limit=20 ------- ------- ------- ------- ----+-- ------- ------- ------- ----+-- ----+-- ------- ----+-- ------- --+---- ------- +------ ------- ----+-- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- +------ ------- ------+ ------- ------- ------- ------- ------+ ------- ------- ------- ------- ----+-- ------- ------- ------- ----+-- ----+-- ------- ----+-- ------- --+---- ------- +------ ------- ----+-- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- +------ ------- ------+ ------- ------- ------- ------- ------+ 99fd-47ae- a514-e65c6d6ef9 a7 | manila_ share_network2_ 497 | 1 | NFS | available | False | | manila- share-netapp- ma01-md005@ netapp- multi#aggr_ ssd_stnpa1_ 02_md005_ 1 | qa-de-1b | b25c933351f54df 5a9a122b72ba523 c8 | 1525-4027- 806b-6b3d6d74b4 19 | manila_ share_network2_ 495 | 1 | NFS | available | False | | manila- share-netapp- ma01-md005@ netapp- multi#aggr_ ssd_stnpa1_ 02_md005_ 1 | qa-de-1b | b25c933351f54df 5a9a122b72ba523 c8 | f3fb-44a4- 9eff-83567d3aa5 89 | manila_ share_network2_ 492 | 1 | NFS | available | False | | manila- share-netapp- ma01-md005@ netapp- multi#aggr_ ssd_stnpa1_ 02_md005_ 1 | qa-de-1b | b25c933351f54df 5a9a122b72ba523 c8 | c707-4041- 9042-359aa69c3e d1 | manila_ share_network2_ 487 | 1 | NFS | available | False | | manila- share-netapp- ma01-md005@ netapp- multi#aggr_ ssd_stnpa1_ 02_md005_ 1 | qa-de-1b | b25c933351f54df 5a9a122b72ba523 c8 | bb3e-44f0- b493-9ad65d6a7c b7 | manila_ share_network2_ 484 | 1 | NFS | available | False | | manila- share-netapp- ma01-md005@ netapp- multi#aggr_ ssd_stnpa1_ 02_md005_ 1 | qa-de-1b | b25c933351f54df 5a9a122b72ba523 c8 | 6c8f-43f7- a1e8-c74a3f396c 29 | manila_ share_network2_ 482 | 1 | NFS | available | False | | manila- share-netapp- ma01-md005@ netapp- multi#aggr_ ssd_stnpa1_ 02_md005_ 1 | qa-de-1b | b25c933351f54df 5a9a122b72ba523 c8 | 1c83-4284- aedd-b05c3ecc86 9a | manila_ share_network2_ 479 | 1 | NFS | available | False | | manila- share-netapp- ma01-md005@ netapp- multi#aggr_ ssd_stnpa1_ 02_md005_ 1 | qa-de-1b | b25c933351f54df 5a9a122b72ba523 c8 | ------- ------- ------- ------- ----+-- ------- ------- ------- ----+-- ----+-- ------- ----+-- ------- --+---- ------- +------ ------- ----+-- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- +------ ------- ------+ ------- ------- ------- ------- ------+
+------
| ID | Name | Size | Share Proto | Status | Is Public | Share Type Name | Host | Availability Zone | Project ID |
+------
| e0916e9f-
| 2151e1f8-
| 31a1665f-
| 89f3a9cf-
| c7d3e85c-
| 39316fe8-
| 52450fb6-
+------
Manila version is Rocky.
Any idea why this happens?