Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: change poweroff to take effect 5 seconds after requested #3126

Open
mauromorales opened this issue Jan 14, 2025 · 0 comments
Open

feat: change poweroff to take effect 5 seconds after requested #3126

mauromorales opened this issue Jan 14, 2025 · 0 comments
Labels
enhancement New feature or request triage Add this label to issues that should be triaged and prioretized in the next planning call

Comments

@mauromorales
Copy link
Member

The current functionality of poweroff waits 5 seconds from the kairos side and then 1 min from the shutdown command to go into effect. The idea is to give enough room to the interactive user to cancel the request, but having to wait 1min and 5sec for the non interactive user is a bit too long.

Let's change this to give a message leeting the user know they have 5 seconds to cancel

https://github.com/kairos-io/kairos-agent/blob/347a30b261d055b4876dd298816a9d503cdbb926/internal/agent/hooks/lifecycle.go#L20-L21

And then change shutdown to do shutdown now

https://github.com/kairos-io/kairos-sdk/blob/a2d305dd6d7fcda8378151c02b9335944cc5e953/utils/utils.go#L261

@mauromorales mauromorales added enhancement New feature or request triage Add this label to issues that should be triaged and prioretized in the next planning call labels Jan 14, 2025
mauromorales added a commit to kairos-io/kairos-sdk that referenced this issue Jan 14, 2025
mauromorales added a commit to wrkode/kairos-sdk that referenced this issue Jan 14, 2025
mauromorales added a commit to kairos-io/kairos-sdk that referenced this issue Jan 14, 2025
* adding utils components to handle k0s

Signed-off-by: William Rizzo <[email protected]>

* Adding systemd units for k0s

Signed-off-by: William Rizzo <[email protected]>

* fix k0s services

Signed-off-by: William Rizzo <[email protected]>

* Remove shutdown now, it will be addressed later

see kairos-io/kairos#3126

Signed-off-by: Mauro Morales <[email protected]>

* Revert FindCommand changes

This function is not specific for k3s hence also not for k0s

Signed-off-by: Mauro Morales <[email protected]>

* Remove utils.Version()

For versioning we now use the versioneer package also in this repo. I
couldn't find any instance of components depending on utils.Version() so
I think it's safe to remove

Signed-off-by: Mauro Morales <[email protected]>

* Revert changes to the go.mod & go.sum files

Signed-off-by: Mauro Morales <[email protected]>

* Revert "Remove utils.Version()"

This reverts commit c5f48d9.

* Remove utils.Version()

This is not being used anymore, use Versioneer package instead

Signed-off-by: Mauro Morales <[email protected]>

* Update machine/machine.go

Co-authored-by: Dimitris Karakasilis <[email protected]>

---------

Signed-off-by: William Rizzo <[email protected]>
Signed-off-by: Mauro Morales <[email protected]>
Co-authored-by: Mauro Morales <[email protected]>
Co-authored-by: Dimitris Karakasilis <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request triage Add this label to issues that should be triaged and prioretized in the next planning call
Projects
Status: No status
Development

No branches or pull requests

1 participant