You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "sureshanaparti (via GitHub)" <gi...@apache.org> on 2025/10/29 10:46:21 UTC

[I] Report appropriate error message when volume snapshots are not supported when the associated instance has file-based storage VM snapshots [cloudstack]

sureshanaparti opened a new issue, #11927:
URL: https://github.com/apache/cloudstack/issues/11927

   ### problem
   
   The volume snapshot fails with error "Unable to find a snapshot strategy to create snapshot..." when the associated instance has file-based storage VM snapshots. It is better to report with proper message to the user. There is a warn message in the log:
   
   `2025-10-29 06:58:39,043 WARN  [o.a.c.s.s.DefaultSnapshotStrategy] (Work-Job-Executor-9:[ctx-5f3017c7, job-51/job-52, ctx-51a88f7c]) (logid:3258313d) VM [25f7de00-8218-462f-9e9e-8345e0d17246] already has KVM File-Based storage VM snapshots. These VM snapshots and volume snapshots are not supported together for KVM. As restoring volume snapshots will erase the VM snapshots and cause data loss.`
   
   <img width="1211" height="504" alt="Image" src="https://github.com/user-attachments/assets/fe820951-d256-46d2-a908-547f20ad110d" />
   
   
   ```
   2025-10-29 06:58:39,005 DEBUG [c.c.v.VmWorkJobDispatcher] (Work-Job-Executor-9:[ctx-5f3017c7, job-51/job-52]) (logid:3258313d) Run VM work job: com.cloud.vm.VmWorkTakeVolumeSnapshot for VM 3, job origin: 51
   2025-10-29 06:58:39,009 DEBUG [c.c.v.VmWorkJobHandlerProxy] (Work-Job-Executor-9:[ctx-5f3017c7, job-51/job-52, ctx-51a88f7c]) (logid:3258313d) Execute VM work job: com.cloud.vm.VmWorkTakeVolumeSnapshot{"volumeId":3,"policyId":0,"snapshotId":6,"quiesceVm":false,"asyncBackup":false,"poolIds":[],"userId":2,"accountId":2,"vmId":3,"handlerName":"VolumeApiServiceImpl"}
   2025-10-29 06:58:39,022 DEBUG [o.a.c.e.o.VolumeOrchestrator] (Work-Job-Executor-9:[ctx-5f3017c7, job-51/job-52, ctx-51a88f7c]) (logid:3258313d) Found [0] snapshots [[]] that have checkpoints for volume with id [3].
   2025-10-29 06:58:39,032 DEBUG [o.a.c.s.h.HeuristicRuleHelper] (Work-Job-Executor-9:[ctx-5f3017c7, job-51/job-52, ctx-51a88f7c]) (logid:3258313d) No heuristic rules found for zone [Zone {"id": "1", "name": "ref-trl-9825-k-Mol8-suresh-anaparti", "uuid": "55b9a950-738c-4075-9111-05c106cac653"}] and heuristic type [SNAPSHOT]. Returning null.
   2025-10-29 06:58:39,036 DEBUG [c.c.s.StatsCollector] (Work-Job-Executor-9:[ctx-5f3017c7, job-51/job-52, ctx-51a88f7c]) (logid:3258313d) Verifying image storage [ImageStore {"id":1,"name":"NFS:\/\/10.0.32.4\/acs\/secondary\/ref-trl-9825-k-Mol8-suresh-anaparti\/ref-trl-9825-k-Mol8-suresh-anaparti-sec1","uuid":"059074e7-8356-4daa-ac34-7d1730a1d38c"}]. Capacity: total=[2.6357 TB], used=[2.0269 TB], threshold=[95.00%].
   2025-10-29 06:58:39,036 DEBUG [c.c.s.StatsCollector] (Work-Job-Executor-9:[ctx-5f3017c7, job-51/job-52, ctx-51a88f7c]) (logid:3258313d) Verifying image storage [ImageStore {"id":1,"name":"NFS:\/\/10.0.32.4\/acs\/secondary\/ref-trl-9825-k-Mol8-suresh-anaparti\/ref-trl-9825-k-Mol8-suresh-anaparti-sec1","uuid":"059074e7-8356-4daa-ac34-7d1730a1d38c"}]. Capacity: total=[2.6357 TB], used=[2.0269 TB], threshold=[95.00%].
   2025-10-29 06:58:39,043 WARN  [o.a.c.s.s.DefaultSnapshotStrategy] (Work-Job-Executor-9:[ctx-5f3017c7, job-51/job-52, ctx-51a88f7c]) (logid:3258313d) VM [25f7de00-8218-462f-9e9e-8345e0d17246] already has KVM File-Based storage VM snapshots. These VM snapshots and volume snapshots are not supported together for KVM. As restoring volume snapshots will erase the VM snapshots and cause data loss.
   2025-10-29 06:58:39,049 DEBUG [o.a.c.s.s.StorPoolSnapshotStrategy] (Work-Job-Executor-9:[ctx-5f3017c7, job-51/job-52, ctx-51a88f7c]) (logid:3258313d) StorpoolSnapshotStrategy.canHandle: snapshot Snapshot {"id":6,"name":"ROOT-3-Snap01-1","state":"Allocated","uuid":"281e14b7-22d3-4411-9b6e-714935830c23","version":"2.2","volumeId":3}, dataStoreId 2, imageStore id 1, checkpointPath null., op=TAKE
   2025-10-29 06:58:39,052 DEBUG [c.c.a.ApiServlet] (qtp253011924-19:[ctx-8cfd09f6]) (logid:9025cd05) ===START===  10.0.3.251 -- GET  jobId=3258313d-5113-437c-9ea8-a0bdd884f67d&command=queryAsyncJobResult&response=json&
   2025-10-29 06:58:39,053 DEBUG [c.c.a.ApiServlet] (qtp253011924-19:[ctx-8cfd09f6]) (logid:9025cd05) Two factor authentication is already verified for the user 2, so skipping
   2025-10-29 06:58:39,065 DEBUG [c.c.a.ApiServer] (qtp253011924-19:[ctx-8cfd09f6, ctx-5dcc2afb]) (logid:9025cd05) CIDRs from which account 'Account [{"accountName":"admin","id":2,"uuid":"cf044d59-af15-11f0-bf49-1e007e00038d"}]' is allowed to perform API calls: 0.0.0.0/0,::/0
   2025-10-29 06:58:39,067 INFO  [o.a.c.a.DynamicRoleBasedAPIAccessChecker] (qtp253011924-19:[ctx-8cfd09f6, ctx-5dcc2afb]) (logid:9025cd05) Account for user id cf04f8b3-af15-11f0-bf49-1e007e00038d is Root Admin or Domain Admin, all APIs are allowed.
   2025-10-29 06:58:39,067 DEBUG [o.a.c.a.StaticRoleBasedAPIAccessChecker] (qtp253011924-19:[ctx-8cfd09f6, ctx-5dcc2afb]) (logid:9025cd05) RoleService is enabled. We will use it instead of StaticRoleBasedAPIAccessChecker.
   2025-10-29 06:58:39,067 DEBUG [o.a.c.r.ApiRateLimitServiceImpl] (qtp253011924-19:[ctx-8cfd09f6, ctx-5dcc2afb]) (logid:9025cd05) API rate limiting is disabled. We will not use ApiRateLimitService.
   2025-10-29 06:58:39,075 DEBUG [c.c.s.s.SnapshotManagerImpl] (Work-Job-Executor-9:[ctx-5f3017c7, job-51/job-52, ctx-51a88f7c]) (logid:3258313d) No strategy found for creation of snapshot [Snapshot {"id":6,"name":"ROOT-3-Snap01-1","state":"Allocated","uuid":"281e14b7-22d3-4411-9b6e-714935830c23","version":"2.2","volumeId":3}, dataStoreId 2, imageStore id 1, checkpointPath null.], removing its record from the database.
   2025-10-29 06:58:39,075 DEBUG [c.c.s.s.SnapshotManagerImpl] (Work-Job-Executor-9:[ctx-5f3017c7, job-51/job-52, ctx-51a88f7c]) (logid:3258313d) Failed to create snapshotUnable to find a snapshot strategy to create snapshot [Snapshot {"id":6,"name":"ROOT-3-Snap01-1","state":"Allocated","uuid":"281e14b7-22d3-4411-9b6e-714935830c23","version":"2.2","volumeId":3}] of volume [65780f6c-c2d4-4ee7-a174-db123c28ce67]. Please check the logs.
   2025-10-29 06:58:39,075 DEBUG [c.c.r.ResourceLimitManagerImpl] (Work-Job-Executor-9:[ctx-5f3017c7, job-51/job-52, ctx-51a88f7c]) (logid:3258313d) Updating resource Type = snapshot count for Account with id = 2 Operation = decreasing Amount = 1
   2025-10-29 06:58:39,085 DEBUG [c.c.r.ResourceLimitManagerImpl] (Work-Job-Executor-9:[ctx-5f3017c7, job-51/job-52, ctx-51a88f7c]) (logid:3258313d) Updating resource Type = secondary_storage count for Account with id = 2 Operation = decreasing Amount = (8.00 GB) 8589934592
   2025-10-29 06:58:39,092 ERROR [c.c.v.VmWorkJobHandlerProxy] (Work-Job-Executor-9:[ctx-5f3017c7, job-51/job-52, ctx-51a88f7c]) (logid:3258313d) Invocation exception, caused by: java.lang.UnsupportedOperationException: Unable to find a snapshot strategy to create snapshot [Snapshot {"id":6,"name":"ROOT-3-Snap01-1","state":"Allocated","uuid":"281e14b7-22d3-4411-9b6e-714935830c23","version":"2.2","volumeId":3}] of volume [65780f6c-c2d4-4ee7-a174-db123c28ce67]. Please check the logs.
   2025-10-29 06:58:39,092 INFO  [c.c.v.VmWorkJobHandlerProxy] (Work-Job-Executor-9:[ctx-5f3017c7, job-51/job-52, ctx-51a88f7c]) (logid:3258313d) Rethrow exception java.lang.UnsupportedOperationException: Unable to find a snapshot strategy to create snapshot [Snapshot {"id":6,"name":"ROOT-3-Snap01-1","state":"Allocated","uuid":"281e14b7-22d3-4411-9b6e-714935830c23","version":"2.2","volumeId":3}] of volume [65780f6c-c2d4-4ee7-a174-db123c28ce67]. Please check the logs.
   2025-10-29 06:58:39,092 DEBUG [c.c.v.VmWorkJobDispatcher] (Work-Job-Executor-9:[ctx-5f3017c7, job-51/job-52]) (logid:3258313d) Done with run of VM work job: com.cloud.vm.VmWorkTakeVolumeSnapshot for VM 3, job origin: 51
   2025-10-29 06:58:39,092 ERROR [c.c.v.VmWorkJobDispatcher] (Work-Job-Executor-9:[ctx-5f3017c7, job-51/job-52]) (logid:3258313d) Unable to complete AsyncJob {"accountId":2,"cmd":"com.cloud.vm.VmWorkTakeVolumeSnapshot","cmdInfo":"rO0ABXNyACVjb20uY2xvdWQudm0uVm1Xb3JrVGFrZVZvbHVtZVNuYXBzaG90BL5gG4Li1c8CAAhaAAthc3luY0JhY2t1cFoACXF1aWVzY2VWbUwADGxvY2F0aW9uVHlwZXQAKUxjb20vY2xvdWQvc3RvcmFnZS9TbmFwc2hvdCRMb2NhdGlvblR5cGU7TAAIcG9saWN5SWR0ABBMamF2YS9sYW5nL0xvbmc7TAAHcG9vbElkc3QAEExqYXZhL3V0aWwvTGlzdDtMAApzbmFwc2hvdElkcQB-AAJMAAh2b2x1bWVJZHEAfgACTAAHem9uZUlkc3EAfgADeHIAE2NvbS5jbG91ZC52bS5WbVdvcmufmbZW8CVnawIABEoACWFjY291bnRJZEoABnVzZXJJZEoABHZtSWRMAAtoYW5kbGVyTmFtZXQAEkxqYXZhL2xhbmcvU3RyaW5nO3hwAAAAAAAAAAIAAAAAAAAAAgAAAAAAAAADdAAUVm9sdW1lQXBpU2VydmljZUltcGwAAHBzcgAOamF2YS5sYW5nLkxvbmc7i-SQzI8j3wIAAUoABXZhbHVleHIAEGphdmEubGFuZy5OdW1iZXKGrJUdC5TgiwIAAHhwAAAAAAAAAABzcgATamF2YS51dGlsLkFycmF5TGlzdHiB0h2Zx2GdAwABSQAEc2l6ZXhwAAAAAHcEAAAAAHhzcQB-AAgAAAAAAAAABnNxAH4ACAAAAAAAAAADcA","cmdVersion":0,"comp
 leteMsid":null,"created":"Wed Oct 29 06:58:38 UTC 2025","id":52,"initMsid":32987462763405,"instanceId":null,"instanceType":null,"lastPolled":null,"lastUpdated":null,"processStatus":0,"removed":null,"result":null,"resultCode":0,"status":"IN_PROGRESS","userId":2,"uuid":"8e9b551e-ffef-4455-9b35-dd1381f49432"}, job origin: 51 java.lang.UnsupportedOperationException: Unable to find a snapshot strategy to create snapshot [Snapshot {"id":6,"name":"ROOT-3-Snap01-1","state":"Allocated","uuid":"281e14b7-22d3-4411-9b6e-714935830c23","version":"2.2","volumeId":3}] of volume [65780f6c-c2d4-4ee7-a174-db123c28ce67]. Please check the logs.
   	at com.cloud.storage.snapshot.SnapshotManagerImpl.takeSnapshot(SnapshotManagerImpl.java:1653)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
   	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.base/java.lang.reflect.Method.invoke(Method.java:569)
   	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
   	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
   	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
   	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
   	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
   	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
   	at jdk.proxy3/jdk.proxy3.$Proxy262.takeSnapshot(Unknown Source)
   	at org.apache.cloudstack.storage.volume.VolumeServiceImpl.takeSnapshot(VolumeServiceImpl.java:2794)
   	at com.cloud.storage.VolumeApiServiceImpl.orchestrateTakeVolumeSnapshot(VolumeApiServiceImpl.java:3987)
   	at com.cloud.storage.VolumeApiServiceImpl.orchestrateTakeVolumeSnapshot(VolumeApiServiceImpl.java:5309)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
   	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.base/java.lang.reflect.Method.invoke(Method.java:569)
   	at com.cloud.vm.VmWorkJobHandlerProxy.handleVmWorkJob(VmWorkJobHandlerProxy.java:102)
   	at com.cloud.storage.VolumeApiServiceImpl.handleVmWorkJob(VolumeApiServiceImpl.java:5323)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
   	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.base/java.lang.reflect.Method.invoke(Method.java:569)
   	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:344)
   	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:198)
   	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
   	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:97)
   	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
   	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:215)
   	at jdk.proxy3/jdk.proxy3.$Proxy273.handleVmWorkJob(Unknown Source)
   	at com.cloud.vm.VmWorkJobDispatcher.runJob(VmWorkJobDispatcher.java:99)
   	at org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.runInContext(AsyncJobManagerImpl.java:698)
   	at org.apache.cloudstack.managed.context.ManagedContextRunnable$1.run(ManagedContextRunnable.java:49)
   	at org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:56)
   	at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:103)
   	at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:53)
   	at org.apache.cloudstack.managed.context.ManagedContextRunnable.run(ManagedContextRunnable.java:46)
   	at org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.run(AsyncJobManagerImpl.java:646)
   	at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
   	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
   	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
   	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
   	at java.base/java.lang.Thread.run(Thread.java:840)
   ```
   
   
   ### versions
   
   ACS 4.22 RC2
   
   ### The steps to reproduce the bug
   
   1. Deploy an instance 
   2. Take instance snapshot with memory 
   3. Take volume snapshot of ROOT volume of the instance
   
   
   ### What to do about it?
   
   Report with proper message (for example - "_Volume snapshots are not supported when the associated instance has file-based storage VM snapshots_") to the user.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Report appropriate message when volume snapshots are not supported (due to the associated instance has file-based storage VM snapshots) [cloudstack]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #11927:
