Skip to content

Revert volume to snapshot failures #6209

Description

@nvazquez
ISSUE TYPE
  • Bug Report
  • Improvement Request
  • Enhancement Request
COMPONENT NAME
Storage
CLOUDSTACK VERSION
4.16.1 and main
CONFIGURATION

Set snapshot.backup.to.secondary to true

OS / ENVIRONMENT

Tested KVM on NFS storage

SUMMARY

Revert volume to snapshot after migrating a volume to another storage fails with error:

2022-04-05 14:52:25,411 ERROR [c.c.a.ApiAsyncJobDispatcher] (API-Job-Executor-12:ctx-e7abb0ff job-48) (logid:8178b033) Unexpected exception while executing org.apache.cloudstack.api.command.user.snapshot.RevertSnapshotCmd
com.cloud.utils.exception.CloudRuntimeException: Cannot find an entry for snapshot 1 on primary storage pools
	at org.apache.cloudstack.storage.snapshot.SnapshotServiceImpl.revertSnapshot(SnapshotServiceImpl.java:433)
	at org.apache.cloudstack.storage.snapshot.DefaultSnapshotStrategy.revertSnapshot(DefaultSnapshotStrategy.java:393)
	at com.cloud.storage.snapshot.SnapshotManagerImpl.revertSnapshot(SnapshotManagerImpl.java:330)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	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 com.sun.proxy.$Proxy218.revertSnapshot(Unknown Source)
	at org.apache.cloudstack.api.command.user.snapshot.RevertSnapshotCmd.execute(RevertSnapshotCmd.java:101)
	at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:156)
	at com.cloud.api.ApiAsyncJobDispatcher.runJob(ApiAsyncJobDispatcher.java:108)
STEPS TO REPRODUCE
- Take volume snapshots
- Migrate VM with volume / migrate volume / reinstall VM
- Try revert volume to snapshot
EXPECTED RESULTS
Revert succeeds
ACTUAL RESULTS
Failure (logs above)

Metadata

Metadata

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions