diff options
author | Devan Goodwin <dgoodwin@redhat.com> | 2017-01-06 15:14:19 -0400 |
---|---|---|
committer | Devan Goodwin <dgoodwin@redhat.com> | 2017-01-18 10:40:21 -0400 |
commit | 362a4eafc1ae9122f98adb5b96ad86ca39529c96 (patch) | |
tree | 4c47d115cc3fa0ec9ceb9935cc6270ec9c9d6cec | |
parent | 1f7ff637a1e5413e2a8d8fe19ffb28b373243e6f (diff) | |
download | openshift-362a4eafc1ae9122f98adb5b96ad86ca39529c96.tar.gz openshift-362a4eafc1ae9122f98adb5b96ad86ca39529c96.tar.bz2 openshift-362a4eafc1ae9122f98adb5b96ad86ca39529c96.tar.xz openshift-362a4eafc1ae9122f98adb5b96ad86ca39529c96.zip |
Perform master upgrades in a single play serially.
-rw-r--r-- | playbooks/byo/openshift-master/restart.yml | 12 | ||||
-rw-r--r-- | playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml | 29 | ||||
-rw-r--r-- | playbooks/common/openshift-master/restart.yml | 11 |
3 files changed, 24 insertions, 28 deletions
diff --git a/playbooks/byo/openshift-master/restart.yml b/playbooks/byo/openshift-master/restart.yml index b6cebe829..b60807a71 100644 --- a/playbooks/byo/openshift-master/restart.yml +++ b/playbooks/byo/openshift-master/restart.yml @@ -17,4 +17,14 @@ - include: ../../common/openshift-cluster/evaluate_groups.yml - include: ../../common/openshift-master/validate_restart.yml -- include: ../../common/openshift-master/restart.yml + +- name: Restart masters + hosts: oo_masters_to_config + vars: + openshift_master_ha: "{{ groups.oo_masters_to_config | length > 1 }}" + serial: 1 + tasks: + - include: restart_hosts.yml + when: openshift.common.rolling_restart_mode == 'system' + - include: restart_services.yml + when: openshift.common.rolling_restart_mode == 'services' diff --git a/playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml b/playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml index 6950b6166..7f738ea0f 100644 --- a/playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml +++ b/playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml @@ -30,14 +30,6 @@ - name: Upgrade and backup etcd include: ./etcd/main.yml -- name: Upgrade master packages - hosts: oo_masters_to_config - roles: - - openshift_facts - tasks: - - include: rpm_upgrade.yml component=master - when: not openshift.common.is_containerized | bool - # Create service signer cert when missing. Service signer certificate # is added to master config in the master config hook for v3_3. - name: Determine if service signer cert must be created @@ -59,14 +51,20 @@ roles: - openshift_master_facts -- name: Upgrade master config and systemd units +- name: Upgrade master hosts: oo_masters_to_config + vars: + openshift_master_ha: "{{ groups.oo_masters_to_config | length > 1 }}" + serial: 1 handlers: - include: ../../../../roles/openshift_master/handlers/main.yml static: yes roles: - openshift_facts post_tasks: + - include: rpm_upgrade.yml component=master + when: not openshift.common.is_containerized | bool + - include_vars: ../../../../roles/openshift_master_facts/vars/main.yml - include: upgrade_scheduler.yml @@ -104,9 +102,12 @@ state: link when: ca_crt_stat.stat.isreg and not ca_bundle_stat.stat.exists -- name: Set master update status to complete - hosts: oo_masters_to_config - tasks: + - include: ../../openshift-master/restart_hosts.yml + when: openshift.common.rolling_restart_mode == 'system' + + - include: ../../openshift-master/restart_services.yml + when: openshift.common.rolling_restart_mode == 'services' + - set_fact: master_update_complete: True @@ -128,10 +129,6 @@ msg: "Upgrade cannot continue. The following masters did not finish updating: {{ master_update_failed | join(',') }}" when: master_update_failed | length > 0 -# We are now ready to restart master services (or entire system -# depending on openshift_rolling_restart_mode): -- include: ../../openshift-master/restart.yml - ############################################################################### # Reconcile Cluster Roles, Cluster Role Bindings and Security Context Constraints ############################################################################### diff --git a/playbooks/common/openshift-master/restart.yml b/playbooks/common/openshift-master/restart.yml deleted file mode 100644 index 6fb35f25c..000000000 --- a/playbooks/common/openshift-master/restart.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -- name: Restart masters - hosts: oo_masters_to_config - vars: - openshift_master_ha: "{{ groups.oo_masters_to_config | length > 1 }}" - serial: 1 - tasks: - - include: restart_hosts.yml - when: openshift.common.rolling_restart_mode == 'system' - - include: restart_services.yml - when: openshift.common.rolling_restart_mode == 'services' |