Skip to content

Commit 5841367

Browse files
authored
Mount nmcli to avoid the version conflicts between host and OVS container (#295)
We are planning to upgrade the NCP base images from UBI 8 to UBI 9. In UBI 9, the NetworkManager version is newer than the host, that will cause the issue that the nmcli cannot work in the OVS container. So this patch will mount the host's nmcli to overwrite the existing one in the OVS container. In the future, we can try to not install NetworkManager in the container. Testing done: CIBot passed for UBI 9. (testrunid=4077352) (cherry picked from commit 224eab0)
1 parent f2e8b94 commit 5841367

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

manifest/kubernetes/rhel/ncp-rhel.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1218,6 +1218,10 @@ spec:
12181218
# This allows making network changes using nmcli
12191219
- name: dbus
12201220
mountPath: /var/run/dbus
1221+
- name: host-nmcli
1222+
mountPath: /usr/bin/nmcli
1223+
- name: host-libnm
1224+
mountPath: /usr/lib64/libnm.so.0
12211225
# To read ovs_uplink_port's ifcfg
12221226
- name: nscripts
12231227
mountPath: /host/etc/sysconfig/network-scripts
@@ -1287,6 +1291,12 @@ spec:
12871291
- name: nscripts
12881292
hostPath:
12891293
path: /etc/sysconfig/network-scripts
1294+
- name: host-nmcli
1295+
hostPath:
1296+
path: /bin/nmcli
1297+
- name: host-libnm
1298+
hostPath:
1299+
path: /usr/lib64/libnm.so.0
12901300

12911301

12921302

manifest/openshift4/coreos/ncp-openshift4.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,6 +1153,10 @@ spec:
11531153
# This allows making network changes using nmcli
11541154
- name: dbus
11551155
mountPath: /var/run/dbus
1156+
- name: host-nmcli
1157+
mountPath: /usr/bin/nmcli
1158+
- name: host-libnm
1159+
mountPath: /usr/lib64/libnm.so.0
11561160
# To read ovs_uplink_port's ifcfg
11571161
- name: nscripts
11581162
mountPath: /host/etc/sysconfig/network-scripts
@@ -1227,6 +1231,12 @@ spec:
12271231
- name: nscripts
12281232
hostPath:
12291233
path: /etc/sysconfig/network-scripts
1234+
- name: host-nmcli
1235+
hostPath:
1236+
path: /bin/nmcli
1237+
- name: host-libnm
1238+
hostPath:
1239+
path: /usr/lib64/libnm.so.0
12301240

12311241

12321242
- name: keepalived-conf-dir

0 commit comments

Comments
 (0)