Inconsistent count of templates reported when executing listTemplates under RootAdmin and DomainAdmin
- 主要言語
- Java
- スター
- 3.1k
- フォーク
- 1.4k
- 平均マージ
- 6日 19時間
- マージ済み PR(30日)
- 32
説明
##### ISSUE TYPE
* Bug Report
##### COMPONENT NAME
~~~
API
~~~
##### CLOUDSTACK VERSION
~~~
4.18.1.1
~~~
##### CONFIGURATION
N/A
##### OS / ENVIRONMENT
N/A
##### SUMMARY
##### STEPS TO REPRODUCE
~~~
1. Make sure your ROOT domain has a DomainAdmin account.
2. Pick one of the VM templates on a running Cloudstack platform to test the API call on
3. Run the following command under the RootAdmin: `cmk list templates templatefilter=executable filter=id,name keyword=`
4. Run the same command under the DomainAdmin.
~~~
##### EXPECTED RESULTS
When running the command under **RootAdmin**, the result template entries match the "count" JSON field:
~~~
cmk list templates templatefilter=executable filter=id,name keyword=MyTemplate
{
"count": 5,
"template": [
{
"id": "19c1af19-ca5a-4f1d-aece-d253f3e961c2",
"name": "MyTemplate 1"
},
{
"id": "804558dd-cc80-4e13-a67d-0db607930fc4",
"name": "MyTemplate 2"
},
{
"id": "7fc10cc1-34e6-46b2-b699-8369b4cc031b",
"name": "MyTemplate 3"
},
{
"id": "7f6504f5-b5ae-437f-99a5-4ca814e41157",
"name": "MyTemplate 4"
},
{
"id": "bf338572-85df-46aa-b4d6-678edd865c5e",
"name": "MyTemplate 5"
}
]
}
~~~
##### ACTUAL RESULTS
When running the command under **DomainAdmin**, the result template entries **do not** match the "count" JSON field:
~~~
cmk list templates templatefilter=executable filter=id,name keyword=MyTemplate
{
"count": 20,
"template": [
{
"id": "19c1af19-ca5a-4f1d-aece-d253f3e961c2",
"name": "MyTemplate 1"
},
{
"id": "804558dd-cc80-4e13-a67d-0db607930fc4",
"name": "MyTemplate 2"
},
{
"id": "7fc10cc1-34e6-46b2-b699-8369b4cc031b",
"name": "MyTemplate 3"
},
{
"id": "7f6504f5-b5ae-437f-99a5-4ca814e41157",
"name": "MyTemplate 4"
},
{
"id": "bf338572-85df-46aa-b4d6-678edd865c5e",
"name": "MyTemplate 5"
}
]
}
~~~
コントリビューションガイド
調査の方向性
まず、templatefilter=executable、filter=id,name、キーワードを指定した listTemplates リクエストを、RootAdmin と DomainAdmin の両方で再現します。count フィールドと返されたテンプレートエントリの件数を比較し、ロール固有のテンプレート可視性に関する API の処理を追跡します。完了条件は、両方のロールで、返されたエントリと一致する count が報告されることです。
索引モデルが issue の本文から書いたものです。
評価
- 領域
- api, cloud
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- 説明が足りない
- 初心者へのやさしさ
- 35/100