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

Single network card and internet access for the deployed servers #227

Open
msimonin opened this issue Mar 20, 2018 · 5 comments
Open

Single network card and internet access for the deployed servers #227

msimonin opened this issue Mar 20, 2018 · 5 comments

Comments

@msimonin
Copy link
Contributor

msimonin commented Mar 20, 2018

Problem statement

Kolla (and thus EnOS) assumes that at least two network interfaces are available.
There are cases where only one interface is available on the nodes used for the deployment. For instance on Chameleon BareMetal or Grid'5000 not all the physical machines have a second interface wired. One of the interfaces is used to access the external world (internet).

It's possible to deploy OpenStack using EnOS on nodes with only one network card. But a deployed instance won't get internet access by default.

Technical details

Only the G5K (when deploying on nodes with only one network card) and openstack/chameleon provider are impacted by this issue.
In the previous provider a virtual device (veth) is created to act as the external interface and the two interfaces (the real and the virtual) are passed to Kolla. At the end of the deployment the veth device is bridged on br-ex but not physically linked to any network. Thus no traffic send to/from br-ex can be received by the instances (this include internal to external or external to internal traffic).

Possible solutions

  • At the end of the deployment we can plug the physical interface to br-ex to gain connectivity to the external world. In this solution the veth device was ephemeral and only used to complete the Kolla deployment.

    • Assuming openvswitch deployement, one can launch the following script on the network node.
#!/usr/bin/env bash

# The network interface
IF=eno1
# This is the list of the vip of eth0
ips=$(ip addr show dev $IF|grep "inet .*/32" | awk '{print $2}')
if [[ ! -z "$ips" ]]
then
  # vip detected
  echo $ips
  docker exec -ti openvswitch_vswitchd ovs-vsctl add-port br-ex $IF && ip addr flush $IF && dhclient -nw br-ex
  for ip in $ips
  do
    ip addr add $ip dev br-ex
  done
else
  echo "nothing to do"
fi
@rizaon
Copy link
Contributor

rizaon commented Apr 14, 2018

I tried the script and it works well.

Just little note that after running this script, enos os --reconfigure does not work because the network node ip is missing. So probably need to revert the script first before reconfigure.

@SimonDelamare
Copy link

Hello !
The workaround works well under Grid'5000. Are you planning a more permanent solution to this problem? (just asking because we are doing some spring cleaning on our Enos deployment scripts ;))

@msimonin
Copy link
Contributor Author

msimonin commented Apr 2, 2021

I guess this could be put in the enos logic at the end of the deployment. This would be eased if we update the EnOSlib dependency. I know that @rcherrueau is currently updating the enos code to fit with a newer Openstack version but not sure if updating the lib is planned.

By the way, maybe that's a good idea to test EnOSlib as well on G5k ? :)

https://discovery.gitlabpages.inria.fr/enoslib/

@SimonDelamare
Copy link

By the way, maybe that's a good idea to test EnOSlib as well on G5k ? :)

We already do it :) https://gitlab.inria.fr/grid5000/jenkins-scripts/-/blob/master/lib/enoslibtester.rb

@msimonin
Copy link
Contributor Author

msimonin commented Apr 8, 2021

\o/ (btw I can't access the link :( )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants