-
Bug
-
Resolution: Unresolved
-
Undefined
-
None
-
None
-
None
-
False
-
-
False
-
rhel-9
-
None
-
rhel-net-ovn
-
-
-
ssg_networking
Problem Description: Clearly explain the issue.
When ipam is configured (e.g. ovn-nbctl lsp-set-addresses swp1 "02:00:00:00:00:01 dynamic"), ovn-northd assigns an IP address.
However, northd might assign an already used IP address and write it to NB. In the following iteration (on notification of NB change), northd assigns a proper address.
So a wrong IP might be used by ovn-controller, for the duration of a northd loop.
Impact Assessment: Describe the severity and impact (e.g., network down,availability of a workaround, etc.).
Software Versions: Specify the exact versions in use (e.g.,openvswitch3.1-3.1.0-147.el8fdp).
ovn/main
Issue Type: Indicate whether this is a new issue or a regression (if a regression, state the last known working version).
This issue was introduced by 'northd: Incremental processing of LSPs IPAM in "northd" node.'
Reproducibility: Confirm if the issue can be reproduced consistently. If not, describe how often it occurs.
In common setups, difficult to reproduce - as only visible between two iterations of northd. But visible in NB logs. Also reproduced through the following unit test (a modified ipam router ports unit test).
Reproduction Steps: Provide detailed steps or scripts to replicate the issue.
OVN_FOR_EACH_NORTHD([ AT_SETUP([ipam router ports]) ovn_start check ovn-nbctl ls-add sw check ovn-nbctl set logical_switch sw other-config:subnet=192.168.1.0/24 for i in 2 3 4; do check ovn-nbctl lr-add ro$i check ovn-nbctl lsp-add sw swp$i sleep_northd check ovn-nbctl lsp-set-addresses swp$i "02:00:00:00:00:0$i dynamic" sleep_nb wake_up_northd sleep 1 sleep_northd wake_up_nb sleep 1 cidr=$(ovn-nbctl get logical_switch_port swp$i dynamic_addresses |cut -f2 -d' '|cut -f1 -d\") wake_up_northd check ovn-nbctl lrp-add ro$i rop$i 02:00:00:00:00:0$i $cidr/24 -- set logical_switch_port swp$i type=router options:router-port=rop$i addresses=router; AT_CHECK_UNQUOTED([ovn-nbctl get logical_router_port rop$i networks], [0], [[["192.168.1.$i/24"]] ]) done ovn-nbctl list logical_switch_port ovn-nbctl list logical_router_port AT_CLEANUP ])
with the following addition in ovn-macros.at
sleep_nb() {
echo NB going to sleep
AT_CHECK([kill -STOP $(cat ovn-nb/ovsdb-server.pid)])
on_exit "test -e ovn-nb/ovsdb-server.pid && kill -CONT $(cat ovn-nb/ovsdb-server.pid)"
}
wake_up_nb() {
echo NB waking up
AT_CHECK([kill -CONT $(cat ovn-nb/ovsdb-server.pid)])
}
Expected Behavior: Describe what should happen under normal circumstances.
Wrong (already used) IP should not be re-used.
Observed Behavior: Explain what actually happens.
Troubleshooting Actions: Outline the steps taken to diagnose or resolve the issue so far.