Can not assign external IP to instance

asked 2018-11-03 04:17:46 -0600

soheil08 gravatar image

Hi, I have installed OpenStack-PackStack in two nodes, one running as controller and network and the other as compute node. I create br-ex interface in the network node and after creating an external and internal network, router and interfaces using the OpenStack Dashboard I can easily lunch an instance using the internal network. But the problem is when I try to lunch instance using external network because it fails. I checked the compute node logs and it shows that the error is because of network things. The nova-compute log:

Instance failed to spawn: PortBindingFailed: Binding failed for port fa16b274-8540-41b3-a6fc-838ff564ac3f, please check neutron logs for more information.

checking the compute neutron log we see:

neutron.agent.common.ovs_lib [req-c8ecb399-ae36-4498-9291-ce563d2cdcce - - - - -] Port fa16b274-8540-41b3-a6fc-838ff564ac3f not present in bridge br-int
neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent [req-c8ecb399-ae36-4498-9291-ce563d2cdcce - - - - -] port_unbound(): net_uuid None not managed by VLAN manager

I searched for the error "port not present in bridge br-int" and some said we should do some modification in compute node interfaces as we did in the network node, too. So I define an interface named "br-ex" and set it as OVSBridge and modified the enp interfaces to act as OVSPort. Here is the output of the command "ip a" in the compute node:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master ovs-system state UP group default qlen 1000
    link/ether 00:26:18:93:fc:29 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::226:18ff:fe93:fc29/64 scope link 
       valid_lft forever preferred_lft forever
3: enp7s4: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 00:26:18:93:e5:35 brd ff:ff:ff:ff:ff:ff
4: ovs-system: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 8a:25:27:4d:14:8c brd ff:ff:ff:ff:ff:ff
5: br-int: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 0e:d7:ea:39:9e:40 brd ff:ff:ff:ff:ff:ff
6: br-tun: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 7a:0d:0c:93:49:4c brd ff:ff:ff:ff:ff:ff
7: br-ex: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
    link/ether 00:26:18:93:fc:29 brd ff:ff:ff:ff:ff:ff
    inet 192.168.0.61/24 brd 192.168.0.255 scope global br-ex
       valid_lft forever preferred_lft forever
    inet6 fe80::7c3e:68ff:fe8f:d346/64 scope link 
       valid_lft forever preferred_lft forever

How should I change the network setting to work as desired?

edit retag flag offensive close merge delete