From 6c021970e8b7e7970c31ada02d3a6d90f76b86c6 Mon Sep 17 00:00:00 2001 From: Romil Bhardwaj Date: Mon, 18 Nov 2024 15:14:42 -0800 Subject: [PATCH] [k8s] Handle apt update log not existing (#4381) do not panic if file does not exist, it may be written soon --- sky/provision/kubernetes/instance.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sky/provision/kubernetes/instance.py b/sky/provision/kubernetes/instance.py index 2dcf38f2365..f5e93204934 100644 --- a/sky/provision/kubernetes/instance.py +++ b/sky/provision/kubernetes/instance.py @@ -430,7 +430,7 @@ def pre_init(namespace: str, context: Optional[str], new_nodes: List) -> None: 'start_time=$(date +%s); ' 'while ! grep -q "Fetched" /tmp/apt-update.log 2>/dev/null; do ' ' echo "apt update still running. Logs:"; ' - ' cat /tmp/apt-update.log; ' + ' cat /tmp/apt-update.log || true; ' ' current_time=$(date +%s); ' ' elapsed=$((current_time - start_time)); ' ' if [ $elapsed -ge $timeout_secs ]; then '