Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(Addons) Create a new command in every retry
Whenever a `kubectl apply` fails while enabling an addon, it is retried with exponential backoff. The command (type `*exec.Cmd`) that this retry function runs in created outside the function - which means that it is reused on every retry. This is a problem because `exec.Cmd` (https://godoc.org/github.com/pkg/exec#Cmd) states that "... Cmd cannot be reused after calling its Run or Start methods." This retry is a common case due to, say, a CRD and its resource being present in the same YAML file of the addon which causes a race condition where the resource is created before its CRD is created in the cluster - this race is fixed by subsequent retries. I've noticed this in the dashboard and the ambassador addon. Due to the above mentioned bug, minikube throws errors like `exec: already started` in every retry and the retry is never successful, manifests are never deployed and addon creation errors out. Fix kubernetes#8138 Fix kubernetes#8119 Fix a few CI errors in kubernetes#8372
- Loading branch information