diff --git a/dist/images/install.sh b/dist/images/install.sh index d04c060d11d..1300d302f64 100755 --- a/dist/images/install.sh +++ b/dist/images/install.sh @@ -3223,6 +3223,8 @@ spec: fieldPath: status.podIPs - name: ENABLE_BIND_LOCAL_IP value: "$ENABLE_BIND_LOCAL_IP" + - name: DBUS_SYSTEM_BUS_ADDRESS + value: "unix:path=/host/var/run/dbus/system_bus_socket" volumeMounts: - name: host-modules mountPath: /lib/modules @@ -3238,6 +3240,9 @@ spec: mountPropagation: Bidirectional - mountPath: /run/ovn name: host-run-ovn + - mountPath: /host/var/run/dbus + name: host-dbus + mountPropagation: HostToContainer - mountPath: /var/run/netns name: host-ns mountPropagation: Bidirectional @@ -3300,6 +3305,9 @@ spec: - name: host-ns hostPath: path: /var/run/netns + - name: host-dbus + hostPath: + path: /var/run/dbus - name: host-log-ovs hostPath: path: /var/log/openvswitch diff --git a/kubeovn-helm/templates/ovncni-ds.yaml b/kubeovn-helm/templates/ovncni-ds.yaml index f7111409ec0..302690c10dd 100644 --- a/kubeovn-helm/templates/ovncni-ds.yaml +++ b/kubeovn-helm/templates/ovncni-ds.yaml @@ -102,6 +102,8 @@ spec: fieldPath: status.podIPs - name: ENABLE_BIND_LOCAL_IP value: "{{- .Values.func.ENABLE_BIND_LOCAL_IP }}" + - name: DBUS_SYSTEM_BUS_ADDRESS + value: "unix:path=/host/var/run/dbus/system_bus_socket" volumeMounts: - name: host-modules mountPath: /lib/modules @@ -117,6 +119,9 @@ spec: mountPropagation: Bidirectional - mountPath: /run/ovn name: host-run-ovn + - mountPath: /host/var/run/dbus + name: host-dbus + mountPropagation: HostToContainer - mountPath: /var/run/netns name: host-ns mountPropagation: HostToContainer @@ -179,6 +184,9 @@ spec: - name: host-ns hostPath: path: /var/run/netns + - name: host-dbus + hostPath: + path: /var/run/dbus - name: kube-ovn-log hostPath: path: /var/log/kube-ovn diff --git a/pkg/daemon/init_linux.go b/pkg/daemon/init_linux.go index 51338dc67fb..c8a38a8c741 100644 --- a/pkg/daemon/init_linux.go +++ b/pkg/daemon/init_linux.go @@ -39,6 +39,7 @@ func nmSetManaged(device string, managed bool) error { return nil } + klog.Infof(`setting device %s NetworkManager property "managed" to %v`, device, managed) if err = d.SetPropertyManaged(managed); err != nil { klog.Errorf("failed to set device property managed to %v: %v", managed, err) return err @@ -97,7 +98,7 @@ func changeProvideNicName(current, target string) (bool, error) { // set link unmanaged by NetworkManager if err = nmSetManaged(current, false); err != nil { - klog.Errorf("failed set device %s to unmanaged by NetworkManager: %v", current, err) + klog.Errorf("failed set device %s unmanaged by NetworkManager: %v", current, err) return false, err } diff --git a/pkg/daemon/ovs_linux.go b/pkg/daemon/ovs_linux.go index 1ecde1618df..910175ce5d7 100644 --- a/pkg/daemon/ovs_linux.go +++ b/pkg/daemon/ovs_linux.go @@ -906,7 +906,7 @@ func configProviderNic(nicName, brName string) (int, error) { // set link unmanaged by NetworkManager if err = nmSetManaged(nicName, false); err != nil { - klog.Errorf("failed set device %s to unmanaged by NetworkManager: %v", nicName, err) + klog.Errorf("failed set device %s unmanaged by NetworkManager: %v", nicName, err) return 0, err } diff --git a/yamls/kube-ovn.yaml b/yamls/kube-ovn.yaml index b629fd52a98..2c0f840ff4f 100644 --- a/yamls/kube-ovn.yaml +++ b/yamls/kube-ovn.yaml @@ -190,6 +190,8 @@ spec: valueFrom: fieldRef: fieldPath: status.podIPs + - name: DBUS_SYSTEM_BUS_ADDRESS + value: "unix:path=/host/var/run/dbus/system_bus_socket" volumeMounts: - name: host-modules mountPath: /lib/modules @@ -202,6 +204,9 @@ spec: name: host-run-ovs - mountPath: /run/ovn name: host-run-ovn + - mountPath: /host/var/run/dbus + name: host-dbus + mountPropagation: HostToContainer - mountPath: /var/run/netns name: host-ns mountPropagation: HostToContainer @@ -259,6 +264,9 @@ spec: - name: host-ns hostPath: path: /var/run/netns + - name: host-dbus + hostPath: + path: /var/run/dbus - name: host-log-ovs hostPath: path: /var/log/openvswitch