-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Description
In #17936 I implemented making the auto-pause interval configurable, from the PR:
There's an issue with running
minikube addons configure auto-pause, the value is successfully saved, but the value is not immediately updated in the auto-pause addon itself. The systemd unit file is updated, but then asystemctl daemon-reload&systemctl restart auto-pause.serviceboth have to be run for the update to be reflected in the binary. Due to the already large size of this PR I'll leave it for a follow up.
As stated, when the user executes minikube addons configure auto-pause the change doesn't immediately take effect and systemctl daemon-reload & systemctl restart auto-pause.service need to be run. Calling sysinit.New(co.CP.Runner).Restart("auto-pause") would fix it, but the messy part is getting co which you would normally get via co := mustload.Running(profile). If we do implement it that way then minikube addons configure auto-pause with return an error when trying to execute the command when the cluster is stopped. But it gets confusing as the new interval value would actually be updated in the config, it's just the mustload.Running(profile) that failing.
We should only call mustload.Running(profile) after we confirm that the cluster is running, otherwise just update the value in the config.