From 96f3091836c9af9a2b2ad3a4fd3ffb69b416503c Mon Sep 17 00:00:00 2001 From: Farhan Nomani Date: Mon, 18 Mar 2019 11:05:54 +0530 Subject: [PATCH 1/5] Added documentation to add the ISCSI IPs from properties file --- ansible_3par_docker_plugin/README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/ansible_3par_docker_plugin/README.md b/ansible_3par_docker_plugin/README.md index 94212b60..c5e4c726 100644 --- a/ansible_3par_docker_plugin/README.md +++ b/ansible_3par_docker_plugin/README.md @@ -52,6 +52,7 @@ These playbooks perform the following tasks on the Master/Worker nodes as define | ```ssh_hosts_key_file``` | No | ```~/.ssh/id_rsa.pub``` | Path to hosts key file | | ```quorum_witness_ip``` | No | No default value | Quorum witness IP | | ```mount_prefix``` | No | No default value | Alternate mount path prefix | + | ```hpe3par_iscsi_ips``` | No | No default value | Comma separated iscsi IPs. If not provided, all iscsi IPs will be read from the array and populated in hpe.conf | | ```replication_device``` | No | No default value | Replication backend properties | - It is recommended that the properties file is [encrypted using Ansible Vault](/ansible_3par_docker_plugin/encrypt_properties.md). From d42384d5f7e5f0aa5b51d503a6889039e6e37432 Mon Sep 17 00:00:00 2001 From: Farhan Nomani Date: Mon, 18 Mar 2019 12:07:42 +0530 Subject: [PATCH 2/5] Removed inadvenrent change --- ansible_3par_docker_plugin/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/ansible_3par_docker_plugin/README.md b/ansible_3par_docker_plugin/README.md index c5e4c726..94212b60 100644 --- a/ansible_3par_docker_plugin/README.md +++ b/ansible_3par_docker_plugin/README.md @@ -52,7 +52,6 @@ These playbooks perform the following tasks on the Master/Worker nodes as define | ```ssh_hosts_key_file``` | No | ```~/.ssh/id_rsa.pub``` | Path to hosts key file | | ```quorum_witness_ip``` | No | No default value | Quorum witness IP | | ```mount_prefix``` | No | No default value | Alternate mount path prefix | - | ```hpe3par_iscsi_ips``` | No | No default value | Comma separated iscsi IPs. If not provided, all iscsi IPs will be read from the array and populated in hpe.conf | | ```replication_device``` | No | No default value | Replication backend properties | - It is recommended that the properties file is [encrypted using Ansible Vault](/ansible_3par_docker_plugin/encrypt_properties.md). From aa2ef6e4e1002839adf3ec292868befdaaa7fa24 Mon Sep 17 00:00:00 2001 From: Farhan Nomani Date: Mon, 18 Mar 2019 11:05:54 +0530 Subject: [PATCH 3/5] Added documentation to add the ISCSI IPs from properties file --- ansible_3par_docker_plugin/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible_3par_docker_plugin/README.md b/ansible_3par_docker_plugin/README.md index 2d680962..3f6dcc4b 100644 --- a/ansible_3par_docker_plugin/README.md +++ b/ansible_3par_docker_plugin/README.md @@ -54,7 +54,7 @@ These playbooks perform the following tasks on the Master/Worker nodes as define | ```mount_prefix``` | No | No default value | Alternate mount path prefix | | ```hpe3par_iscsi_ips``` | No | No default value | Comma separated iscsi IPs. If not provided, all iscsi IPs will be read from the array and populated in hpe.conf | | ```vlan_tag``` | No | False | Populates the iscsi_ips which are vlan tagged, only applicable if ```hpe3par_iscsi_ips``` is not specified | - | ```replication_device``` | No | No default value | Replication backend properties | + - It is recommended that the properties file is [encrypted using Ansible Vault](/ansible_3par_docker_plugin/encrypt_properties.md). From c576f82d988c5d22fec755986eb024f8434f623d Mon Sep 17 00:00:00 2001 From: Farhan Nomani Date: Mon, 18 Mar 2019 12:07:42 +0530 Subject: [PATCH 4/5] Removed inadvenrent change --- ansible_3par_docker_plugin/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible_3par_docker_plugin/README.md b/ansible_3par_docker_plugin/README.md index 3f6dcc4b..2d680962 100644 --- a/ansible_3par_docker_plugin/README.md +++ b/ansible_3par_docker_plugin/README.md @@ -54,7 +54,7 @@ These playbooks perform the following tasks on the Master/Worker nodes as define | ```mount_prefix``` | No | No default value | Alternate mount path prefix | | ```hpe3par_iscsi_ips``` | No | No default value | Comma separated iscsi IPs. If not provided, all iscsi IPs will be read from the array and populated in hpe.conf | | ```vlan_tag``` | No | False | Populates the iscsi_ips which are vlan tagged, only applicable if ```hpe3par_iscsi_ips``` is not specified | - + | ```replication_device``` | No | No default value | Replication backend properties | - It is recommended that the properties file is [encrypted using Ansible Vault](/ansible_3par_docker_plugin/encrypt_properties.md). From 8457dc69fd466855f2e07b02ca7d46977444620e Mon Sep 17 00:00:00 2001 From: Farhan Nomani Date: Mon, 22 Apr 2019 17:31:45 +0530 Subject: [PATCH 5/5] Retrying with kubeconfig file if doryd service fails using admin.conf --- .../tasks/configure_doryd_service.yml | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/ansible_3par_docker_plugin/tasks/configure_doryd_service.yml b/ansible_3par_docker_plugin/tasks/configure_doryd_service.yml index 7290cc3e..eb606910 100644 --- a/ansible_3par_docker_plugin/tasks/configure_doryd_service.yml +++ b/ansible_3par_docker_plugin/tasks/configure_doryd_service.yml @@ -14,3 +14,34 @@ daemon_reload: yes enabled: yes name: doryd.service + + - name: collect facts about system services + service_facts: + register: services_state + + - name: If the service failed to start, use another kubeconfig + ini_file: + path: /etc/systemd/system/doryd.service + section: Service + option: ExecStart + value: /usr/libexec/kubernetes/kubelet-plugins/volume/exec/hpe.com~hpe/doryd /etc/origin/master/admin.kubeconfig hpe.com + when: services_state['ansible_facts']['services']['doryd.service']['state'] == "stopped" + + - name: restart doryd service, also issue daemon-reload to pick up config changes + systemd: + state: started + daemon_reload: yes + enabled: yes + name: doryd.service + when: services_state['ansible_facts']['services']['doryd.service']['state'] == "stopped" + + - name: Getting the status of the service + service_facts: + register: services_state_2 + when: services_state['ansible_facts']['services']['doryd.service']['state'] == "stopped" + + - name: Fail if the service fails to start + fail: + msg: "Failed to start doryd service" + when: services_state['ansible_facts']['services']['doryd.service']['state'] == "stopped" and services_state_2['ansible_facts']['services']['doryd.service']['state'] == "stopped" +