Skip to content

Conversation

@shwstppr
Copy link
Contributor

@shwstppr shwstppr commented Aug 4, 2025

Description

Fixes issue mentioned in #11315 (review)

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • build/CI
  • test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

How did you try to break this feature and the system with this change?

@kiranchavala
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@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.

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 14529

@sureshanaparti sureshanaparti added this to the 4.19.4 milestone Aug 4, 2025
Copy link
Contributor

@kiranchavala kiranchavala left a 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

@shwstppr shwstppr marked this pull request as ready for review August 4, 2025 10:40
Copy link
Contributor

@sureshanaparti sureshanaparti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clgtm

@sureshanaparti sureshanaparti merged commit 3134efb into apache:4.19 Aug 4, 2025
23 checks passed
@sureshanaparti sureshanaparti deleted the fix-swiftstore-npe branch August 4, 2025 10:55
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Aug 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants