apache / apache/cloudstack

Inconsistent count of templates reported when executing listTemplates under RootAdmin and DomainAdmin

未关闭
#9,083 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
status:needs-reproducing
主要语言
Java
星标
3.1k
派生
1.4k
平均合并
6 天 19 小时
30 天内合并 PR
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"
}
]
}
~~~

贡献指南

打开贡献指南

调研方向

首先,在 RootAdmin 和 DomainAdmin 下分别使用 templatefilter=executable、filter=id,name 以及一个关键词重现 listTemplates 请求。将 count 字段与返回的模板条目进行比较,并跟踪 API 对特定角色模板可见性的处理;完成标准是两个角色报告的 count 都与其返回的条目匹配。

由索引模型根据 Issue 内容生成。

评估

领域
api, cloud
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
需要澄清
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。