-
Notifications
You must be signed in to change notification settings - Fork 1.2k
plugin-swift: handle null cache store #11380
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Fixes apache#11315 (review) Signed-off-by: Abhishek Kumar <[email protected]>
|
@blueorangutan package |
|
@kiranchavala a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 14529 |
kiranchavala
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Able to add a swift store
(localcloud) 🐱 > add imagestore provider=Swift name=gh2 details[0].key=account details[0].value=AUTH_test details[1].key=username details[1].value=test:tester details[2].key=key details[2].value=testing url=http://127.0.0.1:8081
{
"imagestore": {
"hasannotations": false,
"id": "e6757523-72d7-420b-b483-7e8c9b78c3dd",
"name": "gh2",
"protocol": "http",
"providername": "Swift",
"readonly": false,
"scope": "REGION",
"url": "http://127.0.0.1:8081"
}
}
Logs
[root@ref-trl-9148-k-Mol8-kiran-chavala-mgmt1 ~]# cat /var/log/cloudstack/management/management-server.log |grep -i "logid:177efd80"
2025-08-04 08:21:12,812 DEBUG [c.c.a.ApiServlet] (qtp146370526-20:ctx-825b47a8) (logid:177efd80) ===START=== 10.0.35.65 -- GET apiKey=LIN6rqXuaJwMPfGYFh13qDwYz5VNNz1J2J6qIOWcd3oLQOq0WtD4CwRundBL6rzXToa3lQOC_vKjI3nkHtiD8Q&command=addImageStore&details[0].key=account&details[0].value=AUTH_test&details[1].key=username&details[1].value=test%3Atester&details[2].key=key&details[2].value=testing&name=gh2&provider=Swift&response=json&url=http%3A%2F%2F127.0.0.1%3A8081&signature=VUVzkNEKIHfBWnYEOM8ERNkdT%2FA%3D
2025-08-04 08:21:12,818 DEBUG [c.c.a.ApiServer] (qtp146370526-20:ctx-825b47a8 ctx-294e623f) (logid:177efd80) CIDRs from which account 'Account [{"accountName":"admin","id":2,"uuid":"8d352272-7101-11f0-8f0a-1e00a00003d4"}]' is allowed to perform API calls: 0.0.0.0/0,::/0
2025-08-04 08:21:12,823 DEBUG [o.a.c.a.StaticRoleBasedAPIAccessChecker] (qtp146370526-20:ctx-825b47a8 ctx-294e623f) (logid:177efd80) RoleService is enabled. We will use it instead of StaticRoleBasedAPIAccessChecker.
2025-08-04 08:21:12,823 DEBUG [o.a.c.r.ApiRateLimitServiceImpl] (qtp146370526-20:ctx-825b47a8 ctx-294e623f) (logid:177efd80) API rate limiting is disabled. We will not use ApiRateLimitService.
2025-08-04 08:21:12,827 INFO [o.a.c.s.d.l.SwiftImageStoreLifeCycleImpl] (qtp146370526-20:ctx-825b47a8 ctx-294e623f ctx-e241730f) (logid:177efd80) Trying to add a swift store at http://127.0.0.1:8081 in data center null
2025-08-04 08:21:12,871 DEBUG [o.a.c.s.i.TemplateDataFactoryImpl] (qtp146370526-20:ctx-825b47a8 ctx-294e623f ctx-e241730f) (logid:177efd80) template 3 is already in store:2, type:Image
2025-08-04 08:21:12,887 DEBUG [o.a.c.s.c.a.StorageCacheRandomAllocator] (qtp146370526-20:ctx-825b47a8 ctx-294e623f ctx-e241730f) (logid:177efd80) Can't find staging storage in zone: null
2025-08-04 08:21:12,887 ERROR [o.a.c.s.d.d.SwiftImageStoreDriverImpl] (qtp146370526-20:ctx-825b47a8 ctx-294e623f ctx-e241730f) (logid:177efd80) No cache store found for scope: ZONE
2025-08-04 08:21:12,892 DEBUG [o.a.c.s.i.TemplateDataFactoryImpl] (qtp146370526-20:ctx-825b47a8 ctx-294e623f ctx-e241730f) (logid:177efd80) template 3 is already in store:2, type:Image
2025-08-04 08:21:12,911 INFO [o.a.c.s.i.d.TemplateDataStoreDaoImpl] (qtp146370526-20:ctx-825b47a8 ctx-294e623f ctx-e241730f) (logid:177efd80) Duplicate 0 template cache store records to region store
2025-08-04 08:21:12,913 INFO [o.a.c.s.d.d.SnapshotDataStoreDaoImpl] (qtp146370526-20:ctx-825b47a8 ctx-294e623f ctx-e241730f) (logid:177efd80) Duplicating [0] snapshot cache store records to region store [2].
2025-08-04 08:21:12,918 DEBUG [c.c.a.ApiServlet] (qtp146370526-20:ctx-825b47a8 ctx-294e623f ctx-e241730f) (logid:177efd80) ===END=== 10.0.35.65 -- GET apiKey=LIN6rqXuaJwMPfGYFh13qDwYz5VNNz1J2J6qIOWcd3oLQOq0WtD4CwRundBL6rzXToa3lQOC_vKjI3nkHtiD8Q&command=addImageStore&details[0].key=account&details[0].value=AUTH_test&details[1].key=username&details[1].value=test%3Atester&details[2].key=key&details[2].value=testing&name=gh2&provider=Swift&response=json&url=http%3A%2F%2F127.0.0.1%3A8081&signature=VUVzkNEKIHfBWnYEOM8ERNkdT%2FA%3D
add swift
(localcloud) 🐱 > add swift url=http://127.0.0.1:8081 username=test:tester account=AUTH_test key=testing
{
"secondarystorage": {
"hasannotations": false,
"id": "12495c5b-994e-4235-8536-bb73ee2ef358",
"name": "http://127.0.0.1:8081",
"protocol": "http",
"providername": "Swift",
"readonly": false,
"scope": "REGION",
"url": "http://127.0.0.1:8081"
}
}
Logs
[root@ref-trl-9148-k-Mol8-kiran-chavala-mgmt1 ~]# cat /var/log/cloudstack/management/management-server.log |grep -i "logid:ce92a1e3"
2025-08-04 08:24:08,837 DEBUG [c.c.a.ApiServlet] (qtp146370526-20:ctx-3ba957b8) (logid:ce92a1e3) ===START=== 10.0.35.65 -- GET account=AUTH_test&apiKey=LIN6rqXuaJwMPfGYFh13qDwYz5VNNz1J2J6qIOWcd3oLQOq0WtD4CwRundBL6rzXToa3lQOC_vKjI3nkHtiD8Q&command=addSwift&key=testing&response=json&url=http%3A%2F%2F127.0.0.1%3A8081&username=test%3Atester&signature=98SLp9zuj9OL1WneGTib4S6w93o%3D
2025-08-04 08:24:08,842 DEBUG [c.c.a.ApiServer] (qtp146370526-20:ctx-3ba957b8 ctx-2a0008ba) (logid:ce92a1e3) CIDRs from which account 'Account [{"accountName":"admin","id":2,"uuid":"8d352272-7101-11f0-8f0a-1e00a00003d4"}]' is allowed to perform API calls: 0.0.0.0/0,::/0
2025-08-04 08:24:08,845 DEBUG [o.a.c.a.StaticRoleBasedAPIAccessChecker] (qtp146370526-20:ctx-3ba957b8 ctx-2a0008ba) (logid:ce92a1e3) RoleService is enabled. We will use it instead of StaticRoleBasedAPIAccessChecker.
2025-08-04 08:24:08,846 DEBUG [o.a.c.r.ApiRateLimitServiceImpl] (qtp146370526-20:ctx-3ba957b8 ctx-2a0008ba) (logid:ce92a1e3) API rate limiting is disabled. We will not use ApiRateLimitService.
2025-08-04 08:24:08,849 INFO [o.a.c.s.d.l.SwiftImageStoreLifeCycleImpl] (qtp146370526-20:ctx-3ba957b8 ctx-2a0008ba ctx-be9729c9) (logid:ce92a1e3) Trying to add a swift store at http://127.0.0.1:8081 in data center null
2025-08-04 08:24:08,872 DEBUG [o.a.c.s.i.TemplateDataFactoryImpl] (qtp146370526-20:ctx-3ba957b8 ctx-2a0008ba ctx-be9729c9) (logid:ce92a1e3) template 3 is already in store:2, type:Image
2025-08-04 08:24:08,880 DEBUG [o.a.c.s.i.TemplateDataFactoryImpl] (qtp146370526-20:ctx-3ba957b8 ctx-2a0008ba ctx-be9729c9) (logid:ce92a1e3) template 3 is already in store:3, type:Image
2025-08-04 08:24:08,886 DEBUG [o.a.c.s.c.a.StorageCacheRandomAllocator] (qtp146370526-20:ctx-3ba957b8 ctx-2a0008ba ctx-be9729c9) (logid:ce92a1e3) Can't find staging storage in zone: null
2025-08-04 08:24:08,887 ERROR [o.a.c.s.d.d.SwiftImageStoreDriverImpl] (qtp146370526-20:ctx-3ba957b8 ctx-2a0008ba ctx-be9729c9) (logid:ce92a1e3) No cache store found for scope: ZONE
2025-08-04 08:24:08,890 DEBUG [o.a.c.s.i.TemplateDataFactoryImpl] (qtp146370526-20:ctx-3ba957b8 ctx-2a0008ba ctx-be9729c9) (logid:ce92a1e3) template 3 is already in store:3, type:Image
2025-08-04 08:24:08,908 INFO [o.a.c.s.i.d.TemplateDataStoreDaoImpl] (qtp146370526-20:ctx-3ba957b8 ctx-2a0008ba ctx-be9729c9) (logid:ce92a1e3) Duplicate 0 template cache store records to region store
2025-08-04 08:24:08,910 INFO [o.a.c.s.d.d.SnapshotDataStoreDaoImpl] (qtp146370526-20:ctx-3ba957b8 ctx-2a0008ba ctx-be9729c9) (logid:ce92a1e3) Duplicating [0] snapshot cache store records to region store [3].
2025-08-04 08:24:08,916 DEBUG [c.c.a.ApiServlet] (qtp146370526-20:ctx-3ba957b8 ctx-2a0008ba ctx-be9729c9) (logid:ce92a1e3) ===END=== 10.0.35.65 -- GET account=AUTH_test&apiKey=LIN6rqXuaJwMPfGYFh13qDwYz5VNNz1J2J6qIOWcd3oLQOq0WtD4CwRundBL6rzXToa3lQOC_vKjI3nkHtiD8Q&command=addSwift&key=testing&response=json&url=http%3A%2F%2F127.0.0.1%3A8081&username=test%3Atester&signature=98SLp9zuj9OL1WneGTib4S6w93o%3D
sureshanaparti
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clgtm
Fixes apache#11315 (review) Signed-off-by: Abhishek Kumar <[email protected]>
Description
Fixes issue mentioned in #11315 (review)
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
How did you try to break this feature and the system with this change?