Skip to content

Commit ac1659f

Browse files
author
Rutvik Saptarshi
committed
added logic to run ovncontoller as ovn host service
1 parent 2f31811 commit ac1659f

3 files changed

Lines changed: 21 additions & 2 deletions

File tree

build-aux/build-rpms.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,12 @@ pf9_submodule_update
3737

3838
# --- OVN CONFIGURATION ---
3939
# RPM Version field does not allow hyphens; use dots throughout
40-
PF9_OVN_BUILD_VERSION=${OVN_BASE}.pf9.${PF9_VERSION}.${BUILD_NUMBER}.${ROCKY_VERSION}
40+
PF9_OVN_BUILD_VERSION=${OVN_BASE}.pf9.${PF9_VERSION}.${BUILD_NUMBER}
4141
printf '%s\n' "1:$PF9_OVN_BUILD_VERSION" > $TEAMCITY_ROOT/ovn-rpm-version.txt
4242

43+
# add the rocky version after writing to the file
44+
PF9_OVN_BUILD_VERSION=${PF9_OVN_BUILD_VERSION}.${ROCKY_VERSION}
45+
4346
# Update OVN configure.ac
4447
sed -i "s/__PF9_OVN_BUILD_VERSION__/${PF9_OVN_BUILD_VERSION}/g" "$ROOT/configure.ac"
4548

rhel/ovn-fedora.spec.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ for service in ovn-controller-vtep ovn-northd ovn-ic ovn-ic-db ovn-db@; do
172172
$RPM_BUILD_ROOT%{_unitdir}/${service}.service
173173
done
174174
install -p -D -m 0644 \
175-
rhel/usr_lib_systemd_system_ovn-controller.service \
175+
rhel/usr_lib_systemd_system_ovn-host.service \
176176
$RPM_BUILD_ROOT%{_unitdir}/ovn-host.service
177177

178178
rm -rf $RPM_BUILD_ROOT/%{_datadir}/openvswitch/python/
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# this service replaces ovn-controller service from the upstream build in the custom pf9 OVN build
2+
[Unit]
3+
Description=OVN controller daemon
4+
After=network.target
5+
Requires=openvswitch.service
6+
After=openvswitch.service
7+
8+
[Service]
9+
Type=forking
10+
Restart=on-failure
11+
EnvironmentFile=-/etc/sysconfig/ovn-host
12+
ExecStart=/usr/share/ovn/scripts/ovn-ctl --no-monitor --ovn-manage-ovsdb=no start_controller $OVN_CTL_OPTS
13+
ExecStop=/usr/share/ovn/scripts/ovn-ctl stop_controller --no-monitor
14+
15+
[Install]
16+
WantedBy=multi-user.target

0 commit comments

Comments
 (0)