[network] cookbook does not move ip from interface to bridge

Bug #1350777 reported by Wei Hu
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack + Chef
Won't Fix
Medium
Wei Hu

Bug Description

The l3-agent recipe does not move the ip from external interface to external bridge,
which will let the network node lost external network connection.

E.g.
If the external interface is eth1 which has 10.6.12.10,
after run the l3-agent recipe, an external bridge "br-ex"
is created which plugged the eth1. But the eth1 still has
the ip, meanwhile, br-ex don't have any ip. This cause the
node lost the external network connection.

Tags: network
Revision history for this message
Mark Vanderwiel (vanderwl) wrote :

Moving the ip might be a bit of work and need a blueprint to handle the complexity.

description: updated
Changed in openstack-chef:
status: New → Confirmed
importance: Undecided → Medium
tags: added: network
JJ Asghar (d-jj)
summary: - cookbook does not move ip from interface to bridge
+ [network] cookbook does not move ip from interface to bridge
JJ Asghar (d-jj)
Changed in openstack-chef:
milestone: none → kilo-rc1
Changed in openstack-chef:
assignee: nobody → Yuki Nishiwaki (uckey-1067)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cookbook-openstack-network (master)

Fix proposed to branch: master
Review: https://review.openstack.org/177581

Changed in openstack-chef:
status: Confirmed → In Progress
Revision history for this message
Wei Hu (huwei-xtu) wrote :

@Yuki Nishiwaki, I'm sorry.
But I think temporary move ip address is very dangerous. Since this move will lose efficacy once user reboot os or restart network. Which means once user reboot os or restart network, the ip address can not be accessed any more. However, to a linux server, losing network connection almost means losing its control.
And actually, we did some more about ip movement by modify linux network configuration files. And plan to write a blue print to track those complexity steps. Do you mind to implement it together ?

Revision history for this message
Wei Hu (huwei-xtu) wrote :
Revision history for this message
Yuki Nishiwaki (uckey-1067) wrote :

@Wei Hu , Thanks for your comment.
I see. You are right.
I have been thinking only situation of having multi-nic. . . .
If we use server which have single-nic, the issue you say appear.

I want to ask you about what you say.

>And actually, we did some more about ip movement by modify linux network
Do you have the patch for "moving ip" already ?

>configuration files. And plan to write a blue print to track those
>complexity steps. Do you mind to implement it together ?
It's good idea!!
But I don't know how to develop.
The patch (https://review.openstack.org/177581) will be aborted and create new patch by you?

Revision history for this message
Wei Hu (huwei-xtu) wrote :

Thanks.
Actually, we have patch for ip movement, and is ready for rhel product environment. But need more development for ubuntu(we also have finished ubuntu platform recips, but not test enough).
The implement steps can be summary by:
1. Back up relate network configuration files(e.g. rhel ifcfg-eth0, resolv.conf)
2. Modify the network configuration files. You can reference to http://git.openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=blob_plain;f=rhel/README.RHEL;hb=HEAD for rhel. And http://git.openvswitch.org/cgi-bin/gitweb.cgi?p=openvswitch;a=blob;f=debian/openvswitch-switch.README.Debian;h=8617e77103eadb55a5083de6400efde53109b29e;hb=HEAD for ubuntu.
3. Let those configurations take effect.
4. Roll back if move failure.

We plan to contribute this patch to community, I'm very glad if you can provide your opinions or comments to our patch to implement it together. :-)
Thanks.

Changed in openstack-chef:
assignee: Yuki Nishiwaki (uckey-1067) → nobody
Revision history for this message
Yuki Nishiwaki (uckey-1067) wrote :

Thanks for your instruction.
I think I want to cooperate it. So I wait for you to upload Gerrit. I'm looking forward to your patch.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cookbook-openstack-network (master)

Change abandoned by Yuki Nishiwaki (<email address hidden>) on branch: master
Review: https://review.openstack.org/177581

Revision history for this message
Wei Hu (huwei-xtu) wrote :

Thanks @Yuki Nishiwaki.

Changed in openstack-chef:
assignee: nobody → Wei Hu (huwei-xtu)
Revision history for this message
Petr Michalec (epcim) wrote :

Moving ip from interface to bridge alternative. As I know the current approach is to create resources in chef cookbooks to properly configure OS configuration to make the movement pernament.

I propose an alternative, or an temporary alternative, to make wheels running before finally reoslved. I propose an multiplatform solution - just call an "up" script when the ext interface is initialized. So when the networking/interface is started/restarted the up script is being called.

For ubuntu example:

auto eth0
iface eth0 inet static
address 10.10.51.60
netmask 255.255.255.0
gateway 10.10.51.1
metric 0
up /etc/neutron/move_ip.sh

with the content (copy paste from chef file template):
        iface_cidr=`ip addr show dev #{ext_bridge_iface} scope global |awk '/inet/ {print $2}'`

        # recreate the bridge
        ovs-vsctl br-exists #{ext_bridge} || ovs-vsctl add-br #{ext_bridge} -- add-port #{ext_bridge} #{ext_bridge_iface}

        # MOVE IP ADDR
        ip addr flush #{ext_bridge_iface}
        ip addr add ${iface_cidr} dev #{ext_bridge}
        ip link set #{ext_bridge} up

        # in my case I actually lost orig iface IP + manually set default route so I do have to re bind:
        ip addr add 10.10.51.0/24 dev eth0
        ip ro add default via 10.10.51.2 dev br-ext

Changed in openstack-chef:
milestone: kilo-rc1 → liberity-rc1
Revision history for this message
Dr. Jens Harbott (j-harbott) wrote :

Closed as there has been no activity in years. Please create a new bug if this issue still affects you.

Changed in openstack-chef:
status: In Progress → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.