Skip to content

Commit

Permalink
[k8s] Handle apt update log not existing (#4381)
Browse files Browse the repository at this point in the history
do not panic if file does not exist, it may be written soon
  • Loading branch information
romilbhardwaj authored Nov 18, 2024
1 parent a441aab commit 6c02197
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sky/provision/kubernetes/instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 '
Expand Down

0 comments on commit 6c02197

Please sign in to comment.