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

Ensure eth1 comes up #1039

Closed
wants to merge 2 commits into from
Closed

Ensure eth1 comes up #1039

wants to merge 2 commits into from

Conversation

retr0h
Copy link
Contributor

@retr0h retr0h commented Feb 16, 2017

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.

@k8s-ci-robot
Copy link
Contributor

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.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. label Feb 16, 2017
@retr0h
Copy link
Contributor Author

retr0h commented Feb 16, 2017

I signed it!

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. and removed cncf-cla: no Indicates the PR's author has not signed the CNCF CLA. labels Feb 16, 2017
@ant31
Copy link
Contributor

ant31 commented Feb 17, 2017

@mattymo maybe we can add a CI test for vagrant up? Seems a regular usage

@ant31
Copy link
Contributor

ant31 commented Feb 17, 2017

@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.
@retr0h
Copy link
Contributor Author

retr0h commented Feb 18, 2017

@retr0h will it work with other os?

@ant31 I am now only targeting yum based distributions, which is more in line with the theme of this PR.

@holser
Copy link
Contributor

holser commented Feb 18, 2017

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
Copy link
Contributor

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.

Copy link
Contributor Author

@retr0h retr0h Feb 18, 2017

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

@retr0h retr0h Feb 23, 2017

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.

@tomasdikk
Copy link

Similar report here, to avoid duplicating, I've linked:

hashicorp/vagrant#8166 (comment)

@retr0h
Copy link
Contributor Author

retr0h commented Feb 28, 2017

I have verified vagrant 1.9.2 corrects this issue. Closing.

[jodewey:~/git/kargo] 0bfc2d0+ ± vagrant up --no-provision
Bringing machine 'k8s-01' up with 'virtualbox' provider...
==> k8s-01: Importing base box 'centos/7'...
==> k8s-01: Matching MAC address for NAT networking...
==> k8s-01: Checking if box 'centos/7' is up to date...
...
==> k8s-01: Setting hostname...
==> k8s-01: Configuring and enabling network interfaces...
==> k8s-01: Configuring proxy environment variables...
==> k8s-01: Configuring proxy for Yum...
==> k8s-01: Rsyncing folder: /Users/jodewey/git/kargo/ => /vagrant
==> k8s-01: Machine not provisioned because `--no-provision` is specified.
[jodewey:~/git/kargo] 0bfc2d0+ ±

[jodewey:~/git/kargo] 0bfc2d0+ ± vagrant ssh -c 'ip addr s eth1'
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 08:00:27:f4:e0:40 brd ff:ff:ff:ff:ff:ff
    inet 172.17.8.101/24 brd 172.17.8.255 scope global eth1
       valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:fef4:e040/64 scope link
       valid_lft forever preferred_lft forever
Connection to 127.0.0.1 closed.

@retr0h retr0h closed this Feb 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cncf-cla: yes Indicates the PR's author has signed the CNCF CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants