Przeglądaj źródła

Nuage changes to add custom mounts for atomic-openshift-node service

Rohan Parulekar 7 lat temu
rodzic
commit
cf7f47d7b6

+ 1 - 1
roles/nuage_node/handlers/main.yaml

@@ -1,7 +1,7 @@
 ---
 - name: restart node
   become: yes
-  systemd: name={{ openshift.common.service_type }}-node state=restarted
+  systemd: name={{ openshift.common.service_type }}-node daemon-reload=yes state=restarted
 
 - name: save iptable rules
   become: yes

+ 5 - 0
roles/nuage_node/tasks/main.yaml

@@ -33,6 +33,11 @@
 
 - include: certificates.yml
 
+- name: Add additional Docker mounts for Nuage for atomic hosts
+  become: yes
+  lineinfile: dest="{{ openshift_atomic_node_config_file }}" line="{{ nuage_atomic_docker_additional_mounts }}"
+  when: openshift.common.is_atomic | bool
+
 - name: Restart node services
   command: /bin/true
   notify:

+ 2 - 0
roles/nuage_node/vars/main.yaml

@@ -23,3 +23,5 @@ cni_conf_dir: "/etc/cni/net.d/"
 cni_bin_dir: "/opt/cni/bin/"
 
 nuage_plugin_crt_dir: /usr/share/vsp-openshift
+openshift_atomic_node_config_file: /etc/sysconfig/{{ openshift.common.service_type }}-node
+nuage_atomic_docker_additional_mounts: "DOCKER_ADDTL_BIND_MOUNTS=-v /var/usr/share/vsp-openshift:/var/usr/share/vsp-openshift -v /etc/default:/etc/default -v /var/run:/var/run -v /opt/cni/bin:/opt/cni/bin -v /etc/cni/net.d:/etc/cni/net.d"