|
Reproduce:
1. add port to bridge
2. Add data to port via ovs-vsctl
3. then later add extra config to the port via odl
|
|
I tried following on stable lithium this morning -
1. Create bretest2 bridge using postman.
2. Add port using - "ovs-vsctl add-port brtest2 vlan10 tag=10 – set Interface vlan10 type=internal"
3. operational shows following (cut to only the relevant section) -
"termination-point": [
{
"ovsdb:interface-type": "ovsdb:interface-type-internal",
"ovsdb:interface-uuid": "c1666aa1-bd40-47ee-9f65-994b838d430f",
"ovsdb:name": "vlan10",
"ovsdb:ofport": 1,
"ovsdb:port-uuid": "fa38cb93-c2f6-4850-8ce4-2a86bd108e6d",
"ovsdb:vlan-tag": 10,
"tp-id": "vlan10"
}
]
4. Using postman, added trunks and vlan-mode to this termination-point. Operational changed to -
"ovsdb:interface-type": "ovsdb:interface-type-internal",
"ovsdb:interface-uuid": "c1666aa1-bd40-47ee-9f65-994b838d430f",
"ovsdb:name": "vlan10",
"ovsdb:ofport": 1,
"ovsdb:options": [
{
"option": "remote_ip",
"value": "134.134.170.72"
}
],
"ovsdb:port-external-ids": [
{
"external-id-key": "opendaylight-iid",
"external-id-value": "/network-topology:network-topology/network-topology:topology[network-topology:topology-id='ovsdb:1']/network-topology:node[network-topology:node-id='ovsdb://134.134.170.72:6640/bridge/brtest2']/network-topology:termination-point[network-topology:tp-id='vlan10']"
}
],
"ovsdb:port-uuid": "fa38cb93-c2f6-4850-8ce4-2a86bd108e6d",
"ovsdb:trunks": [
{
"trunk": 2
}
,
{
"trunk": 3
}
],
"ovsdb:vlan-mode": "access",
"ovsdb:vlan-tag": 10,
"tp-id": "vlan10"
}
5. sudo ovs-vsctl list Port
_
_uuid : fa38cb93-c2f6-4850-8ce4-2a86bd108e6d
bond_active_slave : []
bond_downdelay : 0
bond_fake_iface : false
bond_mode : []
bond_updelay : 0
external_ids :
{opendaylight-iid="/network-topology:network-topology/network-topology:topology[network-topology:topology-id='ovsdb:1']/network-topology:node[network-topology:node-id='ovsdb://134.134.170.72:6640/bridge/brtest2']/network-topology:termination-point[network-topology:tp-id='vlan10']"}
fake_bridge : false
interfaces : [c1666aa1-bd40-47ee-9f65-994b838d430f]
lacp : []
mac : []
name : "vlan10"
other_config : {}
qos : []
statistics : {}
status : {}
tag : 10
trunks : [2, 3]
vlan_mode : access
|
|
Postman collection - https://www.getpostman.com/collections/330c161d1f46d6273e17
|
|
I also tried
1. Create bridge using postman.
2. Add port using postman.
3. Add interface type using ovs-vsctl ( sudo ovs-vsctl – set Interface vlan10 type=internal)
4. $ sudo ovs-vsctl show
b31bca50-69da-4afe-8b14-5f8064cdf316
Manager "ptcp:6640"
is_connected: true
Bridge "brtest2"
Controller "tcp:134.134.170.72:6640"
Port "vlan10"
tag: 10
Interface "vlan10"
type: internal
Port "brtest2"
Interface "brtest2"
type: internal
ovs_version: "2.3.1-git3282e51"
4. Update TP with "options" and "trunk" using postman.
5. $ sudo ovs-vsctl show
b31bca50-69da-4afe-8b14-5f8064cdf316
Manager "ptcp:6640"
is_connected: true
Bridge "brtest2"
Controller "tcp:134.134.170.72:6640"
Port "vlan10"
tag: 10
trunks: [2, 3]
Interface "vlan10"
type: internal
options:
{remote_ip="134.134.170.72"}
Port "brtest2"
Interface "brtest2"
type: internal
ovs_version: "2.3.1-git3282e51"
|
|
this is just a reference script. Refer to bug3545.sh for a handy
and easy script to reproduce this bug.
|
|
Attachment createFloat.sh has been added with description: original script where bug3545.sh came from
|
- steps to reproduce
OVSDB-167
- 1) start ODL, and do: feature:install odl-ovsdb-openstack
- Make sure to wait for ODL to be fully up
- 2) copy this script to a system that ir running OVS. Make sure OVS is completely
- cleared. If using ubuntu, that involves something like:
#
- #!/usr/bin/env bash
- sudo service openvswitch-switch stop
- sudo rm -rf /var/log/openvswitch/*
- sudo rm -rf /etc/openvswitch/conf.db
- sudo service openvswitch-switch start
#
- 3) make sure you have curl installed in the system where this script is ran
#
- 4) do "sudo ovs-vsctl show" and make sure there are no bridges and OVS is not
- connected to ODL yet. An example of what it should look like is below:
#
- $ sudo ovs-vsctl show
- 5c012e23-b5a1-45d4-9a2e-865a3f81c59e
- ovs_version: "2.3.0"
- $
#
- 5) change ODL_IP below to the ip address of where ODL is running
#
- 6) run this script. It will:
#
- - explicitly create bridge br-ex;
- - connect to ODL
- - create neutron network
- - add an ovs port
#
- 7) if bug is reproduced, you will notive that while there is a patch-port in
- br-int, a patch port in br-ex is not created. Doing this will work around the bug
#
- sudo ovs-vsctl add-port br-ex patch-int – set interface patch-int type=patch – set interface patch-int options:peer=patch-ext
===
vagrant@devstack-control:~$
vagrant@devstack-control:~$ sudo ovs-vsctl show
75234ef6-ef80-4899-8fda-2b26d1f7c199
Manager "tcp:192.168.50.1:6640"
is_connected: true
Bridge br-ex
Port br-ex
Interface br-ex
type: internal
Bridge br-int
Controller "tcp:192.168.50.1:6653"
is_connected: true
fail_mode: secure
Port br-int
Interface br-int
type: internal
Port "tap79adcba5-19"
Interface "tap79adcba5-19"
type: internal
Port patch-ext
Interface patch-ext
type: patch
options:
{peer=patch-int}
ovs_version: "2.3.0"
vagrant@devstack-control:~$
vagrant@devstack-control:~$
vagrant@devstack-control:~$ sudo ovs-vsctl add-port br-ex patch-int – set interface patch-int type=patch – set interface patch-int options:peer=patch-ext
vagrant@devstack-control:~$ sudo ovs-vsctl show
75234ef6-ef80-4899-8fda-2b26d1f7c199
Manager "tcp:192.168.50.1:6640"
is_connected: true
Bridge br-ex
Port br-ex
Interface br-ex
type: internal
Port patch-int
Interface patch-int
type: patch
options: {peer=patch-ext}
Bridge br-int
Controller "tcp:192.168.50.1:6653"
is_connected: true
fail_mode: secure
Port br-int
Interface br-int
type: internal
Port "tap79adcba5-19"
Interface "tap79adcba5-19"
type: internal
Port patch-ext
Interface patch-ext
type: patch
options: {peer=patch-int}
ovs_version: "2.3.0"
vagrant@devstack-control:~$
|
|
Attachment bug3545.sh has been added with description: easy script for reproducing this bug
|
|
Attachment bug3545.out has been added with description: Output of shell script to create network and test this defect.
|
|
rc='ovs-vsctl: no bridge named br-int
Can you also attach the logs from ODL? Looks like the node never connected properly to ODL and netvirt did not create br-int.
This line should have enabled the connection: sudo ovs-vsctl set-manager tcp:localhost:6640
|
|
I missed a step that would enable l3 in ovsdb net-virt
w/out that, no patch ports will be created (in any bridge).
Will re-submit updated patch and instructions.
https://github.com/opendaylight/ovsdb/blob/master/openstack/net-virt/src/main/java/org/opendaylight/ovsdb/openstack/netvirt/impl/BridgeConfigurationManagerImpl.java#L369
|
|
Missed step 0: enable l3 forwarding in ovsdb netvirt:
echo 'ovsdb.l3.fwd.enabled=yes' >> ./etc/custom.properties
(In reply to Flavio Fernandes from comment #6)
> Created attachment 549 [details]
> easy script for reproducing this bug
>
> # steps to reproduce OVSDB-167
>
> # 1) start ODL, and do: feature:install odl-ovsdb-openstack
> # Make sure to wait for ODL to be fully up
> #
|
- steps to reproduce
OVSDB-167
- 0) enable L3 forwarding in ODL, so patch ports will be created upon neutron network creation:
- echo 'ovsdb.l3.fwd.enabled=yes' >> ./etc/custom.properties
#
- 1) start ODL, and do: feature:install odl-ovsdb-openstack
- Make sure to wait for ODL to be fully up
#
- 2) copy this script to a system that ir running OVS. Make sure OVS is completely
- cleared. If using ubuntu, that involves something like:
#
- #!/usr/bin/env bash
- sudo service openvswitch-switch stop
- sudo rm -rf /var/log/openvswitch/*
- sudo rm -rf /etc/openvswitch/conf.db
- sudo service openvswitch-switch start
#
- 3) make sure you have curl installed in the system where this script is ran
#
- 4) do "sudo ovs-vsctl show" and make sure there are no bridges and OVS is not
- connected to ODL yet. An example of what it should look like is below:
#
- $ sudo ovs-vsctl show
- 5c012e23-b5a1-45d4-9a2e-865a3f81c59e
- ovs_version: "2.3.0"
- $
#
- 5) change ODL_IP below to the ip address of where ODL is running
#
- 6) run this script. It will:
#
- - explicitly create bridge br-ex;
- - connect to ODL
- - create neutron network
- - add an ovs port
#
- 7) if bug is reproduced, you will notive that while there is a patch-port in
- br-int, a patch port in br-ex is not created. Doing this will work around the bug
#
- sudo ovs-vsctl add-port br-ex patch-int – set interface patch-int type=patch – set interface patch-int options:peer=patch-ext
|
|
Attachment bug3545.sh has been added with description: bug3545.sh
|
|
I re-run the script and not I hit the same issue Sharad see:
br-int is not getting created at all in the node. I ended up with 2 br-int in mdsal's config:
{
"network-topology": {
"topology": [
{
"topology-id": "ovsdb:1",
"node": [
{
"node-id": "ovsdb://uuid/ddfb2be2-eafe-477d-be33-12e87f35bdb5/bridge/br-int",
"ovsdb:bridge-name": "br-int",
"ovsdb:managed-by": "/network-topology:network-topology/network-topology:topology[network-topology:topology-id='ovsdb:1']/network-topology:node[network-topology:node-id='ovsdb://uuid/ddfb2be2-eafe-477d-be33-12e87f35bdb5']",
"ovsdb:controller-entry": [
{
"target": "tcp:192.168.50.1:6653"
}
],
"ovsdb:protocol-entry": [
{
"protocol": "ovsdb:ovsdb-bridge-protocol-openflow-13"
}
],
"ovsdb:fail-mode": "ovsdb:ovsdb-fail-mode-secure"
},
{
"node-id": "ovsdb://uuid/273cc9c1-1800-4af0-9c7c-bceb0454628c/bridge/br-int",
"ovsdb:bridge-name": "br-int",
"ovsdb:managed-by": "/network-topology:network-topology/network-topology:topology[network-topology:topology-id='ovsdb:1']/network-topology:node[network-topology:node-id='ovsdb://uuid/273cc9c1-1800-4af0-9c7c-bceb0454628c']",
"ovsdb:controller-entry": [
{
"target": "tcp:192.168.50.1:6653"
}
],
"ovsdb:protocol-entry": [
{
"protocol": "ovsdb:ovsdb-bridge-protocol-openflow-13"
}
],
"ovsdb:fail-mode": "ovsdb:ovsdb-fail-mode-secure"
}
]
}
]
}
}
And I see br-ex (and nothing else) on the operational tree:
{
"network-topology": {
"topology": [
{
"topology-id": "netvirt:1"
}
,
{
"topology-id": "flow:1"
}
,
{
"topology-id": "ovsdb:1",
"node": [
{
"node-id": "ovsdb://uuid/ddfb2be2-eafe-477d-be33-12e87f35bdb5/bridge/br-ex",
"ovsdb:bridge-name": "br-ex",
"ovsdb:bridge-uuid": "4110352b-f9a7-4edc-a473-faf7e450b1ee",
"ovsdb:datapath-id": "00:00:2a:35:10:41:dc:4e",
"ovsdb:datapath-type": "ovsdb:datapath-type-system",
"ovsdb:managed-by": "/network-topology:network-topology/network-topology:topology[network-topology:topology-id='ovsdb:1']/network-topology:node[network-topology:node-id='ovsdb://uuid/ddfb2be2-eafe-477d-be33-12e87f35bdb5']",
"ovsdb:bridge-external-ids": [
{
"bridge-external-id-key": "bridge-id",
"bridge-external-id-value": "br-ex"
}
],
"termination-point": [
{
"tp-id": "br-ex",
"ovsdb:interface-type": "ovsdb:interface-type-internal",
"ovsdb:port-uuid": "6d845492-99d1-4716-acde-0e32ad3ac278",
"ovsdb:name": "br-ex",
"ovsdb:interface-uuid": "c55dfd94-21a3-4163-b06c-afe7634907e5",
"ovsdb:ofport": 65534
}
]
},
{
"node-id": "ovsdb://uuid/ddfb2be2-eafe-477d-be33-12e87f35bdb5",
"ovsdb:managed-node-entry": [
{
"bridge-ref": "/network-topology:network-topology/network-topology:topology[network-topology:topology-id='ovsdb:1']/network-topology:node[network-topology:node-id='ovsdb://uuid/ddfb2be2-eafe-477d-be33-12e87f35bdb5/bridge/br-ex']"
}
],
"ovsdb:connection-info":
{
"local-ip": "192.168.50.1",
"remote-ip": "192.168.50.20",
"remote-port": 47688,
"local-port": 6640
}
,
"ovsdb:ovs-version": "2.3.2",
"ovsdb:openvswitch-external-ids": [
{
"external-id-key": "system-id",
"external-id-value": "0b0f991e-5420-466f-aafd-492cdb2b130e"
}
]
}
]
}
]
}
}
|
|
this is karaf.log when br-int created twice in config tree, and never gets
in the operational tree.
|
|
Attachment karaf.log has been added with description: karaf.log when br-int is not getting created
|
|
(In reply to Flavio Fernandes from comment #11)
> Created attachment 567 [details]
> bug3545.sh
>
>
> # steps to reproduce OVSDB-167
>
revising step 0 to remove any previous state in ODL:
- 0.0) clean up ODL's previous state. But deleting data AND journal directories: rm -rf ./data ./journal
- 0.5) enable L3 forwarding in ODL, so patch ports will be created upon neutron network creation:
- echo 'ovsdb.l3.fwd.enabled=yes' >> ./etc/custom.properties
#
- 1) start ODL, and do: feature:install odl-ovsdb-openstack
- Make sure to wait for ODL to be fully up
#
...
|
- added bigger sleep between manager setup and creation of neutron net;
- make sure no state from previous ODL run is carried over:
rm -rf ./data ./journal
–
- steps to reproduce
OVSDB-167
- 0.0) clean up ODL's previous state. But deleting data AND journal directories: rm -rf ./data ./journal
- 0.5) enable L3 forwarding in ODL, so patch ports will be created upon neutron network creation:
- echo 'ovsdb.l3.fwd.enabled=yes' >> ./etc/custom.properties
#
- 1) start ODL, and do: feature:install odl-ovsdb-openstack
- Make sure to wait for ODL to be fully up
#
- 2) copy this script to a system that ir running OVS. Make sure OVS is completely
- cleared. If using ubuntu, that involves something like:
#
- #!/usr/bin/env bash
- sudo service openvswitch-switch stop
- sudo rm -rf /var/log/openvswitch/*
- sudo rm -rf /etc/openvswitch/conf.db
- sudo service openvswitch-switch start
#
- 3) make sure you have curl installed in the system where this script is ran
#
- 4) do "sudo ovs-vsctl show" and make sure there are no bridges and OVS is not
- connected to ODL yet. An example of what it should look like is below:
#
- $ sudo ovs-vsctl show
- 5c012e23-b5a1-45d4-9a2e-865a3f81c59e
- ovs_version: "2.3.0"
- $
#
- 5) change ODL_IP below to the ip address of where ODL is running
#
- 6) run this script. It will:
#
- - explicitly create bridge br-ex;
- - connect to ODL
- - sleep, so odl is given time to create br-int
- - create neutron network
- - add an ovs port
#
- 7) if bug is reproduced, you will notive that while there is a patch-port in
- br-int, a patch port in br-ex is not created. Doing this will work around the bug
#
- sudo ovs-vsctl add-port br-ex patch-int – set interface patch-int type=patch – set interface patch-int options:peer=patch-ext
|
|
Attachment bug3545.sh has been added with description: bug3545.sh
|
|
draft patch uploaded at https://git.opendaylight.org/gerrit/#/c/24364/
|
|
gerrit on stable/lithium: https://git.opendaylight.org/gerrit/#/c/25204/
|
|
master : https://git.opendaylight.org/gerrit/#/c/24364/3
|
Generated at Wed Feb 07 20:35:41 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.