Browse Source

Bug 1554828- Nodes are now labeled compute after other labels have been applied

Fabian von Feilitzsch 7 years ago
parent
commit
72cc39c57c

+ 12 - 0
playbooks/common/openshift-cluster/upgrades/v3_9/label_nodes.yml

@@ -1,5 +1,17 @@
 ---
 
+- name: Update master/infra lables
+  hosts: oo_masters_to_config
+  roles:
+    - openshift_facts
+    - lib_openshift
+  tasks:
+    - import_role:
+        name: openshift_manage_node
+        tasks_from: config.yml
+      vars:
+        openshift_master_host: '{{ groups.oo_first_master.0 }}'
+
 - name: Update node labels to differentiate from (now-schedulable) masters
   hosts: oo_first_master
   roles:

+ 0 - 2
roles/openshift_manage_node/tasks/config.yml

@@ -25,5 +25,3 @@
     l_node_labels: "{{ openshift_node_labels | default({}) }}"
     l_master_labels: "{{ openshift_manage_node_is_master | ternary(openshift_master_node_labels, {}) }}"
     l_all_labels: "{{ l_node_labels | combine(l_master_labels) }}"
-
-- import_tasks: set_default_node_role.yml

+ 1 - 0
roles/openshift_manage_node/tasks/main.yml

@@ -35,3 +35,4 @@
   delegate_to: "{{ openshift_master_host }}"
 
 - include_tasks: config.yml
+- include_tasks: set_default_node_role.yml

+ 1 - 0
roles/openshift_manage_node/tasks/set_default_node_role.yml

@@ -1,6 +1,7 @@
 ---
 
 - delegate_to: '{{ openshift_master_host }}'
+  run_once: true
   block:
     - name: Retrieve non-infra, non-master nodes that are not yet labeled compute
       oc_obj: