From 22c8cce3eff36c71632ad0904cdbae05bc703230 Mon Sep 17 00:00:00 2001 From: Chin-Ya Huang Date: Thu, 17 Aug 2023 11:07:56 +0800 Subject: [PATCH] test: engine version enforcement ref: 5842 Signed-off-by: Chin-Ya Huang --- .../v1.6.0/test-engine-version-enforcement.md | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 docs/content/manual/release-specific/v1.6.0/test-engine-version-enforcement.md diff --git a/docs/content/manual/release-specific/v1.6.0/test-engine-version-enforcement.md b/docs/content/manual/release-specific/v1.6.0/test-engine-version-enforcement.md new file mode 100644 index 0000000000..7af19a17b1 --- /dev/null +++ b/docs/content/manual/release-specific/v1.6.0/test-engine-version-enforcement.md @@ -0,0 +1,42 @@ +--- +title: Test engine version enforcement +--- + +## Related issue +https://github.com/longhorn/longhorn/issues/5842 + +## Test step + +**Given** Longhorn v1.4.x cluster running +And create and attach a volume (volume-1) +And upgraded Longhorn to v1.5.x +And create and attach a volume (volume-2) + +**When** upgraded Longhorn to v1.6.0 +**Then** v1.6.0 longhorn-manager Pods should be in crashloop +``` +longhorn-manager-zrf8r 0/1 CrashLoopBackOff 2 (10s ago) 52s +longhorn-manager-zsph2 0/1 CrashLoopBackOff 2 (8s ago) 52s +longhorn-manager-grhsf 0/1 CrashLoopBackOff 2 (8s ago) 51s +``` +And should see incompatible version error in longhorn-manager Pod logs +``` +time="2023-08-17T03:03:20Z" level=fatal msg="Error starting manager: failed checking Engine upgarde path: incompatible Engine ei-7fa7c208 client API version: found version 7 is below required minimal version 8" +``` + +**When** downgraded Longhorn to v1.5.x +**Then** Longhorn components should be running + +**When** upgraded v1.4.1 volume (volume-1) engine +And upgraded Longhorn to v1.6.0 +**Then** Longhorn components should be running +And v1.4.x EngineImage state should be incompatible +``` +NAME STATE IMAGE REFCOUNT BUILDDATE AGE +ei-74783864 deployed longhornio/longhorn-engine:v1.5.1 10 28d 12m +ei-7fa7c208 incompatible longhornio/longhorn-engine:v1.4.1 0 157d 13m +ei-ad420081 deployed c3y1huang/research:2017-lh-ei 0 44h 24s +``` + +**When** update existing volume/engine/replica custom resourcs `spec.image` with `longhornio/longhorn-engine:v1.4.x` +**Then** should be blocked