URL: https://github.com/apache/cloudstack/issues/11927#issuecomment-4199882248

   ### 🏷️ Issue Triaged
   
   Hi `@sureshanaparti`! I've categorized this issue as **enhancement** based on the following analysis:
   
   **Reasoning**: This issue requests improved error messaging to inform users when volume snapshots fail due to conflicting file-based VM snapshots. The underlying functionality works as designed (preventing data loss), but the user-facing error message could be more descriptive.
   
   <details>
   <summary><b>View Triage Details</b></summary>
   
   #### Analysis
   - **Keywords detected**: "report appropriate message", "better to report with proper message", "this needs to be documented"
   - **Issue type indicators**: Requests improvement to error messaging rather than fixing broken functionality
   - **Confidence**: High
   
   #### Recommended Next Steps
   - Consider implementing a user-friendly error message that clearly explains the conflict
   - May also benefit from documentation update explaining the limitation
   - The warning log already exists in DefaultSnapshotStrategy - surface this to the API response
   
   </details>
   
   **References**: [Triage run §24087368891](https://github.com/apache/cloudstack/actions/runs/24087368891)
   
   > Generated by [Issue Triage Agent](https://github.com/apache/cloudstack/actions/runs/24087368891)
   >
   > To install this workflow, run `gh aw add github/gh-aw/.github/workflows/issue-triage-agent.md@94662b1dee8ce96c876ba9f33b3ab8be32de82a4`. View source at [https://github.com/github/gh-aw/tree/94662b1dee8ce96c876ba9f33b3ab8be32de82a4/.github/workflows/issue-triage-agent.md](https://github.com/github/gh-aw/tree/94662b1dee8ce96c876ba9f33b3ab8be32de82a4/.github/workflows/issue-triage-agent.md).
   
   <!-- gh-aw-agentic-workflow: Issue Triage Agent, run: https://github.com/apache/cloudstack/actions/runs/24087368891 -->


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org