From 4aebe739fb18fc150c00e6fdacfabee909fbbb24 Mon Sep 17 00:00:00 2001 From: Scott Dodson Date: Mon, 6 Feb 2017 13:36:11 -0500 Subject: Add excluder management to upgrade and config playbooks --- playbooks/common/openshift-cluster/config.yml | 4 ++++ playbooks/common/openshift-cluster/disable_excluder.yml | 11 +++++++++++ playbooks/common/openshift-cluster/reset_excluder.yml | 8 ++++++++ playbooks/common/openshift-cluster/upgrades/init.yml | 2 ++ .../common/openshift-cluster/upgrades/post_control_plane.yml | 4 ++++ playbooks/common/openshift-cluster/upgrades/upgrade_nodes.yml | 4 ++++ 6 files changed, 33 insertions(+) create mode 100644 playbooks/common/openshift-cluster/disable_excluder.yml create mode 100644 playbooks/common/openshift-cluster/reset_excluder.yml (limited to 'playbooks/common') diff --git a/playbooks/common/openshift-cluster/config.yml b/playbooks/common/openshift-cluster/config.yml index a0ba735ab..113b401f9 100644 --- a/playbooks/common/openshift-cluster/config.yml +++ b/playbooks/common/openshift-cluster/config.yml @@ -26,6 +26,10 @@ openshift_docker_selinux_enabled: "{{ lookup('oo_option', 'docker_selinux_enabled') }}" when: openshift_docker_selinux_enabled is not defined +- include: disable_excluder.yml + tags: + - always + - include: ../openshift-etcd/config.yml tags: - etcd diff --git a/playbooks/common/openshift-cluster/disable_excluder.yml b/playbooks/common/openshift-cluster/disable_excluder.yml new file mode 100644 index 000000000..eb146bab8 --- /dev/null +++ b/playbooks/common/openshift-cluster/disable_excluder.yml @@ -0,0 +1,11 @@ +--- +- name: Record excluder state and disable + hosts: l_oo_all_hosts + gather_facts: no + tasks: + - include_role: + name: openshift_excluder + tasks_from: status + - include_role: + name: openshift_excluder + tasks_from: unexclude diff --git a/playbooks/common/openshift-cluster/reset_excluder.yml b/playbooks/common/openshift-cluster/reset_excluder.yml new file mode 100644 index 000000000..fe86f4c23 --- /dev/null +++ b/playbooks/common/openshift-cluster/reset_excluder.yml @@ -0,0 +1,8 @@ +--- +- name: Re-enable excluder if it was previously enabled + hosts: l_oo_all_hosts + gather_facts: no + tasks: + - include_role: + name: openshift_excluder + tasks_from: reset diff --git a/playbooks/common/openshift-cluster/upgrades/init.yml b/playbooks/common/openshift-cluster/upgrades/init.yml index a3b8c489e..d2c8b1d20 100644 --- a/playbooks/common/openshift-cluster/upgrades/init.yml +++ b/playbooks/common/openshift-cluster/upgrades/init.yml @@ -55,6 +55,8 @@ - include: ../initialize_facts.yml +- include: ../disable_excluder.yml + - name: Ensure clean repo cache in the event repos have been changed manually hosts: oo_all_hosts tags: diff --git a/playbooks/common/openshift-cluster/upgrades/post_control_plane.yml b/playbooks/common/openshift-cluster/upgrades/post_control_plane.yml index 2bbcbe1f8..9f700423b 100644 --- a/playbooks/common/openshift-cluster/upgrades/post_control_plane.yml +++ b/playbooks/common/openshift-cluster/upgrades/post_control_plane.yml @@ -74,3 +74,7 @@ - name: Warn if pluginOrderOverride is in use in master-config.yaml debug: msg="WARNING pluginOrderOverride is being deprecated in master-config.yaml, please see https://docs.openshift.com/enterprise/latest/architecture/additional_concepts/admission_controllers.html for more information." when: not grep_plugin_order_override | skipped and grep_plugin_order_override.rc == 0 + +- include: ../reset_excluder.yml + tags: + - always diff --git a/playbooks/common/openshift-cluster/upgrades/upgrade_nodes.yml b/playbooks/common/openshift-cluster/upgrades/upgrade_nodes.yml index 59188c570..e45b635f7 100644 --- a/playbooks/common/openshift-cluster/upgrades/upgrade_nodes.yml +++ b/playbooks/common/openshift-cluster/upgrades/upgrade_nodes.yml @@ -51,3 +51,7 @@ until: node_sched.rc == 0 retries: 3 delay: 1 + +- include: ../reset_excluder.yml + tags: + - always -- cgit v1.2.3 From e27514ac435b13c7c507c0fcd73c1135547d37ca Mon Sep 17 00:00:00 2001 From: Scott Dodson Date: Mon, 6 Feb 2017 14:22:23 -0500 Subject: Move excluder disablement into control plane and node upgrade playbooks So that excluder is disabled and reset within the scope of each of those in addition to the overall playbook --- playbooks/common/openshift-cluster/upgrades/init.yml | 2 -- 1 file changed, 2 deletions(-) (limited to 'playbooks/common') diff --git a/playbooks/common/openshift-cluster/upgrades/init.yml b/playbooks/common/openshift-cluster/upgrades/init.yml index d2c8b1d20..a3b8c489e 100644 --- a/playbooks/common/openshift-cluster/upgrades/init.yml +++ b/playbooks/common/openshift-cluster/upgrades/init.yml @@ -55,8 +55,6 @@ - include: ../initialize_facts.yml -- include: ../disable_excluder.yml - - name: Ensure clean repo cache in the event repos have been changed manually hosts: oo_all_hosts tags: -- cgit v1.2.3