From 76bc70ad56dabd0beb9af870de32b056728fa935 Mon Sep 17 00:00:00 2001 From: clore Date: Fri, 3 Jan 2025 17:39:47 +0000 Subject: [PATCH] xfs migration - skip on nvidia failure --- lib/xfs.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/xfs.py b/lib/xfs.py index 58d9978..5fcc844 100644 --- a/lib/xfs.py +++ b/lib/xfs.py @@ -59,7 +59,7 @@ def get_to_use_storage_values(max_free_space): else: return GENERIC_LEAVE_FREE_SPACE_MB, GENERIC_MIN_XFS_PARTITION_SIZE else: - return None, None + return "no-gpus", "no-gpus" except Exception as e: return None, None @@ -105,6 +105,9 @@ def migrate(): max_free_space = utils.get_free_space_mb('/') + utils.get_directory_size_mb(DOCKER_ROOT) leave_free_space, min_xfs_size = get_to_use_storage_values(max_free_space) + if leave_free_space == "no-gpus": + return "nvidia-failure" + if leave_free_space == None: migrate_log("can't get free space") return "failure" @@ -247,6 +250,8 @@ def init(): with open(XFS_STATE_FILE, 'w') as file: file.write("not-supported-boot-device") return 'failed' + elif migarion_status == "nvidia-failure": + return 'failed' else: with open(XFS_STATE_FILE, 'w') as file: file.write("failed-migration")