-
Notifications
You must be signed in to change notification settings - Fork 220
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
Enhance subid check by using shadow library function #1180
Conversation
eb2c53b
to
2a129d7
Compare
Build failed. ❌ unit-test FAILURE in 8m 15s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this @mhjacks !
2a129d7
to
d9c331a
Compare
OK, in the podman code I missed that there are explicit type defintions that come from a separate, vendored package. I replicated those here, and meson now compiles it (with the other fixes you suggested). I'll work on testing this on fedora for the following cases:
|
d9c331a
to
0d8baac
Compare
Build failed. ❌ unit-test RETRY_LIMIT in 8m 11s |
There's something wrong with the network today:
|
I wonder what this
|
golangci/golangci-lint#3289 <- on the golanci-lint issue. It seems like zuul is still having problems downloading the modules for the other check. I have downloaded golangci-lint locally and run it, and it does not complain. Github actions tend to use ubuntu, but I would think we would hardly be the first to notice this if that were the problem. |
Build failed. ❌ unit-test RETRY_LIMIT in 8m 28s |
87aef77
to
e838d16
Compare
I built the new binary from this branch and copied it to /usr/bin/toolbox on a test host. New output with --verbose on fedora 37 (Freeipa Backed):
New output when backed by /etc files:
Need to add some code to throw the error if no ranges are found. :) Standby |
e838d16
to
42308b0
Compare
Apparently if no ranges are found, nRanges can be 0. I expanded the error check to error on nRanges <= 0. This catches no subuid/gid defined, as well as one or the other missing (I tested all those cases). Here's the verbose error report now:
|
This will fix #1074 and fedora-silverblue/issue-tracker#263 |
Build failed. ❌ unit-test FAILURE in 7m 49s |
The zuul failures seem to be due to not requiring |
The dependencies are listed in |
Brilliant. This is exciting. :) |
5307d0a
to
1b75d35
Compare
Build succeeded. ✔️ unit-test SUCCESS in 8m 49s |
1b75d35
to
9a77dac
Compare
Build succeeded. ✔️ unit-test SUCCESS in 8m 31s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for getting this to work @mhjacks !
I wonder how difficult it would be to hack up a test for this? The simplest I can think of is:
... and then ensure that all the tests pass. This won't be a good idea when running the tests locally, but it might be OK to do on the CI? |
Build failed. ✔️ unit-test SUCCESS in 11m 21s |
Hey, hey! There were two outstanding issues. One is the business with the leaking file descriptor which was causing confusion in the test suite. See above. I believe I have managed to resolve it now. The other problem is that some versions of the Go compiler (1.16.15 in Fedora 35, and 1.19.4 in CentOS Stream) don't seem to like the C preprocessor's stringize operator (ie., |
c353daa
to
ce09cee
Compare
Build failed. ✔️ unit-test SUCCESS in 11m 22s |
ce09cee
to
497c804
Compare
Build failed. ✔️ unit-test SUCCESS in 8m 28s |
497c804
to
48b01aa
Compare
Build failed. ✔️ unit-test SUCCESS in 8m 50s |
Build failed. ✔️ unit-test SUCCESS in 8m 57s |
c53540d
to
7729d29
Compare
I am such an idiot! I was staring at these two identical failures on CentOS Stream 9 and Fedora 35, thinking that either CGO can't handle the C preprocessor's stringize operator, or that there's something wrong in GCC 11.3.1, which they both have.
I failed to notice that they also have Shadow 4.9, which doesn't have |
Build failed. ✔️ unit-test SUCCESS in 8m 43s |
recheck |
Build succeeded. ✔️ unit-test SUCCESS in 8m 38s |
Nice! |
7729d29
to
ca8007c
Compare
I am not sure what happened, because I suddenly got a Anyway, I ended up merging the code through #1219 |
Thanks a lot for all your work and patience, @mhjacks ! |
Build succeeded. ✔️ unit-test SUCCESS in 9m 10s |
Absolutely my pleasure! I'm excited this is merged now. Do you a new release of toolbox would be appropriate now? |
Yes, it's been a while since our last release. Hopefully in a week. fingers crossed :) I have to get #1065 done by tomorrow, but otherwise I think |
For the sake of posterity ...
This pull request broke the golangci-lint test because the GitHub Action runs on Ubuntu 22.04 which only has Shadow 4.8, whereas However, that's not a big deal because we earlier added |
The previous commit broke the golangci-lint test [1] because the GitHub Action runs on Ubuntu 22.04, which only has Shadow 4.8 [2], whereas libsubid.so was introduced in Shadow 4.9 [3]. However, that's not a big deal because 'go vet' was earlier added to the set of tests run by 'meson test' [4], and 'go vet' is one of the linters run by golangci-lint [5]. So, while it's not a proper replacement, it's good enough. [1] Commit ca8007c containers#1180 [2] https://packages.ubuntu.com/source/jammy/shadow https://packages.ubuntu.com/source/jammy-updates/shadow [3] Shadow commit 0a7888b1fad613a0 shadow-maint/shadow@0a7888b1fad613a0 shadow-maint/shadow#154 [4] Commit f695012 containers#1186 [5] https://golangci-lint.run/usage/linters/ https://golangci-lint.run/usage/linters/#govet This reverts commit 7c86f30.
The previous commit broke the golangci-lint test [1] because the GitHub Action runs on Ubuntu 22.04, which only has Shadow 4.8 [2], whereas libsubid.so was introduced in Shadow 4.9 [3]. However, that's not a big deal because 'go vet' was earlier added to the set of tests run by 'meson test' [4], and 'go vet' is one of the linters run by golangci-lint [5]. So, while it's not a proper replacement, it's good enough. [1] Commit ca8007c containers#1180 [2] https://packages.ubuntu.com/source/jammy/shadow https://packages.ubuntu.com/source/jammy-updates/shadow [3] Shadow commit 0a7888b1fad613a0 shadow-maint/shadow@0a7888b1fad613a0 shadow-maint/shadow#154 [4] Commit f695012 containers#1186 [5] https://golangci-lint.run/usage/linters/ https://golangci-lint.run/usage/linters/#govet This reverts commit 7c86f30. containers#1221
This encompasses the old mechanism of looking in files as well as a newer option, using subids supplied through SSS.
This is still WIP (I have not built or tested this yet).