GetAttributes is called repeatedly while setting the fsGroup of a
volume. Previously, it recalculated whether SELinux was supported during
each call. This resulted in volume.SetVolumeOwnership taking a long
time, delaying pod startup for high file count volumes.
This change checks the SELinux status once, right after node publish,
allowing GetAttributes to simply build and return a struct.
Signed-off-by: John Strunk <jstrunk@redhat.com>
The `TooLong` validation message mentioned characters, but the `len`
function actually measures bytes, no characters. This switches it over
to use bytes.
Characters are mostly an illusory concept anyway -- a vain attempt to
shield our minds against the lovecraftian nightmares that comes from
attemping to truly comprehend that eldritch treatise known as the
Unicode standard. Which is to say: measuring things in characters is
hard and mostly ambiguous, and probably not what we meant to do.
This field is not used in the kubeadm code. It was brought from
cli-runtime where it's used to support complex relationship between
command line parameters, which is not present in kubeadm.
Change 04300826fd has introduced
"e2e/common" package dependency on volumemode testusuite. This results in
pulling all tests defined in common package while running storage e2e tests,
which are not necessary.
The only interested part from common package is the WaitTimeoutForEvent().
This patch fixes an issue in the TopologyManager that wouldn't allow
pods to be admitted if pods were launched with the SingleNUMANode policy
and any of the hint providers had no NUMA preferences.
This is due to 2 factors:
1) Any hint provider that passes back a `nil` as its hints, has its hint
automatically transformed into a single {11 true} hint before merging
2) We added a special casing for the SingleNumaNodePolicy() in the
TopologyManager that essentially turns these hints into a
{11 false} anytime a {11 true} is seen.
The current patch reworks this logic so the that TopologyManager can
tell the difference between a "don't care" hint and a true "{11 true}"
hint returned by the hint provider. Only true "{11 true}" hints will be
converted by the special casing for the SingleNumaNodePolicy(), while
"don't care" hints will not.
This is a short term fix for this issue until we do a larger refactoring
of this code for the 1.17 release.
Fix the `staticcheck` failures for `test/e2e/node`. All of the
staticcheck errors were for variables which were never used. When these
values were `err`, we added processing for the errors. When they were
values that were just never used, we stopped giving them a name.