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

Inital kubernetes support #57

Merged
merged 3 commits into from
Mar 11, 2022
Merged

Inital kubernetes support #57

merged 3 commits into from
Mar 11, 2022

Conversation

Mic92
Copy link
Owner

@Mic92 Mic92 commented Jun 5, 2021

No description provided.

@lheckemann
Copy link

Trying to attach to a systemd service:

[root@tmp:~]# uname -a
Linux tmp 5.10.93 #1-NixOS SMP Thu Jan 20 08:17:52 UTC 2022 x86_64 GNU/Linux

[root@tmp:~]# nix build github:mic92/cntr/k3s
trace: Warning: `stdenv.lib` is deprecated and will be removed in the next release. Please use `lib` instead. For more information see https://github.com/NixOS/nixpkgs/issues/108938

[root@tmp:~]# result/bin/cntr attach $(pgrep nginx)
failed to apply capabilities, failed to read capability limit, failed to open /proc/sys/kernel/cap_last_cap, No such file or directory (os error 2)
<hangs here until interrupted>

I tried these with various kernels available in nixpkgs and the problem seems to be introduced between 5.4 and 5.10.

@Mic92
Copy link
Owner Author

Mic92 commented Jan 29, 2022

I can use the same fallback that systemd uses in case /proc/sys/kernel/cap_last_cap is not available.

@Mic92 Mic92 force-pushed the k3s branch 2 times, most recently from ad3cf88 to 00e1136 Compare March 11, 2022 11:49
fix varaible shadowing
@Mic92
Copy link
Owner Author

Mic92 commented Mar 11, 2022

Systemd/last_cap issue still needs to be fixed separately.

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.

2 participants