Skip to content
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

Use node ip autodiscovery [forked] #1518

Closed
wants to merge 3 commits into from

Conversation

BenTheElder
Copy link
Member

#1513 but with the base image cleaned up.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 27, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: BenTheElder

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Apr 27, 2020
&& sed -i /usr/lib/systemd/system/systemd-tmpfiles-clean.timer -e 's#OnBootSec=.*#OnBootSec=1min#'
&& sed -i /usr/lib/systemd/system/systemd-tmpfiles-clean.timer -e 's#OnBootSec=.*#OnBootSec=1min#' \
&& echo "Modifying /etc/nsswitch.conf to prefer hosts" \
&& sed -i /etc/nsswitch.conf -re 's#^(hosts:\s*).*#\1dns files#'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

preserve the indent and do this at build time instead of runtime

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems better indeed

@BenTheElder
Copy link
Member Author

/retest

@aojea
Copy link
Contributor

aojea commented Apr 27, 2020

Could you check if reboot works?

@BenTheElder
Copy link
Member Author

BenTheElder commented Apr 27, 2020

I didn't yet, and I'm currently booted to windows on my desktop 😱 /s (no IPv6 clusters on mac / windows...)

@aojea
Copy link
Contributor

aojea commented Apr 27, 2020

no problem, I'm going to do it now

@aojea
Copy link
Contributor

aojea commented Apr 27, 2020

Before restart

ubectl get nodes -o wide
NAME                 STATUS   ROLES    AGE     VERSION                                    INTERNAL-IP   EXTERNAL-IP   OS-IMAG
E       KERNEL-VERSION                CONTAINER-RUNTIME
kind-control-plane   Ready    master   3m54s   v1.19.0-alpha.2.172+ce65f0e7ddeb60-dirty   172.19.0.2    <none>        Ubuntu 
19.10   4.12.14-lp151.28.13-default   containerd://1.3.3-14-g449e9269
kind-worker          Ready    <none>   3m19s   v1.19.0-alpha.2.172+ce65f0e7ddeb60-dirty   172.19.0.3    <none>        Ubuntu 
19.10   4.12.14-lp151.28.13-default   containerd://1.3.3-14-g449e9269
kind-worker2         Ready    <none>   3m19s   v1.19.0-alpha.2.172+ce65f0e7ddeb60-dirty   172.19.0.4    <none>        Ubuntu 
19.10   4.12.14-lp151.28.13-default   containerd://1.3.3-14-g449e9269

After only control-plane goes up, the workers fail with the following error

sed: can't read /etc/kubernetes/manifests/*.yaml: No such file or directory

@BenTheElder
Copy link
Member Author

BenTheElder commented Apr 27, 2020 via email

@aojea
Copy link
Contributor

aojea commented Apr 27, 2020

I can fix that in the morning I think.

don't worry, I'll send a patch

@aojea
Copy link
Contributor

aojea commented Apr 27, 2020

/hold

This has a side effect, now we have two ip addresses

root@kind-control-plane:/# hostname --ip-address
fc00:db8:2::3 172.19.0.3

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 27, 2020
@aojea
Copy link
Contributor

aojea commented Apr 27, 2020

and it always return ipv6 first, I just checked in an IPv4 node

docker exec -it tewst-control-plane hostname --ip-address
fc00:db8:2::5 172.19.0.5

@aojea
Copy link
Contributor

aojea commented Apr 27, 2020

it does work with ipv6 🥳

@BenTheElder
Copy link
Member Author

Can we pass kubelet 0.0.0.0 for ipv4 discovery?

@aojea
Copy link
Contributor

aojea commented Apr 27, 2020

Can we pass kubelet 0.0.0.0 for ipv4 discovery?

the option was implemented only for ::

I think is better to pass the empty value, Ibecause the option has omitempty

@BenTheElder
Copy link
Member Author

superseded #1521

@BenTheElder BenTheElder deleted the pr1513 branch April 28, 2020 04:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants