From 540ea3dcdc6dec9ee1acdad3dbc8d587d0f137b9 Mon Sep 17 00:00:00 2001 From: "ye.zou" Date: Thu, 12 Mar 2026 20:36:20 +0800 Subject: [PATCH] [testlib]: handle non-existent volume in getsnapinfos VFS hook Return empty snapshot list instead of asserting when volume does not exist on destination PS. Fixes VFS assertion failure during CephToCeph volume migration in stability tests. Change-Id: I7d8e4f2a1b3c5d6e7f8a9b0c1d2e3f4a5b6c7d8e --- .../java/org/zstack/testlib/CephPrimaryStorageSpec.groovy | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/testlib/src/main/java/org/zstack/testlib/CephPrimaryStorageSpec.groovy b/testlib/src/main/java/org/zstack/testlib/CephPrimaryStorageSpec.groovy index e8f90f1d110..9c9d7b66fe6 100755 --- a/testlib/src/main/java/org/zstack/testlib/CephPrimaryStorageSpec.groovy +++ b/testlib/src/main/java/org/zstack/testlib/CephPrimaryStorageSpec.groovy @@ -708,7 +708,10 @@ class CephPrimaryStorageSpec extends PrimaryStorageSpec { def cmd = JSONObjectUtil.toObject(e.body, CephPrimaryStorageBase.GetVolumeSnapInfosCmd.class) VFS vfs = vfs(cmd, spec) String vfsPath = cephPathToVFSPath(cmd.volumePath) - vfs.Assert(vfs.exists(vfsPath), "cannot find the volume[${cmd.volumePath}]") + if (!vfs.exists(vfsPath)) { + rsp.setSnapInfos(new ArrayList()) + return rsp + } List files = getSnapshotPaths(vfs, vfsPath) rsp.setSnapInfos(new ArrayList())