Skip to content

Inital kubernetes support#57

Merged
Mic92 merged 3 commits intomasterfrom
k3s
Mar 11, 2022
Merged

Inital kubernetes support#57
Mic92 merged 3 commits intomasterfrom
k3s

Conversation

@Mic92
Copy link
Copy Markdown
Owner

@Mic92 Mic92 commented Jun 5, 2021

No description provided.

@lheckemann
Copy link
Copy Markdown

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
Copy Markdown
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 Mic92 merged commit 6cd9d93 into master Mar 11, 2022
@Mic92 Mic92 deleted the k3s branch March 11, 2022 12:09
@Mic92
Copy link
Copy Markdown
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