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
Ensure eth1 comes up #1039
Ensure eth1 comes up #1039
Conversation
Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please follow instructions at https://github.com/kubernetes/kubernetes/wiki/CLA-FAQ to sign the CLA. Once you've signed, please reply here (e.g. "I signed it!") and we'll verify. Thanks.
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
I signed it! |
@mattymo maybe we can add a CI test for vagrant up? Seems a regular usage |
@retr0h will it work with other os? |
These roles assume a working eth1. Vagrant is notorious brining up interfaces on RHEL/CentOS instances. The shell provisioner will execute before the dependant ansible provisioner.
The Vagrant issue only shows up on CentOS/RHEL based OSes. Lets only target those when ifup'ing.
ip link set eth1 up works on CentOS/Ubuntu. However, I am not sure it's good idea to bring it up. The image should be done in the way where all interfaces are up. |
@@ -106,6 +106,7 @@ Vagrant.configure("2") do |config| | |||
# Only execute once the Ansible provisioner, | |||
# when all the machines are up and ready. | |||
if i == $num_instances | |||
config.vm.provision :shell, inline: '[[ -x "$(command -v yum)" ]] && ifup eth1', privileged: true |
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.
ip link set eth1 up works fine on CentOS \ Ubuntu. I am not sure about coreos. However, I think it's not a job of vagrant to bring enterfaces. The image should be created in the way where all interfaces are up.
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.
The Vagrantfile currently specifies the image should have an additional private network. However, Vagrant is buggy, and doesn't bring up interfaces correctly on CentOS/RHEL.
This patch simply ensures, the currently configured Vagrantfile brings up the interface properly on the problematic OS. Doesn't impact any other OSes.
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.
ifup eth1
is nice b/c it runs the network scripts which Vagrant placed on the target OS.
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.
I have just built image for centos 7.2 with several interfaces. Vagrant brought them up as expected.
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.
Did you try the 'centos/7' box? This one specifically gives us issues. Using vagrant 1.9.1 and virtualbox 5.0.
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.
This appears to be an issue impacting others, not just myself. Other people on my team are also suffering from this problem.
Vagrant 1.9.1
VirtualBox Version 5.0.32 r112930
[jodewey:~/git/kargo] master+ ± vagrant box list | grep centos/7
centos/7 (virtualbox, 1611.01)
[jodewey:~/git/kargo] master+ ± grep centos vagrant/config.rb
$box = "centos/7"
[jodewey:~/git/kargo] master+ ± vagrant up --no-provision
Bringing machine 'k8s-01' up with 'virtualbox' provider...
==> k8s-01: Importing base box 'centos/7'...
...
[jodewey:~/git/kargo] master+ ± vagrant ssh -c 'ip addr s eth1'
3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
link/ether 08:00:27:78:67:57 brd ff:ff:ff:ff:ff:ff
Connection to 127.0.0.1 closed.
This change seems fairly straight forward until vagrant gets it's act together. Doesn't impact any other distro but the ones having this particular issue. I'm happy to remove this patch, once Vagrant corrects the issue.
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.
Looks like this might get fixed in Vagrant 1.9.2...
hashicorp/vagrant#8148
hashicorp/vagrant@8e7c267
Will close this issue out if thats the case.
Similar report here, to avoid duplicating, I've linked: |
I have verified vagrant 1.9.2 corrects this issue. Closing.
|
These roles assume a working eth1. Vagrant is notorious brining
up interfaces on RHEL/CentOS instances. The shell provisioner
will execute before the dependant ansible provisioner.