ovs: Fix OVS path mismatch when building from source with OVN
compile_ovswas called with--localstatedir=/var, causing all compiled OVS binaries to hardcode/var/run/openvswitchas the default runtime directory. However, theovn_agentplugin derivesOVS_RUNDIRfromOVS_PREFIXas/usr/local/var/run/openvswitch, creating a path mismatch that makesovs-vsctlunable to reach the runningovsdb-server.Additionally,
start_new_ovswas unconditionally starting OVS during the install phase. When OVN is the backend,ovn_agent:_start_ovslater starts its own OVS instance with a separate database, but the orphanedovs-vswitchdfromstart_new_ovsstill holds the kernel datapath, preventing bridge creation.Fix both issues:
- Remove the
--localstatedir=/varoverride so the compiled default matchesOVS_RUNDIR(autotools defaults localstatedir to${prefix}/var).- Skip
start_new_ovswhen OVN services are enabled, since_start_ovshandles the full OVS lifecycle.- Fix the hardcoded DB path in
start_new_ovsto match the compiled--prefix=/usr/localsysconfdir.Closes-Bug: #2158954 Assisted-By: Claude Opus 4.6 Signed-off-by: Rodolfo Alonso Hernandez ralonsoh@redhat.com Change-Id: I8f3a2c5e7d1b4a9f6e0c3d8b2a5f7e1d4c6b9a0e
版权所有:中国计算机学会技术支持:开源发展技术委员会
京ICP备13000930号-9
京公网安备 11010802047560号