From 278e3ad16d7ef8d69351735501b8d00654349c01 Mon Sep 17 00:00:00 2001 From: Utkarsh Srivastava Date: Mon, 26 Feb 2024 15:45:39 +0530 Subject: [PATCH] disallow incorrect storage classes Signed-off-by: Utkarsh Srivastava --- src/sdk/namespace_fs.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/sdk/namespace_fs.js b/src/sdk/namespace_fs.js index 0a686394bf..4945a5e2c0 100644 --- a/src/sdk/namespace_fs.js +++ b/src/sdk/namespace_fs.js @@ -3026,9 +3026,13 @@ class NamespaceFS { async _is_storage_class_supported(storage_class) { if (!storage_class || storage_class === s3_utils.STORAGE_CLASS_STANDARD) return true; - // TODO: Upon integration with underlying systems, we should - // check if archiving is actually supported or not - return config.NSFS_GLACIER_ENABLED || false; + if (storage_class === s3_utils.STORAGE_CLASS_GLACIER) { + // TODO: Upon integration with underlying systems, we should + // check if archiving is actually supported or not + return config.NSFS_GLACIER_ENABLED || false; + } + + return false; } async append_to_migrate_wal(entry) {