xfs migration - skip on nvidia failure
This commit is contained in:
parent
777365adf8
commit
76bc70ad56
|
@ -59,7 +59,7 @@ def get_to_use_storage_values(max_free_space):
|
||||||
else:
|
else:
|
||||||
return GENERIC_LEAVE_FREE_SPACE_MB, GENERIC_MIN_XFS_PARTITION_SIZE
|
return GENERIC_LEAVE_FREE_SPACE_MB, GENERIC_MIN_XFS_PARTITION_SIZE
|
||||||
else:
|
else:
|
||||||
return None, None
|
return "no-gpus", "no-gpus"
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
return None, None
|
return None, None
|
||||||
|
|
||||||
|
@ -105,6 +105,9 @@ def migrate():
|
||||||
max_free_space = utils.get_free_space_mb('/') + utils.get_directory_size_mb(DOCKER_ROOT)
|
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)
|
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:
|
if leave_free_space == None:
|
||||||
migrate_log("can't get free space")
|
migrate_log("can't get free space")
|
||||||
return "failure"
|
return "failure"
|
||||||
|
@ -247,6 +250,8 @@ def init():
|
||||||
with open(XFS_STATE_FILE, 'w') as file:
|
with open(XFS_STATE_FILE, 'w') as file:
|
||||||
file.write("not-supported-boot-device")
|
file.write("not-supported-boot-device")
|
||||||
return 'failed'
|
return 'failed'
|
||||||
|
elif migarion_status == "nvidia-failure":
|
||||||
|
return 'failed'
|
||||||
else:
|
else:
|
||||||
with open(XFS_STATE_FILE, 'w') as file:
|
with open(XFS_STATE_FILE, 'w') as file:
|
||||||
file.write("failed-migration")
|
file.write("failed-migration")
|
||||||
|
|
Loading…
Reference in New Issue