From 44c1569f0960a7d50b455f1a39c71f25f015c872 Mon Sep 17 00:00:00 2001 From: Francois Ferrand Date: Fri, 6 Dec 2024 17:53:57 +0100 Subject: [PATCH 01/10] Bump cloudserver 8.8.39 Issue: ZENKO-4943 --- solution/deps.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solution/deps.yaml b/solution/deps.yaml index 13f4e0690..779670d32 100644 --- a/solution/deps.yaml +++ b/solution/deps.yaml @@ -16,7 +16,7 @@ cloudserver: sourceRegistry: ghcr.io/scality dashboard: cloudserver/cloudserver-dashboards image: cloudserver - tag: 8.8.38 + tag: 8.8.39 envsubst: CLOUDSERVER_TAG drctl: sourceRegistry: ghcr.io/scality From 81d336b50d45967a279cd353d3aa75cc2d6eacde Mon Sep 17 00:00:00 2001 From: Francois Ferrand Date: Sat, 7 Dec 2024 13:40:14 +0100 Subject: [PATCH 02/10] Bump vault 8.8.10 Issue: ZENKO-4943 --- solution/deps.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solution/deps.yaml b/solution/deps.yaml index 779670d32..52a1e5380 100644 --- a/solution/deps.yaml +++ b/solution/deps.yaml @@ -131,7 +131,7 @@ vault: dashboard: vault2/vault-dashboards policy: vault2/vault-policies image: vault2 - tag: 8.8.9 + tag: 8.8.10 envsubst: VAULT_TAG zenko-operator: sourceRegistry: ghcr.io/scality From 2f2b3d2501b65a7dd1e62d606a92d3c7ff611431 Mon Sep 17 00:00:00 2001 From: Francois Ferrand Date: Sun, 8 Dec 2024 01:08:22 +0100 Subject: [PATCH 03/10] Bump backbeat 8.6.54 Issue: ZENKO-4943 --- solution/deps.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/solution/deps.yaml b/solution/deps.yaml index 52a1e5380..c52a5447f 100644 --- a/solution/deps.yaml +++ b/solution/deps.yaml @@ -6,7 +6,7 @@ backbeat: dashboard: backbeat/backbeat-dashboards image: backbeat policy: backbeat/backbeat-policies - tag: 8.6.53 + tag: 8.6.54 envsubst: BACKBEAT_TAG busybox: image: busybox From f07ce52e8e5507183269649840c8a897d7bf6cb7 Mon Sep 17 00:00:00 2001 From: Francois Ferrand Date: Fri, 6 Dec 2024 17:54:37 +0100 Subject: [PATCH 04/10] Release 2.6.73 Issue: ZENKO-4943 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 705642745..7d89a3521 100644 --- a/VERSION +++ b/VERSION @@ -1,4 +1,4 @@ -VERSION="2.6.72" +VERSION="2.6.73" VERSION_SUFFIX= From 0885ae75f7f04bf8e4a8752248200f5eeb9eeca2 Mon Sep 17 00:00:00 2001 From: Francois Ferrand Date: Sun, 8 Dec 2024 02:47:57 +0100 Subject: [PATCH 05/10] Release 2.7.69 Issue: ZENKO-4943 --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 8856fba3a..870ef4ca4 100644 --- a/VERSION +++ b/VERSION @@ -1,4 +1,4 @@ -VERSION="2.7.68" +VERSION="2.7.69" VERSION_SUFFIX= From fbc5e5960b49b784d3b144162f1a759e81e9e669 Mon Sep 17 00:00:00 2001 From: williamlardier Date: Thu, 12 Dec 2024 12:38:09 +0100 Subject: [PATCH 06/10] Permute the values in the quota scenario Won't change the test, but the sentences are now more meaningful. Issue: ZENKO-4941 --- tests/ctst/features/quotas/Quotas.feature | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/ctst/features/quotas/Quotas.feature b/tests/ctst/features/quotas/Quotas.feature index 04c4da95a..65bcb5a53 100644 --- a/tests/ctst/features/quotas/Quotas.feature +++ b/tests/ctst/features/quotas/Quotas.feature @@ -146,9 +146,9 @@ Feature: Quota Management for APIs Given an action "DeleteObject" And a permission to perform the "PutObject" action And a STORAGE_MANAGER type - And a bucket quota set to B + And a bucket quota set to B And an account quota set to B - And an upload size of B for the object "obj-1" + And an upload size of B for the object "obj-1" And a type And an environment setup for the API And an "existing" IAM Policy that "applies" with "ALLOW" effect for the current API From 3083021cd15482e195963b635dd778b24c4bfadc Mon Sep 17 00:00:00 2001 From: williamlardier Date: Mon, 23 Dec 2024 14:37:02 +0100 Subject: [PATCH 07/10] Bump CTST to v1.2.4 Issue: ZENKO-4941 --- tests/ctst/package.json | 2 +- tests/ctst/yarn.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/ctst/package.json b/tests/ctst/package.json index f2e107e48..7f942831c 100644 --- a/tests/ctst/package.json +++ b/tests/ctst/package.json @@ -24,7 +24,7 @@ "@aws-sdk/client-s3": "^3.583.0", "@aws-sdk/client-sts": "^3.583.0", "@eslint/compat": "^1.1.1", - "cli-testing": "github:scality/cli-testing.git#1.2.3", + "cli-testing": "github:scality/cli-testing.git#1.2.4", "eslint": "^9.9.1", "eslint-config-scality": "scality/Guidelines#8.3.0", "typescript-eslint": "^8.4.0" diff --git a/tests/ctst/yarn.lock b/tests/ctst/yarn.lock index 27828947b..f8f4a38ab 100644 --- a/tests/ctst/yarn.lock +++ b/tests/ctst/yarn.lock @@ -4527,9 +4527,9 @@ cli-table3@^0.6.0: optionalDependencies: "@colors/colors" "1.5.0" -"cli-testing@github:scality/cli-testing.git#1.2.3": - version "1.2.3" - resolved "git+ssh://git@github.com/scality/cli-testing.git#d6712d412dd7cd56cdf89a812203637d1ebab210" +"cli-testing@github:scality/cli-testing.git#1.2.4": + version "1.2.4" + resolved "git+ssh://git@github.com/scality/cli-testing.git#687c3bdb5d684c5de4082a5dd9f9c00e94ec104c" dependencies: "@aws-crypto/sha256-universal" "^5.2.0" "@aws-sdk/client-iam" "^3.637.0" From dcd2c8a734eb7f86e133a3767105c78a4cbaff5b Mon Sep 17 00:00:00 2001 From: williamlardier Date: Mon, 23 Dec 2024 14:37:33 +0100 Subject: [PATCH 08/10] When doing multiple actions in a step, continue if retryable Previously we would ignore all errors, even the ones that are not expected, now, we will stop at any error that we are not expecting. Issue: ZENKO-4941 --- tests/ctst/common/common.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/ctst/common/common.ts b/tests/ctst/common/common.ts index 163ee486a..eb4d01b5d 100644 --- a/tests/ctst/common/common.ts +++ b/tests/ctst/common/common.ts @@ -352,8 +352,9 @@ When('the user tries to perform the current S3 action on the bucket {int} times this.addToSaved('copyObject', `objectrepeatcopy-${Utils.randomString()}`); } await runActionAgainstBucket(this, this.getSaved('currentAction').action); - if (this.getResult().err) { + if (this.getResult().err && this.getResult().retryable?.throttling !== true) { this.logger.debug('Error during repeated action', { error: this.getResult().err }); + break; } await Utils.sleep(delay); } From 46f9b563d920aae589e6c99744cd7b902c641f1a Mon Sep 17 00:00:00 2001 From: williamlardier Date: Mon, 23 Dec 2024 14:38:48 +0100 Subject: [PATCH 09/10] Use a file with wx flag to control concurrency Issue: ZENKO-4941 --- tests/ctst/steps/utils/kubernetes.ts | 38 +++++++++++++--------------- 1 file changed, 18 insertions(+), 20 deletions(-) diff --git a/tests/ctst/steps/utils/kubernetes.ts b/tests/ctst/steps/utils/kubernetes.ts index 636353c50..62bfdb0a2 100644 --- a/tests/ctst/steps/utils/kubernetes.ts +++ b/tests/ctst/steps/utils/kubernetes.ts @@ -1,6 +1,5 @@ import fs from 'fs'; import * as path from 'path'; -import lockFile from 'proper-lockfile'; import { KubernetesHelper, Utils } from 'cli-testing'; import Zenko from 'world/Zenko'; import { @@ -83,24 +82,27 @@ export async function createJobAndWaitForCompletion( const watchClient = createKubeWatchClient(world); const lockFilePath = path.join('/tmp', `${jobName}.lock`); - let releaseLock: (() => Promise) | false = false; - if (!fs.existsSync(lockFilePath)) { - fs.writeFileSync(lockFilePath, ''); + let lockAquired = false; + let tries = 600; + while (!lockAquired && tries > 0) { + try { + fs.writeFileSync(lockFilePath, 'lock', { + flag: 'wx', + }); + lockAquired = true; + } catch { + world.logger.debug(`Failed to acquire lock for job: ${jobName}`, { + tries, + }); + } + tries--; + if (!lockAquired) { + await Utils.sleep(1000); + } } try { - releaseLock = await lockFile.lock(lockFilePath, { - // Expect the jobs in the queue does not take more than 5 minutes to complete - stale: 10 * 60 * 1000, - // use a linear backoff strategy - retries: { - retries: 610, - factor: 1, - minTimeout: 1000, - maxTimeout: 1000, - }, - }); world.logger.debug(`Acquired lock for job: ${jobName}`); // Read the cron job and prepare the job spec @@ -159,11 +161,7 @@ export async function createJobAndWaitForCompletion( }); throw err; } finally { - // Ensure the lock is released - if (releaseLock) { - await releaseLock(); - world.logger.debug(`Released lock for job: ${jobName}`); - } + fs.unlinkSync(lockFilePath); } } From 87ea053dba276a49e2ef636fd1acb19faa17471f Mon Sep 17 00:00:00 2001 From: williamlardier Date: Mon, 23 Dec 2024 17:51:36 +0100 Subject: [PATCH 10/10] Remove the atMost flag for utilization Not needed since we are now locking the job Issue: ZENKO-4941 --- tests/ctst/common/hooks.ts | 2 +- tests/ctst/features/CountItems/CountItems.feature | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/ctst/common/hooks.ts b/tests/ctst/common/hooks.ts index d6e64841c..1ce8d7ee4 100644 --- a/tests/ctst/common/hooks.ts +++ b/tests/ctst/common/hooks.ts @@ -17,7 +17,7 @@ import { cleanS3Bucket } from './common'; process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0'; const { atMostOnePicklePerTag } = parallelCanAssignHelpers; -const noParallelRun = atMostOnePicklePerTag(['@AfterAll', '@PRA', '@ColdStorage', '@Utilization']); +const noParallelRun = atMostOnePicklePerTag(['@AfterAll', '@PRA', '@ColdStorage']); setParallelCanAssign(noParallelRun); diff --git a/tests/ctst/features/CountItems/CountItems.feature b/tests/ctst/features/CountItems/CountItems.feature index e009f1766..88da709a3 100644 --- a/tests/ctst/features/CountItems/CountItems.feature +++ b/tests/ctst/features/CountItems/CountItems.feature @@ -5,6 +5,7 @@ Feature: CountItems measures the utilization metrics @PreMerge @CronJob @CountItems +@Utilization Scenario Outline: Countitems runs without error and compute utilization metrics Given an existing bucket "" "without" versioning, "without" ObjectLock "without" retention mode And an object "" that "exists"