[K8s] Fix rsync Not Found
#7844
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We saw an error last week #7761 where using rsync to set up the files required by a cluster In Kubernetes would fail with
OCI runtime exec failed: exec failed: unable to start container process: exec: "rsync": executable file not found in $PATH: unknownshowing that rsync was not available on the kubernetes pod. After some digging I found that we install necessary packages (such as rsync) in the background while setting up the cluster. What this means is that if our installation hangs for whatever reason our cluster will be marked as ready before the packages are ready. This leads to the error above where attempt to rsync to move files into the pod but the rsync installation has yet to complete.Now we will try to exec into the pod and check if rsync exists if not we will delay the rsync 60 seconds to see if the package installation will catch up. This should help cases where the package installation is slightly slow.
I tested this by
Tested (run the relevant ones):
bash format.sh/smoke-test(CI) orpytest tests/test_smoke.py(local)/smoke-test -k test_name(CI) orpytest tests/test_smoke.py::test_name(local)/quicktest-core(CI) orpytest tests/smoke_tests/test_backward_compat.py(local)