From df51a7dddad9e6f93a24c3ec07a07a661e6e168a Mon Sep 17 00:00:00 2001 From: Brenton Leanhardt Date: Fri, 26 Jun 2015 15:04:56 -0400 Subject: delegate_to doesn't appear to be thread safe --- roles/openshift_node/tasks/main.yml | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'roles') diff --git a/roles/openshift_node/tasks/main.yml b/roles/openshift_node/tasks/main.yml index 13f30a6f8..770b55351 100644 --- a/roles/openshift_node/tasks/main.yml +++ b/roles/openshift_node/tasks/main.yml @@ -73,24 +73,3 @@ - name: Start and enable openshift-node service: name=openshift-node enabled=yes state=started - -- name: Check scheduleable state - delegate_to: "{{ openshift_first_master }}" - command: > - {{ openshift.common.client_binary }} get node {{ openshift.common.hostname }} - register: ond_get_node - until: ond_get_node.rc == 0 - retries: 10 - delay: 5 - -- name: Handle unscheduleable node - delegate_to: "{{ openshift_first_master }}" - command: > - {{ openshift.common.admin_binary }} manage-node {{ openshift.common.hostname }} --schedulable=false - when: openshift_scheduleable is defined and openshift_scheduleable == False and "SchedulingDisabled" not in ond_get_node.stdout - -- name: Handle scheduleable node - delegate_to: "{{ openshift_first_master }}" - command: > - {{ openshift.common.admin_binary }} manage-node {{ openshift.common.hostname }} --schedulable=true - when: (openshift_scheduleable is not defined or openshift_scheduleable == True) and "SchedulingDisabled" in ond_get_node.stdout -- cgit v1.2.3 From cde074730ed8278673498157008651d192c8236a Mon Sep 17 00:00:00 2001 From: Brenton Leanhardt Date: Fri, 26 Jun 2015 16:57:28 -0400 Subject: The manage_node commands should only run on the first master --- roles/openshift_manage_node/tasks/main.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 roles/openshift_manage_node/tasks/main.yml (limited to 'roles') diff --git a/roles/openshift_manage_node/tasks/main.yml b/roles/openshift_manage_node/tasks/main.yml new file mode 100644 index 000000000..d4c623f10 --- /dev/null +++ b/roles/openshift_manage_node/tasks/main.yml @@ -0,0 +1,11 @@ +- name: Handle unscheduleable node + delegate_to: "{{ openshift_first_master }}" + command: > + {{ openshift.common.admin_binary }} manage-node {{ item }} --schedulable=false + with_items: openshift_unscheduleable_nodes + +- name: Handle scheduleable node + delegate_to: "{{ openshift_first_master }}" + command: > + {{ openshift.common.admin_binary }} manage-node {{ item }} --schedulable=true + with_items: openshift_scheduleable_nodes -- cgit v1.2.3