diff options
author | Scott Dodson <sdodson@redhat.com> | 2017-01-19 09:21:29 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-19 09:21:29 -0500 |
commit | b3f0b74e6fd07d2148b896ef572ea4d9cd025371 (patch) | |
tree | e0e13b66a6f6052ab641b5febad89e94e53e4fd8 /playbooks/common | |
parent | f185fa6ce66a25b8f44c81aa963e0c27e2742586 (diff) | |
parent | 362a4eafc1ae9122f98adb5b96ad86ca39529c96 (diff) | |
download | openshift-b3f0b74e6fd07d2148b896ef572ea4d9cd025371.tar.gz openshift-b3f0b74e6fd07d2148b896ef572ea4d9cd025371.tar.bz2 openshift-b3f0b74e6fd07d2148b896ef572ea4d9cd025371.tar.xz openshift-b3f0b74e6fd07d2148b896ef572ea4d9cd025371.zip |
Merge pull request #3057 from dgoodwin/serial-master-upgrade
Serial master upgrade
Diffstat (limited to 'playbooks/common')
-rw-r--r-- | playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml | 29 | ||||
-rw-r--r-- | playbooks/common/openshift-master/restart_services.yml | 6 | ||||
-rw-r--r-- | playbooks/common/openshift-master/validate_restart.yml (renamed from playbooks/common/openshift-master/restart.yml) | 13 |
3 files changed, 16 insertions, 32 deletions
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_services.yml b/playbooks/common/openshift-master/restart_services.yml index b40c32669..508b5a3ac 100644 --- a/playbooks/common/openshift-master/restart_services.yml +++ b/playbooks/common/openshift-master/restart_services.yml @@ -8,14 +8,14 @@ service: name: "{{ openshift.common.service_type }}-master-api" state: restarted - when: openshift_master_ha | bool and openshift.master.cluster_method != 'pacemaker' + when: openshift_master_ha | bool - name: Wait for master API to come back online wait_for: host: "{{ openshift.common.hostname }}" state: started delay: 10 port: "{{ openshift.master.api_port }}" - when: openshift_master_ha | bool and openshift.master.cluster_method != 'pacemaker' + when: openshift_master_ha | bool - name: Restart master controllers service: name: "{{ openshift.common.service_type }}-master-controllers" @@ -23,4 +23,4 @@ # Ignore errrors since it is possible that type != simple for # pre-3.1.1 installations. ignore_errors: true - when: openshift_master_ha | bool and openshift.master.cluster_method != 'pacemaker' + when: openshift_master_ha | bool diff --git a/playbooks/common/openshift-master/restart.yml b/playbooks/common/openshift-master/validate_restart.yml index 7b340887a..5dbb21502 100644 --- a/playbooks/common/openshift-master/restart.yml +++ b/playbooks/common/openshift-master/validate_restart.yml @@ -1,6 +1,4 @@ --- -- include: ../openshift-cluster/evaluate_groups.yml - - name: Validate configuration for rolling restart hosts: oo_masters_to_config roles: @@ -65,14 +63,3 @@ - set_fact: current_host: "{{ exists.stat.exists }}" when: openshift.common.rolling_restart_mode == 'system' - -- 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' |