-
Notifications
You must be signed in to change notification settings - Fork 505
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
kubelet.service: Wait for network-online.target #1250
kubelet.service: Wait for network-online.target #1250
Conversation
Whenever kubeadm detects a system that has systemd-resolved running, it would provision the kubelet on the local node with a resolv.conf overwrite /run/systemd/resolve/resolv.conf. However, some kubeadm users have discovered an issue during system boot. The kubelet can end up in a race with the systemd-resolved service and actually startup loads with empty or incorrect resolve.conf files. The race is caused by the fact that the kubelet.service file does not indicate dependence on the network-online.target. To fix this we add network-online.target as a dependency and wait for its initialization to complete before starting the kubelet. Signed-off-by: Stephen Augustus <[email protected]> Co-authored-by: Rostislav M. Georgiev <[email protected]>
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.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hasheddan, justaugustus The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
1 similar comment
/retest |
/test pull-release-cluster-up |
I don't think that the failures are related to that change 🤔 |
i do not know the purpose of the |
/retest |
3 similar comments
/retest |
/retest |
/retest |
/retest |
@justaugustus this doesn’t look familiar off the top of my head, but I will do some digging |
/retest |
/test pull-release-cluster-up |
What type of PR is this?
/kind bug
What this PR does / why we need it:
(Cherry pick of #1249.)
Whenever kubeadm detects a system that has systemd-resolved running, it would
provision the kubelet on the local node with a resolv.conf overwrite -
/run/systemd/resolve/resolv.conf
.However, some kubeadm users have discovered an issue during system boot.
The kubelet can end up in a race with the systemd-resolved service and actually
startup loads with empty or incorrect resolve.conf files.
The race is caused by the fact that the kubelet.service file does not indicate
dependence on the network-online.target.
To fix this we add network-online.target as a dependency and wait for its
initialization to complete before starting the kubelet.
Which issue(s) this PR fixes:
Closes #1248
ref: kubernetes/kubeadm#2111
Special notes for your reviewer:
/cc @neolit123
/cc @kubernetes/release-engineering @kubernetes/build-admins
/cc @kubernetes/sig-node-bugs
/assign @tpepper @saschagrunert @hasheddan
/priority important-longterm
Does this PR introduce a user-facing change?