mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-04 23:17:50 +00:00
Merge pull request #62951 from dims/support-nsenter-better-in-non-systemd-envs
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Support nsenter in non-systemd environments **What this PR does / why we need it**: In our CI, we run kubekins image for most of the jobs. This is a debian image with upstart and does not enable systemd. So we should * Bailout if any binary is missing other than systemd-run. * SupportsSystemd should check the binary path to correctly identify if the systemd-run is present or not * Pass the errors back to the callers so kubelet is forced to fail early when there is a problem. We currently assume that all binaries are in the root directory by default which is wrong. **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes # **Special notes for your reviewer**: **Release note**: ```release-note NONE ```
This commit is contained in:
@@ -335,7 +335,10 @@ func UnsecuredDependencies(s *options.KubeletServer) (*kubelet.Dependencies, err
|
||||
var writer kubeio.Writer = &kubeio.StdWriter{}
|
||||
if s.Containerized {
|
||||
glog.V(2).Info("Running kubelet in containerized mode")
|
||||
mounter = mount.NewNsenterMounter()
|
||||
mounter, err = mount.NewNsenterMounter()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
writer = &kubeio.NsenterWriter{}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user