Jelajahi Sumber

Merge pull request #10102 from jmencak/tuned-sync-piggyback

Reload tuned service when node-config.yaml has changed.
OpenShift Merge Robot 6 tahun lalu
induk
melakukan
850609ea5b
1 mengubah file dengan 14 tambahan dan 0 penghapusan
  1. 14 0
      roles/openshift_node_group/files/sync.yaml

+ 14 - 0
roles/openshift_node_group/files/sync.yaml

@@ -114,6 +114,7 @@ spec:
             # detect whether the node-config.yaml has changed, and if so trigger a restart of the kubelet.
             md5sum /etc/origin/node/node-config.yaml > /tmp/.new
             if [[ "$( cat /tmp/.old )" != "$( cat /tmp/.new )" ]]; then
+              SYSTEMD_IGNORE_CHROOT=1 systemctl restart tuned || :
               echo "info: Configuration changed, restarting kubelet" 2>&1
               # TODO: kubelet doesn't relabel nodes, best effort for now
               # https://github.com/kubernetes/kubernetes/issues/59314
@@ -164,6 +165,13 @@ spec:
         - mountPath: /etc/sysconfig
           name: host-sysconfig-node
           readOnly: true
+        - mountPath: /var/run/dbus
+          name: var-run-dbus
+          readOnly: true
+        - mountPath: /run/systemd/system
+          name: run-systemd-system
+          readOnly: true
+
 
       volumes:
       # In bootstrap mode, the host config contains information not easily available
@@ -174,3 +182,9 @@ spec:
       - name: host-sysconfig-node
         hostPath:
           path: /etc/sysconfig
+      - hostPath:
+          path: /var/run/dbus
+        name: var-run-dbus
+      - hostPath:
+          path: /run/systemd/system
+        name: run-systemd-system