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

Add service to kill k3s before umount #638

Merged
merged 1 commit into from
Feb 6, 2023
Merged

Add service to kill k3s before umount #638

merged 1 commit into from
Feb 6, 2023

Conversation

frelon
Copy link
Contributor

@frelon frelon commented Jan 26, 2023

Seems to be hitting this issue: k3s-io/k3s#2400

The workaround suggested is to add a service that runs k3s-killall before umount.

Fixes #587

Signed-off-by: Fredrik Lönnegren fredrik.lonnegren@suse.com

Copy link
Contributor

@davidcassany davidcassany left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, but note this is not enough. The spec file should be adapted so the elemental package also includes the new unit file.

OBS: elemental - 15.4 test should pass and the resulting RPM should include the new unit file. Take a look into elemental-toolkit specfile if want to see how to include unit files according to common SUSE practices

@frelon
Copy link
Contributor Author

frelon commented Jan 26, 2023

Looks good, but note this is not enough. The spec file should be adapted so the elemental package also includes the new unit file.

OBS: elemental - 15.4 test should pass and the resulting RPM should include the new unit file. Take a look into elemental-toolkit specfile if want to see how to include unit files according to common SUSE practices

Nice catch! I always forget the OBS workflow 😅

@frelon frelon force-pushed the umount-fix branch 2 times, most recently from 6e775f7 to 574ba5e Compare January 27, 2023 09:18
@frelon frelon enabled auto-merge (rebase) January 27, 2023 10:23
@frelon
Copy link
Contributor Author

frelon commented Jan 27, 2023

@davidcassany hopefully looks better now 👍

Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>
Copy link
Contributor

@davidcassany davidcassany left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, just a small detail, to be consistent with other packaged unit files.

I would add the following in %pre, we can do it in a follow up PR:

%service_add_pre shutdown-k3s.service

And analog lines for %post, %preun and %postun sections. See how it is done for the elemental-populated-node-labels.service. I doubt this makes any difference in our case as we do not expect install this RPM in a running system, but still, to follow best practices.

@frelon frelon merged commit 148d0d7 into main Feb 6, 2023
@frelon frelon deleted the umount-fix branch February 6, 2023 17:54
@frelon
Copy link
Contributor Author

frelon commented Feb 7, 2023

Good call, I opened #652 for this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong shutdown order (on aarch64?)
2 participants