-
Notifications
You must be signed in to change notification settings - Fork 560
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
cni-plugins binaries does not correctly report versions and other differences from upstream release and other distros #6339
Comments
Thank you @invidian for the observation and proposed fix as well. With respect to static vs dynamic linking & version upgrade I believe @jslobodzian / @christopherco / @hbeberman might be the right people. |
We generally favor dynamic linking so when we publish security updates for a given system library, the application does not need to be rebuilt or published, but the vulnerability is patched. There can be exceptions, but this is our general policy around static vs dynamic linking. |
All right, that make sense. Although it looks like upstream disables CGO as part of the release, so the binaries does not use glibc etc, so they would only be affected by Go vulnerabilities. It would seem reasonable for me to follow that. What do you think? |
Some interesting datapoints - on both Fedora and Ubuntu, looks like their official # ldd /usr/libexec/cni/dhcp
linux-vdso.so.1 (0x00007ffdd49ea000)
libresolv.so.2 => /lib64/libresolv.so.2 (0x00007f746920b000)
libc.so.6 => /lib64/libc.so.6 (0x00007f746902d000)
/lib64/ld-linux-x86-64.so.2 (0x00007f7469a4a000)
# cat /etc/os-release
NAME="Fedora Linux"
VERSION="38 (Container Image)"
ID=fedora
VERSION_ID=38
VERSION_CODENAME=""
PLATFORM_ID="platform:f38"
PRETTY_NAME="Fedora Linux 38 (Container Image)"
ANSI_COLOR="0;38;2;60;110;180"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:38"
DEFAULT_HOSTNAME="fedora"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f38/system-administrators-guide/"
SUPPORT_URL="https://ask.fedoraproject.org/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=38
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=38
SUPPORT_END=2024-05-14
VARIANT="Container Image"
VARIANT_ID=container # ldd /usr/lib/cni/dhcp
linux-vdso.so.1 (0x00007fff39ede000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007fe37627c000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fe37608a000)
/lib64/ld-linux-x86-64.so.2 (0x00007fe3762a3000)
# cat /etc/os-release
NAME="Ubuntu"
VERSION="20.04.4 LTS (Focal Fossa)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 20.04.4 LTS"
VERSION_ID="20.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=focal
UBUNTU_CODENAME=focal I wonder if I'm looking at the wrong set of packages for these distros or just missing something... That being said, in general it does seem reasonable to align our packaging closer to how upstream expects the binaries to be released. Adding @romoh who has more knowledge of our CNI plugins and may have opinions on this. |
Hm, I was looking at Thanks for checking on other platforms, I thought it's more unified. |
Refs microsoft#6339 Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>
I opened #6396 with version bump and version setting. |
Refs microsoft#6339 Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>
Refs microsoft#6339 Also move declarations around to satisfy linter. Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>
Refs microsoft#6339 Also move declarations around to satisfy linter. Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>
Refs microsoft#6339 Also move declarations around to satisfy linter. Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>
Refs microsoft#6339 Also move declarations around to satisfy linter. Signed-off-by: Mateusz Gozdek <mgozdek@microsoft.com>
It seems installed binaries from
cni-plugins
binary does not correctly print versionExample output of those binaries on Ubuntu 18.04:
I saw this issue upstream: containernetworking/plugins#758 and indeed it seems Mariner package is built using
build_linux.sh
, so it's probably affected.Looking at https://github.com/containernetworking/plugins/blob/main/scripts/release.sh, I think
can be changed to
To restore printed version.
Other difference I see is, that CNI release binaries are statically complied (with
-static
flag), while Mariner binaries links to glibc:Perhaps this is also something which could be improved?
Package itself could also be updated, v0.9.1. has been released in Feb 5, 2021, a while ago. Ubuntu at the moment ships v1.2.0.
I'm sorry for bundling few issues into one, I can report it separately if needed.
Let me know what you think and I can address all concerns in a single PR.
The text was updated successfully, but these errors were encountered: