AT_SETUP([non-VLAN, non-bond])
AT_KEYWORDS([interface-reconfigure])
+AT_SKIP_IF([$non_ascii_cwd])
+AT_SKIP_IF([test "$IS_WIN32" = "yes"])
ifr_setup
AT_CHECK([ifr_run --force xenbr2 up], [0], [], [stderr])
Writing network configuration for xenbr2
Configuring xenbr2 using DHCP configuration
configure_datapath: bridge - xenbr2
-configure_datapath: physical - [u'eth2']
+configure_datapath: physical - ['eth2']
configure_datapath: extra ports - []
configure_datapath: extra bonds - []
-/usr/bin/ovs-vsctl --timeout=5 -vANY:console:off get-fail-mode xenbr2
+/usr/bin/ovs-vsctl -vconsole:off get-fail-mode xenbr2
Applying changes to /etc/sysconfig/network-scripts/route-xenbr2 configuration
Applying changes to /etc/sysconfig/network configuration
Applying changes to /etc/sysconfig/network-scripts/ifcfg-xenbr2 configuration
set Bridge xenbr2 fail_mode=secure
remove Bridge xenbr2 other_config disable-in-band
br-set-external-id xenbr2 xs-network-uuids d08c8749-0c8f-9e8d-ce25-fd364661ee99
-/usr/bin/ovs-vsctl --timeout=5 -vANY:console:off get interface eth2 ofport
+/usr/bin/ovs-vsctl -vconsole:off get interface eth2 ofport
/usr/bin/ovs-ofctl add-flow xenbr2 idle_timeout=0,priority=0,in_port=5,arp,nw_proto=1,actions=local
/usr/bin/ovs-ofctl add-flow xenbr2 idle_timeout=0,priority=0,in_port=local,arp,dl_src=00:15:17:a0:29:80,actions=5
/usr/bin/ovs-ofctl add-flow xenbr2 idle_timeout=0,priority=0,in_port=5,dl_dst=00:15:17:a0:29:80,actions=local
/sbin/ifdown xenbr2
deconfigure ipdev xenbr2 on xenbr2
deconfigure_bridge: bridge - xenbr2
-action_down: bring down physical devices - [u'eth2']
+action_down: bring down physical devices - ['eth2']
/sbin/ifconfig eth2 down
/usr/bin/ovs-vsctl --timeout=20
--with-iface --if-exists del-port xenbr2
\f
AT_SETUP([VLAN, non-bond])
AT_KEYWORDS([interface-reconfigure])
+AT_SKIP_IF([$non_ascii_cwd])
+AT_SKIP_IF([test "$IS_WIN32" = "yes"])
ifr_setup
AT_CHECK([ifr_run --force xapi3 up], [0], [], [stderr])
Writing network configuration for xapi3
Configuring xapi3 using None configuration
configure_datapath: bridge - xenbr3
-configure_datapath: physical - [u'eth3']
+configure_datapath: physical - ['eth3']
configure_datapath: extra ports - []
configure_datapath: extra bonds - []
Applying changes to /etc/sysconfig/network-scripts/route-xapi3 configuration
deconfigure_bridge: bridge - xapi3
action_down: no more masters, bring down slave xenbr3
deconfigure_bridge: bridge - xenbr3
-action_down: bring down physical devices - [u'eth3']
+action_down: bring down physical devices - ['eth3']
/sbin/ifconfig eth3 down
/usr/bin/ovs-vsctl --timeout=20
--with-iface --if-exists del-port xapi3
\f
AT_SETUP([Bond, non-VLAN])
AT_KEYWORDS([interface-reconfigure])
+AT_SKIP_IF([$non_ascii_cwd])
+AT_SKIP_IF([test "$IS_WIN32" = "yes"])
ifr_setup
# Pretend that bond0 exists, even though it would really be created by
configure_datapath: leaving bond bond0 up
configure_datapath: leaving bond bond0 up
configure_datapath: bridge - xapi1
-configure_datapath: physical - [u'eth0', u'eth1']
+configure_datapath: physical - ['eth0', 'eth1']
configure_datapath: extra ports - []
configure_datapath: extra bonds - []
netdev: down: device xenbr0 does not exist, ignoring
--may-exist add-br xapi1
--with-iface --if-exists del-port bond0
--fake-iface add-bond xapi1 bond0 eth0 eth1
- set Port bond0 MAC="00:22:19:22:4b:af" other-config:bond-miimon-interval=100 bond_downdelay=200 bond_updelay=31000 other-config:bond-detect-mode=carrier lacp=off bond_mode=balance-slb
+ set Port bond0 MAC="00:22:19:22:4b:af" bond_downdelay=200 other-config:bond-miimon-interval=100 bond_updelay=31000 other-config:bond-detect-mode=carrier lacp=off bond_mode=balance-slb
set Bridge xapi1 other-config:hwaddr="00:22:19:22:4b:af"
set Bridge xapi1 fail_mode=secure
remove Bridge xapi1 other_config disable-in-band
/sbin/ifdown xapi1
deconfigure ipdev xapi1 on xapi1
deconfigure_bridge: bridge - xapi1
-action_down: bring down physical devices - [u'eth0', u'eth1']
+action_down: bring down physical devices - ['eth0', 'eth1']
/sbin/ifconfig eth0 down
/sbin/ifconfig eth1 down
/usr/bin/ovs-vsctl --timeout=20
\f
AT_SETUP([VLAN on bond])
AT_KEYWORDS([interface-reconfigure])
+AT_SKIP_IF([$non_ascii_cwd])
+AT_SKIP_IF([test "$IS_WIN32" = "yes"])
ifr_setup
# Pretend that bond0 exists, even though it would really be created by
configure_datapath: leaving bond bond0 up
configure_datapath: leaving bond bond0 up
configure_datapath: bridge - xapi1
-configure_datapath: physical - [u'eth0', u'eth1']
+configure_datapath: physical - ['eth0', 'eth1']
configure_datapath: extra ports - []
configure_datapath: extra bonds - []
netdev: down: device xenbr0 does not exist, ignoring
--may-exist add-br xapi1
--with-iface --if-exists del-port bond0
--fake-iface add-bond xapi1 bond0 eth0 eth1
- set Port bond0 MAC="00:22:19:22:4b:af" other-config:bond-miimon-interval=100 bond_downdelay=200 bond_updelay=31000 other-config:bond-detect-mode=carrier lacp=off bond_mode=balance-slb
+ set Port bond0 MAC="00:22:19:22:4b:af" bond_downdelay=200 other-config:bond-miimon-interval=100 bond_updelay=31000 other-config:bond-detect-mode=carrier lacp=off bond_mode=balance-slb
set Bridge xapi1 other-config:hwaddr="00:22:19:22:4b:af"
set Bridge xapi1 fail_mode=secure
remove Bridge xapi1 other_config disable-in-band
deconfigure_bridge: bridge - xapi2
action_down: no more masters, bring down slave xapi1
deconfigure_bridge: bridge - xapi1
-action_down: bring down physical devices - [u'eth0', u'eth1']
+action_down: bring down physical devices - ['eth0', 'eth1']
/sbin/ifconfig eth0 down
/sbin/ifconfig eth1 down
/usr/bin/ovs-vsctl --timeout=20
]])
AT_CLEANUP
+
+dnl This test configures two tunnels, then deletes the second and re-uses its
+dnl name for different types of ports. This was introduced to detect errors
+dnl where port configuration persists even when the port is deleted and
+dnl readded.
+AT_SETUP([Re-create port with different types])
+AT_KEYWORDS([interface-reconfigure])
+OVS_VSWITCHD_START(
+ [add-port br0 p0 -- set int p0 type=gre options:remote_ip=127.0.0.1 -- \
+ add-port br0 p1 -- set int p1 type=dummy -- \
+ add-port br0 p2 -- set int p2 type=dummy])
+
+AT_CHECK([ovs-vsctl set int p1 type=gre options:remote_ip=127.0.0.1])
+AT_CHECK([ovs-vsctl del-port p1])
+AT_CHECK([ovs-vsctl add-port br0 p1 -- set int p1 type=dummy])
+
+OVS_APP_EXIT_AND_WAIT([ovs-vswitchd])
+OVS_APP_EXIT_AND_WAIT([ovsdb-server])
+AT_CLEANUP