testing.T.Cleanup ensures the environment is restored after a test and
any of its parallel sub-tests. It's possible that these can be
simplified further to T.Setenv(key, ""), but I did not investigate.
T.Setenv ensures that the environment is returned to its prior state
when the test ends. It also panics when called from a parallel test to
prevent racy test interdependencies.
T.Setenv ensures that the environment is returned to its prior state
when the test ends. It also panics when called from a parallel test to
prevent racy test interdependencies.
testing.T.Cleanup ensures the environment is restored after a test and
any of its parallel sub-tests. It's possible that some of these can be
simplified further to T.Setenv(key, ""), but I did not investigate.
T.Setenv ensures that the environment is returned to its prior state
when the test ends. It also panics when called from a parallel test to
prevent racy test interdependencies.
T.Setenv ensures that the environment is returned to its prior state
when the test ends. It also panics when called from a parallel test to
prevent racy test interdependencies.
This allows us to return with a timeout error as soon as the
context is canceled. Previously in cases where the mount will
never succeed pods can get stuck deleting for 2 minutes.
In the Sync*Pod methods that call VolumeManager.WaitFor*, we
must filter out wait.Interrupted errors from being logged as
they are part of control flow, not runtime problems. Any
early interruption should result in exiting the Sync*Pod method
as quickly as possible without logging intermediate errors.
I contribute to SIG Node related topics since many releases, underlined
by recent enhancement graduations around SeccompDefault,
DownwardAPIHugePages, Kubelet Tracing and general long-term support for
features like seccomp or the CRI. This means that I think it's time to
get actively pulled into reviews, which is why I propose to become a
kubelet reviewer now.
Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
Copied and modified RemoveString function from
k/k/pkg/util/slice/slice.go to e2e/framework/pod/pod_client.go
This is the last dependency from e2e framework to k/k/pkg/util
Copied and modified pod format function from
k/k/pkg/kubelet/util/format/pod.go to e2e/framework/pod/pod_client.go
This is the last dependency from e2e framework to k/k/pkg/kubelet
At KCM startup, vSphere cloud provider builds a cache from NodeAdded events
from an informer. But these events are asynchronous, the cloud provider may
need information from the cache earlier, for example when detaching a
volume from a node at KCM startup. If a node is missing in the cache,
the cloud provider treats such a detach as successful, which is wrong.
Such a volume will be attached to the node forever.
To prevent this issue:
1. Try nodeLister before declaring a node as not found.
A/D controller starts after its node informer has been synced.
2. Read API server before declaring a node as not found.
Just in case the informer has stale data.