Skip to content

Fix auto-pause interval value not immediately being taking affect #17945

@spowelljr

Description

@spowelljr

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 a systemctl daemon-reload & systemctl restart auto-pause.service both 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.

Metadata

Metadata

Labels

area/addonsco/auto-pauselifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.priority/backlogHigher priority than priority/awaiting-more-evidence.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions