diff options
Diffstat (limited to 'playbooks/common/openshift-cluster/upgrades')
36 files changed, 167 insertions, 1274 deletions
| diff --git a/playbooks/common/openshift-cluster/upgrades/docker/docker_upgrade.yml b/playbooks/common/openshift-cluster/upgrades/docker/docker_upgrade.yml index 98953f72e..6d4ddf011 100644 --- a/playbooks/common/openshift-cluster/upgrades/docker/docker_upgrade.yml +++ b/playbooks/common/openshift-cluster/upgrades/docker/docker_upgrade.yml @@ -1,5 +1,5 @@  --- -- include: ../../evaluate_groups.yml +- include: ../../../../init/evaluate_groups.yml    vars:      # Do not allow adding hosts during upgrade.      g_new_master_hosts: [] diff --git a/playbooks/common/openshift-cluster/upgrades/init.yml b/playbooks/common/openshift-cluster/upgrades/init.yml index 2826951e6..9981d905b 100644 --- a/playbooks/common/openshift-cluster/upgrades/init.yml +++ b/playbooks/common/openshift-cluster/upgrades/init.yml @@ -1,15 +1,20 @@  --- -- include: ../evaluate_groups.yml +- include: ../../../init/evaluate_groups.yml    vars:      # Do not allow adding hosts during upgrade.      g_new_master_hosts: []      g_new_node_hosts: [] -- include: ../initialize_facts.yml +- include: ../../../init/facts.yml  - name: Ensure firewall is not switched during upgrade    hosts: oo_all_hosts +  vars: +    openshift_master_installed_version: "{{ hostvars[groups.oo_first_master.0].openshift.common.version }}"    tasks: +  - name: set currently installed version +    set_fact: +      openshift_currently_installed_version: "{{ openshift_master_installed_version }}"    - name: Check if iptables is running      command: systemctl status iptables      changed_when: false diff --git a/playbooks/common/openshift-cluster/upgrades/post_control_plane.yml b/playbooks/common/openshift-cluster/upgrades/post_control_plane.yml index 122066955..c634e0ab8 100644 --- a/playbooks/common/openshift-cluster/upgrades/post_control_plane.yml +++ b/playbooks/common/openshift-cluster/upgrades/post_control_plane.yml @@ -85,6 +85,8 @@    roles:    - openshift_manageiq +  - role: openshift_project_request_template +    when: openshift_project_request_template_manage    # Create the new templates shipped in 3.2, existing templates are left    # unmodified. This prevents the subsequent role definition for    # openshift_examples from failing when trying to replace templates that do @@ -117,7 +119,6 @@    - name: grep pluginOrderOverride      command: grep pluginOrderOverride {{ openshift.common.config_base }}/master/master-config.yaml      register: grep_plugin_order_override -    when: openshift.common.version_gte_3_3_or_1_3 | bool      changed_when: false      failed_when: false diff --git a/playbooks/common/openshift-cluster/upgrades/pre/verify_control_plane_running.yml b/playbooks/common/openshift-cluster/upgrades/pre/verify_control_plane_running.yml index 45022cd61..6a5bc24f7 100644 --- a/playbooks/common/openshift-cluster/upgrades/pre/verify_control_plane_running.yml +++ b/playbooks/common/openshift-cluster/upgrades/pre/verify_control_plane_running.yml @@ -9,16 +9,29 @@        local_facts:          ha: "{{ groups.oo_masters_to_config | length > 1 }}" -  - name: Ensure HA Master is running -    service: -      name: "{{ openshift.common.service_type }}-master-api" -      state: started -      enabled: yes -    when: openshift.common.is_containerized | bool +  - when: openshift.common.is_containerized | bool +    block: +    - set_fact: +        master_services: +        - "{{ openshift.common.service_type }}-master" -  - name: Ensure HA Master is running -    service: -      name: "{{ openshift.common.service_type }}-master-controllers" -      state: started -      enabled: yes -    when: openshift.common.is_containerized | bool +    # In case of the non-ha to ha upgrade. +    - name: Check if the {{ openshift.common.service_type }}-master-api.service exists +      command: > +        systemctl list-units {{ openshift.common.service_type }}-master-api.service --no-legend +      register: master_api_service_status + +    - set_fact: +        master_services: +        - "{{ openshift.common.service_type }}-master-api" +        - "{{ openshift.common.service_type }}-master-controllers" +      when: +      - master_api_service_status.stdout_lines | length > 0 +      - (openshift.common.service_type + '-master-api.service') in master_api_service_status.stdout_lines[0] + +    - name: Ensure Master is running +      service: +        name: "{{ item }}" +        state: started +        enabled: yes +      with_items: "{{ master_services }}" diff --git a/playbooks/common/openshift-cluster/upgrades/pre/verify_upgrade_targets.yml b/playbooks/common/openshift-cluster/upgrades/pre/verify_upgrade_targets.yml index 142ce5f3d..13fa37b09 100644 --- a/playbooks/common/openshift-cluster/upgrades/pre/verify_upgrade_targets.yml +++ b/playbooks/common/openshift-cluster/upgrades/pre/verify_upgrade_targets.yml @@ -4,6 +4,12 @@      msg: Verify OpenShift is already installed    when: openshift.common.version is not defined +- name: Update oreg_auth docker login credentials if necessary +  include_role: +    name: docker +    tasks_from: registry_auth.yml +  when: oreg_auth_user is defined +  - name: Verify containers are available for upgrade    command: >      docker pull {{ openshift.common.cli_image }}:{{ openshift_image_tag }} @@ -37,7 +43,7 @@      fail:        msg: "OpenShift {{ avail_openshift_version }} is available, but {{ openshift_upgrade_target }} or greater is required"      when: -    - openshift_pkg_version | default('0.0', True) | version_compare(openshift_release, '<') +    - (openshift_pkg_version | default('-0.0', True)).split('-')[1] | version_compare(openshift_release, '<')  - name: Fail when openshift version does not meet minium requirement for Origin upgrade    fail: diff --git a/playbooks/common/openshift-cluster/upgrades/rpm_upgrade.yml b/playbooks/common/openshift-cluster/upgrades/rpm_upgrade.yml deleted file mode 100644 index 8cc46ab68..000000000 --- a/playbooks/common/openshift-cluster/upgrades/rpm_upgrade.yml +++ /dev/null @@ -1,38 +0,0 @@ ---- -# When we update package "a-${version}" and a requires b >= ${version} if we -# don't specify the version of b yum will choose the latest version of b -# available and the whole set of dependencies end up at the latest version. -# Since the package module, unlike the yum module, doesn't flatten a list -# of packages into one transaction we need to do that explicitly. The ansible -# core team tells us not to rely on yum module transaction flattening anyway. - -# TODO: If the sdn package isn't already installed this will install it, we -# should fix that -- name: Upgrade master packages -  package: name={{ master_pkgs | join(',') }} state=present -  vars: -    master_pkgs: -      - "{{ openshift.common.service_type }}{{ openshift_pkg_version }}" -      - "{{ openshift.common.service_type }}-master{{ openshift_pkg_version }}" -      - "{{ openshift.common.service_type }}-node{{ openshift_pkg_version }}" -      - "{{ openshift.common.service_type }}-sdn-ovs{{ openshift_pkg_version }}" -      - "{{ openshift.common.service_type }}-clients{{ openshift_pkg_version }}" -      - "tuned-profiles-{{ openshift.common.service_type }}-node{{ openshift_pkg_version }}" -      - PyYAML -  when: -    - component == "master" -    - not openshift.common.is_atomic | bool - -- name: Upgrade node packages -  package: name={{ node_pkgs | join(',') }} state=present -  vars: -    node_pkgs: -      - "{{ openshift.common.service_type }}{{ openshift_pkg_version }}" -      - "{{ openshift.common.service_type }}-node{{ openshift_pkg_version }}" -      - "{{ openshift.common.service_type }}-sdn-ovs{{ openshift_pkg_version }}" -      - "{{ openshift.common.service_type }}-clients{{ openshift_pkg_version }}" -      - "tuned-profiles-{{ openshift.common.service_type }}-node{{ openshift_pkg_version }}" -      - PyYAML -  when: -    - component == "node" -    - not openshift.common.is_atomic | bool diff --git a/playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml b/playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml index c37a5f9ab..399b818a7 100644 --- a/playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml +++ b/playbooks/common/openshift-cluster/upgrades/upgrade_control_plane.yml @@ -3,22 +3,6 @@  # Upgrade Masters  ############################################################################### -# oc adm migrate storage should be run prior to etcd v3 upgrade -# See: https://github.com/openshift/origin/pull/14625#issuecomment-308467060 -- name: Pre master upgrade - Upgrade all storage -  hosts: oo_first_master -  tasks: -  - name: Upgrade all storage -    command: > -      {{ openshift.common.client_binary }} adm --config={{ openshift.common.config_base }}/master/admin.kubeconfig -      migrate storage --include=* --confirm -    register: l_pb_upgrade_control_plane_pre_upgrade_storage -    when: openshift_upgrade_pre_storage_migration_enabled | default(true) | bool -    failed_when: -    - openshift_upgrade_pre_storage_migration_enabled | default(true) | bool -    - l_pb_upgrade_control_plane_pre_upgrade_storage.rc != 0 -    - openshift_upgrade_pre_storage_migration_fatal | default(true) | bool -  # If facts cache were for some reason deleted, this fact may not be set, and if not set  # it will always default to true. This causes problems for the etcd data dir fact detection  # so we must first make sure this is set correctly before attempting the backup. @@ -48,6 +32,22 @@  - include: create_service_signer_cert.yml +# oc adm migrate storage should be run prior to etcd v3 upgrade +# See: https://github.com/openshift/origin/pull/14625#issuecomment-308467060 +- name: Pre master upgrade - Upgrade all storage +  hosts: oo_first_master +  tasks: +  - name: Upgrade all storage +    command: > +      {{ openshift.common.client_binary }} adm --config={{ openshift.common.config_base }}/master/admin.kubeconfig +      migrate storage --include=* --confirm +    register: l_pb_upgrade_control_plane_pre_upgrade_storage +    when: openshift_upgrade_pre_storage_migration_enabled | default(true) | bool +    failed_when: +    - openshift_upgrade_pre_storage_migration_enabled | default(true) | bool +    - l_pb_upgrade_control_plane_pre_upgrade_storage.rc != 0 +    - openshift_upgrade_pre_storage_migration_fatal | default(true) | bool +  # Set openshift_master_facts separately. In order to reconcile  # admission_config's, we currently must run openshift_master_facts and  # then run openshift_facts. @@ -63,13 +63,9 @@    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 -  - lib_utils -  post_tasks: +  tasks: +  - include_role: +      name: openshift_facts    # Run the pre-upgrade hook if defined:    - debug: msg="Running master pre-upgrade hook {{ openshift_master_upgrade_pre_hook }}" @@ -78,52 +74,9 @@    - include: "{{ openshift_master_upgrade_pre_hook }}"      when: openshift_master_upgrade_pre_hook is defined -  - 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 - -  - include: "{{ master_config_hook }}" -    when: master_config_hook is defined - -  - include_vars: ../../../../roles/openshift_master/vars/main.yml - -  - name: Remove any legacy systemd units and update systemd units -    include: ../../../../roles/openshift_master/tasks/systemd_units.yml - -  - name: Check for ca-bundle.crt -    stat: -      path: "{{ openshift.common.config_base }}/master/ca-bundle.crt" -    register: ca_bundle_stat -    failed_when: false - -  - name: Check for ca.crt -    stat: -      path: "{{ openshift.common.config_base }}/master/ca.crt" -    register: ca_crt_stat -    failed_when: false - -  - name: Migrate ca.crt to ca-bundle.crt -    command: mv ca.crt ca-bundle.crt -    args: -      chdir: "{{ openshift.common.config_base }}/master" -    when: ca_crt_stat.stat.isreg and not ca_bundle_stat.stat.exists - -  - name: Link ca.crt to ca-bundle.crt -    file: -      src: "{{ openshift.common.config_base }}/master/ca-bundle.crt" -      path: "{{ openshift.common.config_base }}/master/ca.crt" -      state: link -    when: ca_crt_stat.stat.isreg and not ca_bundle_stat.stat.exists - -  - name: Update oreg value -    yedit: -      src: "{{ openshift.common.config_base }}/master/master-config.yaml" -      key: 'imageConfig.format' -      value: "{{ oreg_url | default(oreg_url_master) }}" -    when: oreg_url is defined or oreg_url_master is defined +  - include_role: +      name: openshift_master +      tasks_from: upgrade.yml    # Run the upgrade hook prior to restarting services/system if defined:    - debug: msg="Running master upgrade hook {{ openshift_master_upgrade_hook }}" @@ -150,7 +103,9 @@        {{ openshift.common.client_binary }} adm --config={{ openshift.common.config_base }}/master/admin.kubeconfig        migrate storage --include=clusterpolicies --confirm      register: l_pb_upgrade_control_plane_post_upgrade_storage -    when: openshift_upgrade_post_storage_migration_enabled | default(true) | bool +    when: +    - openshift_upgrade_post_storage_migration_enabled | default(true) | bool +    - openshift_version | version_compare('3.7','<')      failed_when:      - openshift_upgrade_post_storage_migration_enabled | default(true) | bool      - l_pb_upgrade_control_plane_post_upgrade_storage.rc != 0 @@ -199,7 +154,7 @@        {{ openshift.common.client_binary }} adm --config={{ openshift.common.config_base }}/master/admin.kubeconfig        policy reconcile-cluster-roles --additive-only=true --confirm -o name      register: reconcile_cluster_role_result -    when: not openshift.common.version_gte_3_7 | bool +    when: openshift_version | version_compare('3.7','<')      changed_when:      - reconcile_cluster_role_result.stdout != ''      - reconcile_cluster_role_result.rc == 0 @@ -214,7 +169,7 @@        --exclude-groups=system:unauthenticated        --exclude-users=system:anonymous        --additive-only=true --confirm -o name -    when: not openshift.common.version_gte_3_7 | bool +    when: openshift_version | version_compare('3.7','<')      register: reconcile_bindings_result      changed_when:      - reconcile_bindings_result.stdout != '' @@ -229,9 +184,10 @@      changed_when:      - reconcile_jenkins_role_binding_result.stdout != ''      - reconcile_jenkins_role_binding_result.rc == 0 -    when: (not openshift.common.version_gte_3_7 | bool) and (openshift.common.version_gte_3_4_or_1_4 | bool) +    when: +    - openshift_version | version_compare('3.7','<') -  - when: (openshift.common.version_gte_3_6 | bool) and (not openshift.common.version_gte_3_7 | bool) +  - when: openshift_upgrade_target | version_compare('3.7','<')      block:      - name: Retrieve shared-resource-viewer        oc_obj: @@ -250,7 +206,6 @@        - "'annotations' in objout['results']['results'][0]['metadata']"        - "'openshift.io/reconcile-protect' in objout['results']['results'][0]['metadata']['annotations']"        - "objout['results']['results'][0]['metadata']['annotations']['openshift.io/reconcile-protect'] == 'true'" -      - copy:          src: "{{ item }}"          dest: "/tmp/{{ item }}" @@ -268,6 +223,12 @@          - "/tmp/{{ __master_shared_resource_viewer_file }}"          delete_after: true        when: __shared_resource_viewer_protected is not defined +      register: result +      retries: 3 +      delay: 5 +      until: result.rc == 0 +      ignore_errors: true +    - name: Reconcile Security Context Constraints      command: > diff --git a/playbooks/common/openshift-cluster/upgrades/upgrade_scheduler.yml b/playbooks/common/openshift-cluster/upgrades/upgrade_scheduler.yml deleted file mode 100644 index 8558bf3e9..000000000 --- a/playbooks/common/openshift-cluster/upgrades/upgrade_scheduler.yml +++ /dev/null @@ -1,173 +0,0 @@ ---- -# Upgrade predicates -- vars: -    prev_predicates: "{{ lookup('openshift_master_facts_default_predicates', short_version=openshift_upgrade_min, deployment_type=openshift_deployment_type) }}" -    prev_predicates_no_region: "{{ lookup('openshift_master_facts_default_predicates', short_version=openshift_upgrade_min, deployment_type=openshift_deployment_type, regions_enabled=False) }}" -    default_predicates_no_region: "{{ lookup('openshift_master_facts_default_predicates', regions_enabled=False) }}" -    # older_predicates are the set of predicates that have previously been -    # hard-coded into openshift_facts -    older_predicates: -    - - name: MatchNodeSelector -      - name: PodFitsResources -      - name: PodFitsPorts -      - name: NoDiskConflict -      - name: NoVolumeZoneConflict -      - name: MaxEBSVolumeCount -      - name: MaxGCEPDVolumeCount -      - name: Region -        argument: -          serviceAffinity: -            labels: -            - region -    - - name: MatchNodeSelector -      - name: PodFitsResources -      - name: PodFitsPorts -      - name: NoDiskConflict -      - name: NoVolumeZoneConflict -      - name: Region -        argument: -          serviceAffinity: -            labels: -            - region -    - - name: MatchNodeSelector -      - name: PodFitsResources -      - name: PodFitsPorts -      - name: NoDiskConflict -      - name: Region -        argument: -          serviceAffinity: -            labels: -            - region -    # older_predicates_no_region are the set of predicates that have previously -    # been hard-coded into openshift_facts, with the Region predicate removed -    older_predicates_no_region: -    - - name: MatchNodeSelector -      - name: PodFitsResources -      - name: PodFitsPorts -      - name: NoDiskConflict -      - name: NoVolumeZoneConflict -      - name: MaxEBSVolumeCount -      - name: MaxGCEPDVolumeCount -    - - name: MatchNodeSelector -      - name: PodFitsResources -      - name: PodFitsPorts -      - name: NoDiskConflict -      - name: NoVolumeZoneConflict -    - - name: MatchNodeSelector -      - name: PodFitsResources -      - name: PodFitsPorts -      - name: NoDiskConflict -  block: - -  # Handle case where openshift_master_predicates is defined -  - block: -    - debug: -        msg: "WARNING: openshift_master_scheduler_predicates is set to defaults from an earlier release of OpenShift current defaults are: {{ openshift_master_scheduler_default_predicates }}" -      when: openshift_master_scheduler_predicates in older_predicates + older_predicates_no_region + [prev_predicates] + [prev_predicates_no_region] - -    - debug: -        msg: "WARNING: openshift_master_scheduler_predicates does not match current defaults of: {{ openshift_master_scheduler_default_predicates }}" -      when: openshift_master_scheduler_predicates != openshift_master_scheduler_default_predicates -    when: openshift_master_scheduler_predicates | default(none) is not none - -  # Handle cases where openshift_master_predicates is not defined -  - block: -    - debug: -        msg: "WARNING: existing scheduler config does not match previous known defaults automated upgrade of scheduler config is disabled.\nexisting scheduler predicates: {{ openshift_master_scheduler_current_predicates }}\ncurrent scheduler default predicates are: {{ openshift_master_scheduler_default_predicates }}" -      when: -      - openshift_master_scheduler_current_predicates != openshift_master_scheduler_default_predicates -      - openshift_master_scheduler_current_predicates not in older_predicates + [prev_predicates] - -    - set_fact: -        openshift_upgrade_scheduler_predicates: "{{ openshift_master_scheduler_default_predicates }}" -      when: -      - openshift_master_scheduler_current_predicates != openshift_master_scheduler_default_predicates -      - openshift_master_scheduler_current_predicates in older_predicates + [prev_predicates] - -    - set_fact: -        openshift_upgrade_scheduler_predicates: "{{ default_predicates_no_region }}" -      when: -      - openshift_master_scheduler_current_predicates != default_predicates_no_region -      - openshift_master_scheduler_current_predicates in older_predicates_no_region + [prev_predicates_no_region] - -    when: openshift_master_scheduler_predicates | default(none) is none - - -# Upgrade priorities -- vars: -    prev_priorities: "{{ lookup('openshift_master_facts_default_priorities', short_version=openshift_upgrade_min, deployment_type=openshift_deployment_type) }}" -    prev_priorities_no_zone: "{{ lookup('openshift_master_facts_default_priorities', short_version=openshift_upgrade_min, deployment_type=openshift_deployment_type, zones_enabled=False) }}" -    default_priorities_no_zone: "{{ lookup('openshift_master_facts_default_priorities', zones_enabled=False) }}" -    # older_priorities are the set of priorities that have previously been -    # hard-coded into openshift_facts -    older_priorities: -    - - name: LeastRequestedPriority -        weight: 1 -      - name: SelectorSpreadPriority -        weight: 1 -      - name: Zone -        weight: 2 -        argument: -          serviceAntiAffinity: -            label: zone -    # older_priorities_no_region are the set of priorities that have previously -    # been hard-coded into openshift_facts, with the Zone priority removed -    older_priorities_no_zone: -    - - name: LeastRequestedPriority -        weight: 1 -      - name: SelectorSpreadPriority -        weight: 1 -  block: - -  # Handle case where openshift_master_priorities is defined -  - block: -    - debug: -        msg: "WARNING: openshift_master_scheduler_priorities is set to defaults from an earlier release of OpenShift current defaults are: {{ openshift_master_scheduler_default_priorities }}" -      when: openshift_master_scheduler_priorities in older_priorities + older_priorities_no_zone + [prev_priorities] + [prev_priorities_no_zone] - -    - debug: -        msg: "WARNING: openshift_master_scheduler_priorities does not match current defaults of: {{ openshift_master_scheduler_default_priorities }}" -      when: openshift_master_scheduler_priorities != openshift_master_scheduler_default_priorities -    when: openshift_master_scheduler_priorities | default(none) is not none - -  # Handle cases where openshift_master_priorities is not defined -  - block: -    - debug: -        msg: "WARNING: existing scheduler config does not match previous known defaults automated upgrade of scheduler config is disabled.\nexisting scheduler priorities: {{ openshift_master_scheduler_current_priorities }}\ncurrent scheduler default priorities are: {{ openshift_master_scheduler_default_priorities }}" -      when: -      - openshift_master_scheduler_current_priorities != openshift_master_scheduler_default_priorities -      - openshift_master_scheduler_current_priorities not in older_priorities + [prev_priorities] - -    - set_fact: -        openshift_upgrade_scheduler_priorities: "{{ openshift_master_scheduler_default_priorities }}" -      when: -      - openshift_master_scheduler_current_priorities != openshift_master_scheduler_default_priorities -      - openshift_master_scheduler_current_priorities in older_priorities + [prev_priorities] - -    - set_fact: -        openshift_upgrade_scheduler_priorities: "{{ default_priorities_no_zone }}" -      when: -      - openshift_master_scheduler_current_priorities != default_priorities_no_zone -      - openshift_master_scheduler_current_priorities in older_priorities_no_zone + [prev_priorities_no_zone] - -    when: openshift_master_scheduler_priorities | default(none) is none - - -# Update scheduler -- vars: -    scheduler_config: -      kind: Policy -      apiVersion: v1 -      predicates: "{{ openshift_upgrade_scheduler_predicates -                      | default(openshift_master_scheduler_current_predicates) }}" -      priorities: "{{ openshift_upgrade_scheduler_priorities -                      | default(openshift_master_scheduler_current_priorities) }}" -  block: -  - name: Update scheduler config -    copy: -      content: "{{ scheduler_config | to_nice_json }}" -      dest: "{{ openshift_master_scheduler_conf }}" -      backup: true -  when: > -    openshift_upgrade_scheduler_predicates is defined or -    openshift_upgrade_scheduler_priorities is defined diff --git a/playbooks/common/openshift-cluster/upgrades/v3_3/master_config_upgrade.yml b/playbooks/common/openshift-cluster/upgrades/v3_3/master_config_upgrade.yml deleted file mode 100644 index 5e7a66171..000000000 --- a/playbooks/common/openshift-cluster/upgrades/v3_3/master_config_upgrade.yml +++ /dev/null @@ -1,66 +0,0 @@ ---- -- modify_yaml: -    dest: "{{ openshift.common.config_base}}/master/master-config.yaml" -    yaml_key: 'masterClients.externalKubernetesClientConnectionOverrides.acceptContentTypes' -    yaml_value: 'application/vnd.kubernetes.protobuf,application/json' - -- modify_yaml: -    dest: "{{ openshift.common.config_base}}/master/master-config.yaml" -    yaml_key: 'masterClients.externalKubernetesClientConnectionOverrides.contentType' -    yaml_value: 'application/vnd.kubernetes.protobuf' - -- modify_yaml: -    dest: "{{ openshift.common.config_base}}/master/master-config.yaml" -    yaml_key: 'masterClients.externalKubernetesClientConnectionOverrides.burst' -    yaml_value: 400 - -- modify_yaml: -    dest: "{{ openshift.common.config_base}}/master/master-config.yaml" -    yaml_key: 'masterClients.externalKubernetesClientConnectionOverrides.qps' -    yaml_value: 200 - -- modify_yaml: -    dest: "{{ openshift.common.config_base}}/master/master-config.yaml" -    yaml_key: 'masterClients.openshiftLoopbackClientConnectionOverrides.acceptContentTypes' -    yaml_value: 'application/vnd.kubernetes.protobuf,application/json' - -- modify_yaml: -    dest: "{{ openshift.common.config_base}}/master/master-config.yaml" -    yaml_key: 'masterClients.openshiftLoopbackClientConnectionOverrides.contentType' -    yaml_value: 'application/vnd.kubernetes.protobuf' - -- modify_yaml: -    dest: "{{ openshift.common.config_base}}/master/master-config.yaml" -    yaml_key: 'masterClients.openshiftLoopbackClientConnectionOverrides.burst' -    yaml_value: 600 - -- modify_yaml: -    dest: "{{ openshift.common.config_base}}/master/master-config.yaml" -    yaml_key: 'masterClients.openshiftLoopbackClientConnectionOverrides.qps' -    yaml_value: 300 - -- modify_yaml: -    dest: "{{ openshift.common.config_base}}/master/master-config.yaml" -    yaml_key: 'controllerConfig.serviceServingCert.signer.certFile' -    yaml_value: service-signer.crt - -- modify_yaml: -    dest: "{{ openshift.common.config_base}}/master/master-config.yaml" -    yaml_key: 'controllerConfig.serviceServingCert.signer.keyFile' -    yaml_value: service-signer.key - -- modify_yaml: -    dest: "{{ openshift.common.config_base}}/master/master-config.yaml" -    yaml_key: 'admissionConfig.pluginConfig' -    yaml_value: "{{ openshift.master.admission_plugin_config }}" -  when: "'admission_plugin_config' in openshift.master" - -- modify_yaml: -    dest: "{{ openshift.common.config_base}}/master/master-config.yaml" -    yaml_key: 'admissionConfig.pluginOrderOverride' -    yaml_value: - -- modify_yaml: -    dest: "{{ openshift.common.config_base}}/master/master-config.yaml" -    yaml_key: 'kubernetesMasterConfig.admissionConfig' -    yaml_value: diff --git a/playbooks/common/openshift-cluster/upgrades/v3_3/node_config_upgrade.yml b/playbooks/common/openshift-cluster/upgrades/v3_3/node_config_upgrade.yml deleted file mode 100644 index 89b524f14..000000000 --- a/playbooks/common/openshift-cluster/upgrades/v3_3/node_config_upgrade.yml +++ /dev/null @@ -1,20 +0,0 @@ ---- -- modify_yaml: -    dest: "{{ openshift.common.config_base}}/node/node-config.yaml" -    yaml_key: 'masterClientConnectionOverrides.acceptContentTypes' -    yaml_value: 'application/vnd.kubernetes.protobuf,application/json' - -- modify_yaml: -    dest: "{{ openshift.common.config_base}}/node/node-config.yaml" -    yaml_key: 'masterClientConnectionOverrides.contentType' -    yaml_value: 'application/vnd.kubernetes.protobuf' - -- modify_yaml: -    dest: "{{ openshift.common.config_base}}/node/node-config.yaml" -    yaml_key: 'masterClientConnectionOverrides.burst' -    yaml_value: 40 - -- modify_yaml: -    dest: "{{ openshift.common.config_base}}/node/node-config.yaml" -    yaml_key: 'masterClientConnectionOverrides.qps' -    yaml_value: 20 diff --git a/playbooks/common/openshift-cluster/upgrades/v3_3/roles b/playbooks/common/openshift-cluster/upgrades/v3_3/roles deleted file mode 120000 index 6bc1a7aef..000000000 --- a/playbooks/common/openshift-cluster/upgrades/v3_3/roles +++ /dev/null @@ -1 +0,0 @@ -../../../../../roles
\ No newline at end of file diff --git a/playbooks/common/openshift-cluster/upgrades/v3_3/upgrade.yml b/playbooks/common/openshift-cluster/upgrades/v3_3/upgrade.yml deleted file mode 100644 index a241ef039..000000000 --- a/playbooks/common/openshift-cluster/upgrades/v3_3/upgrade.yml +++ /dev/null @@ -1,118 +0,0 @@ ---- -# -# Full Control Plane + Nodes Upgrade -# -- include: ../init.yml -  tags: -  - pre_upgrade - -- name: Configure the upgrade target for the common upgrade tasks -  hosts: oo_all_hosts -  tags: -  - pre_upgrade -  tasks: -  - set_fact: -      openshift_upgrade_target: "{{ '1.3' if deployment_type == 'origin' else '3.3' }}" -      openshift_upgrade_min: "{{ '1.2' if deployment_type == 'origin' else '3.2' }}" - -# Pre-upgrade - -- include: ../initialize_nodes_to_upgrade.yml -  tags: -  - pre_upgrade - -- name: Update repos and initialize facts on all hosts -  hosts: oo_masters_to_config:oo_nodes_to_upgrade:oo_etcd_to_config:oo_lb_to_config -  tags: -  - pre_upgrade -  roles: -  - openshift_repos - -- name: Set openshift_no_proxy_internal_hostnames -  hosts: oo_masters_to_config:oo_nodes_to_upgrade -  tags: -  - pre_upgrade -  tasks: -  - set_fact: -      openshift_no_proxy_internal_hostnames: "{{ hostvars | oo_select_keys(groups['oo_nodes_to_config'] -                                                    | union(groups['oo_masters_to_config']) -                                                    | union(groups['oo_etcd_to_config'] | default([]))) -                                                | oo_collect('openshift.common.hostname') | default([]) | join (',') -                                                }}" -    when: -    - openshift_http_proxy is defined or openshift_https_proxy is defined -    - openshift_generate_no_proxy_hosts | default(True) | bool - -- include: ../pre/verify_inventory_vars.yml -  tags: -  - pre_upgrade - -- include: ../disable_master_excluders.yml -  tags: -  - pre_upgrade - -- include: ../disable_node_excluders.yml -  tags: -  - pre_upgrade - -- include: ../../initialize_openshift_version.yml -  tags: -  - pre_upgrade -  vars: -    # Request specific openshift_release and let the openshift_version role handle converting this -    # to a more specific version, respecting openshift_image_tag and openshift_pkg_version if -    # defined, and overriding the normal behavior of protecting the installed version -    openshift_release: "{{ openshift_upgrade_target }}" -    openshift_protect_installed_version: False - -    # We skip the docker role at this point in upgrade to prevent -    # unintended package, container, or config upgrades which trigger -    # docker restarts. At this early stage of upgrade we can assume -    # docker is configured and running. -    skip_docker_role: True - -- include: ../pre/verify_control_plane_running.yml -  tags: -  - pre_upgrade - -- include: ../../../openshift-master/validate_restart.yml -  tags: -  - pre_upgrade - -- name: Verify upgrade targets -  hosts: oo_masters_to_config:oo_nodes_to_upgrade -  tasks: -  - include: ../pre/verify_upgrade_targets.yml -  tags: -  - pre_upgrade - -- name: Verify docker upgrade targets -  hosts: oo_masters_to_config:oo_nodes_to_upgrade:oo_etcd_to_config -  tasks: -  - include: ../pre/tasks/verify_docker_upgrade_targets.yml -  tags: -  - pre_upgrade - -- include: ../pre/gate_checks.yml -  tags: -  - pre_upgrade - -# Pre-upgrade completed, nothing after this should be tagged pre_upgrade. - -# Separate step so we can execute in parallel and clear out anything unused -# before we get into the serialized upgrade process which will then remove -# remaining images if possible. -- name: Cleanup unused Docker images -  hosts: oo_masters_to_config:oo_nodes_to_upgrade:oo_etcd_to_config -  tasks: -  - include: ../cleanup_unused_images.yml - -- include: ../upgrade_control_plane.yml -  vars: -    master_config_hook: "v3_3/master_config_upgrade.yml" - -- include: ../upgrade_nodes.yml -  vars: -    node_config_hook: "v3_3/node_config_upgrade.yml" - -- include: ../post_control_plane.yml diff --git a/playbooks/common/openshift-cluster/upgrades/v3_3/upgrade_control_plane.yml b/playbooks/common/openshift-cluster/upgrades/v3_3/upgrade_control_plane.yml deleted file mode 100644 index f64f0e003..000000000 --- a/playbooks/common/openshift-cluster/upgrades/v3_3/upgrade_control_plane.yml +++ /dev/null @@ -1,119 +0,0 @@ ---- -# -# Control Plane Upgrade Playbook -# -# Upgrades masters and Docker (only on standalone etcd hosts) -# -# This upgrade does not include: -# - node service running on masters -# - docker running on masters -# - node service running on dedicated nodes -# -# You can run the upgrade_nodes.yml playbook after this to upgrade these components separately. -# -- include: ../init.yml -  tags: -  - pre_upgrade - -- name: Configure the upgrade target for the common upgrade tasks -  hosts: oo_all_hosts -  tags: -  - pre_upgrade -  tasks: -  - set_fact: -      openshift_upgrade_target: "{{ '1.3' if deployment_type == 'origin' else '3.3' }}" -      openshift_upgrade_min: "{{ '1.2' if deployment_type == 'origin' else '3.2' }}" - -# Pre-upgrade -- include: ../initialize_nodes_to_upgrade.yml -  tags: -  - pre_upgrade - -- name: Update repos on control plane hosts -  hosts: oo_masters_to_config:oo_etcd_to_config:oo_lb_to_config -  tags: -  - pre_upgrade -  roles: -  - openshift_repos - -- name: Set openshift_no_proxy_internal_hostnames -  hosts: oo_masters_to_config:oo_nodes_to_upgrade -  tags: -  - pre_upgrade -  tasks: -  - set_fact: -      openshift_no_proxy_internal_hostnames: "{{ hostvars | oo_select_keys(groups['oo_nodes_to_config'] -                                                    | union(groups['oo_masters_to_config']) -                                                    | union(groups['oo_etcd_to_config'] | default([]))) -                                                | oo_collect('openshift.common.hostname') | default([]) | join (',') -                                                }}" -    when: -    - openshift_http_proxy is defined or openshift_https_proxy is defined -    - openshift_generate_no_proxy_hosts | default(True) | bool - -- include: ../pre/verify_inventory_vars.yml -  tags: -  - pre_upgrade - -- include: ../disable_master_excluders.yml -  tags: -  - pre_upgrade - -- include: ../../initialize_openshift_version.yml -  tags: -  - pre_upgrade -  vars: -    # Request specific openshift_release and let the openshift_version role handle converting this -    # to a more specific version, respecting openshift_image_tag and openshift_pkg_version if -    # defined, and overriding the normal behavior of protecting the installed version -    openshift_release: "{{ openshift_upgrade_target }}" -    openshift_protect_installed_version: False -    openshift_install_base_package_group: "oo_masters_to_config" - -    # We skip the docker role at this point in upgrade to prevent -    # unintended package, container, or config upgrades which trigger -    # docker restarts. At this early stage of upgrade we can assume -    # docker is configured and running. -    skip_docker_role: True - -- include: ../pre/verify_control_plane_running.yml -  tags: -  - pre_upgrade - -- include: ../../../openshift-master/validate_restart.yml -  tags: -  - pre_upgrade - -- name: Verify upgrade targets -  hosts: oo_masters_to_config -  tasks: -  - include: ../pre/verify_upgrade_targets.yml -  tags: -  - pre_upgrade - -- name: Verify docker upgrade targets -  hosts: oo_masters_to_config:oo_etcd_to_config -  tasks: -  - include: ../pre/tasks/verify_docker_upgrade_targets.yml -  tags: -  - pre_upgrade - -- include: ../pre/gate_checks.yml -  tags: -  - pre_upgrade - -# Pre-upgrade completed, nothing after this should be tagged pre_upgrade. - -# Separate step so we can execute in parallel and clear out anything unused -# before we get into the serialized upgrade process which will then remove -# remaining images if possible. -- name: Cleanup unused Docker images -  hosts: oo_masters_to_config:oo_etcd_to_config -  tasks: -  - include: ../cleanup_unused_images.yml - -- include: ../upgrade_control_plane.yml -  vars: -    master_config_hook: "v3_3/master_config_upgrade.yml" - -- include: ../post_control_plane.yml diff --git a/playbooks/common/openshift-cluster/upgrades/v3_3/upgrade_nodes.yml b/playbooks/common/openshift-cluster/upgrades/v3_3/upgrade_nodes.yml deleted file mode 100644 index cee4e9087..000000000 --- a/playbooks/common/openshift-cluster/upgrades/v3_3/upgrade_nodes.yml +++ /dev/null @@ -1,113 +0,0 @@ ---- -# -# Node Upgrade Playbook -# -# Upgrades nodes only, but requires the control plane to have already been upgraded. -# -- include: ../init.yml -  tags: -  - pre_upgrade - -- name: Configure the upgrade target for the common upgrade tasks -  hosts: oo_all_hosts -  tags: -  - pre_upgrade -  tasks: -  - set_fact: -      openshift_upgrade_target: "{{ '1.3' if deployment_type == 'origin' else '3.3' }}" -      openshift_upgrade_min: "{{ '1.2' if deployment_type == 'origin' else '3.2' }}" - -# Pre-upgrade -- include: ../initialize_nodes_to_upgrade.yml -  tags: -  - pre_upgrade - -- name: Update repos on nodes -  hosts: oo_masters_to_config:oo_nodes_to_upgrade:oo_etcd_to_config:oo_lb_to_config -  roles: -  - openshift_repos -  tags: -  - pre_upgrade - -- name: Set openshift_no_proxy_internal_hostnames -  hosts: oo_masters_to_config:oo_nodes_to_upgrade -  tags: -  - pre_upgrade -  tasks: -  - set_fact: -      openshift_no_proxy_internal_hostnames: "{{ hostvars | oo_select_keys(groups['oo_nodes_to_upgrade'] -                                                    | union(groups['oo_masters_to_config']) -                                                    | union(groups['oo_etcd_to_config'] | default([]))) -                                                | oo_collect('openshift.common.hostname') | default([]) | join (',') -                                                }}" -    when: -    - openshift_http_proxy is defined or openshift_https_proxy is defined -    - openshift_generate_no_proxy_hosts | default(True) | bool - -- include: ../pre/verify_inventory_vars.yml -  tags: -  - pre_upgrade - -- include: ../disable_node_excluders.yml -  tags: -  - pre_upgrade - -- include: ../../initialize_openshift_version.yml -  tags: -  - pre_upgrade -  vars: -    # Request specific openshift_release and let the openshift_version role handle converting this -    # to a more specific version, respecting openshift_image_tag and openshift_pkg_version if -    # defined, and overriding the normal behavior of protecting the installed version -    openshift_release: "{{ openshift_upgrade_target }}" -    openshift_protect_installed_version: False - -    # We skip the docker role at this point in upgrade to prevent -    # unintended package, container, or config upgrades which trigger -    # docker restarts. At this early stage of upgrade we can assume -    # docker is configured and running. -    skip_docker_role: True - -- name: Verify masters are already upgraded -  hosts: oo_masters_to_config -  tags: -  - pre_upgrade -  tasks: -  - fail: msg="Master running {{ openshift.common.version }} must be upgraded to {{ openshift_version }} before node upgrade can be run." -    when: openshift.common.version != openshift_version - -- include: ../pre/verify_control_plane_running.yml -  tags: -  - pre_upgrade - -- name: Verify upgrade targets -  hosts: oo_nodes_to_upgrade -  tasks: -  - include: ../pre/verify_upgrade_targets.yml -  tags: -  - pre_upgrade - -- name: Verify docker upgrade targets -  hosts: oo_nodes_to_upgrade -  tasks: -  - include: ../pre/tasks/verify_docker_upgrade_targets.yml -  tags: -  - pre_upgrade - -- include: ../pre/gate_checks.yml -  tags: -  - pre_upgrade - -# Pre-upgrade completed, nothing after this should be tagged pre_upgrade. - -# Separate step so we can execute in parallel and clear out anything unused -# before we get into the serialized upgrade process which will then remove -# remaining images if possible. -- name: Cleanup unused Docker images -  hosts: oo_nodes_to_upgrade -  tasks: -  - include: ../cleanup_unused_images.yml - -- include: ../upgrade_nodes.yml -  vars: -    node_config_hook: "v3_3/node_config_upgrade.yml" diff --git a/playbooks/common/openshift-cluster/upgrades/v3_4/master_config_upgrade.yml b/playbooks/common/openshift-cluster/upgrades/v3_4/master_config_upgrade.yml deleted file mode 100644 index 763922439..000000000 --- a/playbooks/common/openshift-cluster/upgrades/v3_4/master_config_upgrade.yml +++ /dev/null @@ -1,26 +0,0 @@ ---- -- modify_yaml: -    dest: "{{ openshift.common.config_base}}/master/master-config.yaml" -    yaml_key: 'admissionConfig.pluginConfig' -    yaml_value: "{{ openshift.master.admission_plugin_config }}" -  when: "'admission_plugin_config' in openshift.master" - -- modify_yaml: -    dest: "{{ openshift.common.config_base}}/master/master-config.yaml" -    yaml_key: 'admissionConfig.pluginOrderOverride' -    yaml_value: - -- modify_yaml: -    dest: "{{ openshift.common.config_base}}/master/master-config.yaml" -    yaml_key: 'kubernetesMasterConfig.admissionConfig' -    yaml_value: - -- modify_yaml: -    dest: "{{ openshift.common.config_base}}/master/master-config.yaml" -    yaml_key: 'controllerConfig.serviceServingCert.signer.certFile' -    yaml_value: service-signer.crt - -- modify_yaml: -    dest: "{{ openshift.common.config_base}}/master/master-config.yaml" -    yaml_key: 'controllerConfig.serviceServingCert.signer.keyFile' -    yaml_value: service-signer.key diff --git a/playbooks/common/openshift-cluster/upgrades/v3_4/roles b/playbooks/common/openshift-cluster/upgrades/v3_4/roles deleted file mode 120000 index 6bc1a7aef..000000000 --- a/playbooks/common/openshift-cluster/upgrades/v3_4/roles +++ /dev/null @@ -1 +0,0 @@ -../../../../../roles
\ No newline at end of file diff --git a/playbooks/common/openshift-cluster/upgrades/v3_4/upgrade.yml b/playbooks/common/openshift-cluster/upgrades/v3_4/upgrade.yml deleted file mode 100644 index ae217ba2e..000000000 --- a/playbooks/common/openshift-cluster/upgrades/v3_4/upgrade.yml +++ /dev/null @@ -1,116 +0,0 @@ ---- -# -# Full Control Plane + Nodes Upgrade -# -- include: ../init.yml -  tags: -  - pre_upgrade - -- name: Configure the upgrade target for the common upgrade tasks -  hosts: oo_all_hosts -  tags: -  - pre_upgrade -  tasks: -  - set_fact: -      openshift_upgrade_target: "{{ '1.4' if deployment_type == 'origin' else '3.4' }}" -      openshift_upgrade_min: "{{ '1.3' if deployment_type == 'origin' else '3.3' }}" - -# Pre-upgrade - -- include: ../initialize_nodes_to_upgrade.yml -  tags: -  - pre_upgrade - -- name: Update repos and initialize facts on all hosts -  hosts: oo_masters_to_config:oo_nodes_to_upgrade:oo_etcd_to_config:oo_lb_to_config -  tags: -  - pre_upgrade -  roles: -  - openshift_repos - -- name: Set openshift_no_proxy_internal_hostnames -  hosts: oo_masters_to_config:oo_nodes_to_upgrade -  tags: -  - pre_upgrade -  tasks: -  - set_fact: -      openshift_no_proxy_internal_hostnames: "{{ hostvars | oo_select_keys(groups['oo_nodes_to_config'] -                                                    | union(groups['oo_masters_to_config']) -                                                    | union(groups['oo_etcd_to_config'] | default([]))) -                                                | oo_collect('openshift.common.hostname') | default([]) | join (',') -                                                }}" -    when: -    - openshift_http_proxy is defined or openshift_https_proxy is defined -    - openshift_generate_no_proxy_hosts | default(True) | bool - -- include: ../pre/verify_inventory_vars.yml -  tags: -  - pre_upgrade - -- include: ../disable_master_excluders.yml -  tags: -  - pre_upgrade - -- include: ../disable_node_excluders.yml -  tags: -  - pre_upgrade - -- include: ../../initialize_openshift_version.yml -  tags: -  - pre_upgrade -  vars: -    # Request specific openshift_release and let the openshift_version role handle converting this -    # to a more specific version, respecting openshift_image_tag and openshift_pkg_version if -    # defined, and overriding the normal behavior of protecting the installed version -    openshift_release: "{{ openshift_upgrade_target }}" -    openshift_protect_installed_version: False - -    # We skip the docker role at this point in upgrade to prevent -    # unintended package, container, or config upgrades which trigger -    # docker restarts. At this early stage of upgrade we can assume -    # docker is configured and running. -    skip_docker_role: True - -- include: ../pre/verify_control_plane_running.yml -  tags: -  - pre_upgrade - -- include: ../../../openshift-master/validate_restart.yml -  tags: -  - pre_upgrade - -- name: Verify upgrade targets -  hosts: oo_masters_to_config:oo_nodes_to_upgrade -  tasks: -  - include: ../pre/verify_upgrade_targets.yml -  tags: -  - pre_upgrade - -- name: Verify docker upgrade targets -  hosts: oo_masters_to_config:oo_nodes_to_upgrade:oo_etcd_to_config -  tasks: -  - include: ../pre/tasks/verify_docker_upgrade_targets.yml -  tags: -  - pre_upgrade - -- include: ../pre/gate_checks.yml -  tags: -  - pre_upgrade - -# Pre-upgrade completed, nothing after this should be tagged pre_upgrade. - -# Separate step so we can execute in parallel and clear out anything unused -# before we get into the serialized upgrade process which will then remove -# remaining images if possible. -- name: Cleanup unused Docker images -  hosts: oo_masters_to_config:oo_nodes_to_upgrade:oo_etcd_to_config -  tasks: -  - include: ../cleanup_unused_images.yml - -- include: ../upgrade_control_plane.yml -  vars: -    master_config_hook: "v3_4/master_config_upgrade.yml" - -- include: ../upgrade_nodes.yml - -- include: ../post_control_plane.yml diff --git a/playbooks/common/openshift-cluster/upgrades/v3_4/upgrade_control_plane.yml b/playbooks/common/openshift-cluster/upgrades/v3_4/upgrade_control_plane.yml deleted file mode 100644 index 43da5b629..000000000 --- a/playbooks/common/openshift-cluster/upgrades/v3_4/upgrade_control_plane.yml +++ /dev/null @@ -1,119 +0,0 @@ ---- -# -# Control Plane Upgrade Playbook -# -# Upgrades masters and Docker (only on standalone etcd hosts) -# -# This upgrade does not include: -# - node service running on masters -# - docker running on masters -# - node service running on dedicated nodes -# -# You can run the upgrade_nodes.yml playbook after this to upgrade these components separately. -# -- include: ../init.yml -  tags: -  - pre_upgrade - -- name: Configure the upgrade target for the common upgrade tasks -  hosts: oo_all_hosts -  tags: -  - pre_upgrade -  tasks: -  - set_fact: -      openshift_upgrade_target: "{{ '1.4' if deployment_type == 'origin' else '3.4' }}" -      openshift_upgrade_min: "{{ '1.3' if deployment_type == 'origin' else '3.3' }}" - -# Pre-upgrade -- include: ../initialize_nodes_to_upgrade.yml -  tags: -  - pre_upgrade - -- name: Update repos on control plane hosts -  hosts: oo_masters_to_config:oo_etcd_to_config:oo_lb_to_config -  tags: -  - pre_upgrade -  roles: -  - openshift_repos - -- name: Set openshift_no_proxy_internal_hostnames -  hosts: oo_masters_to_config:oo_nodes_to_upgrade -  tags: -  - pre_upgrade -  tasks: -  - set_fact: -      openshift_no_proxy_internal_hostnames: "{{ hostvars | oo_select_keys(groups['oo_nodes_to_config'] -                                                    | union(groups['oo_masters_to_config']) -                                                    | union(groups['oo_etcd_to_config'] | default([]))) -                                                | oo_collect('openshift.common.hostname') | default([]) | join (',') -                                                }}" -    when: -    - openshift_http_proxy is defined or openshift_https_proxy is defined -    - openshift_generate_no_proxy_hosts | default(True) | bool - -- include: ../pre/verify_inventory_vars.yml -  tags: -  - pre_upgrade - -- include: ../disable_master_excluders.yml -  tags: -  - pre_upgrade - -- include: ../../initialize_openshift_version.yml -  tags: -  - pre_upgrade -  vars: -    # Request specific openshift_release and let the openshift_version role handle converting this -    # to a more specific version, respecting openshift_image_tag and openshift_pkg_version if -    # defined, and overriding the normal behavior of protecting the installed version -    openshift_release: "{{ openshift_upgrade_target }}" -    openshift_protect_installed_version: False -    openshift_install_base_package_group: "oo_masters_to_config" - -    # We skip the docker role at this point in upgrade to prevent -    # unintended package, container, or config upgrades which trigger -    # docker restarts. At this early stage of upgrade we can assume -    # docker is configured and running. -    skip_docker_role: True - -- include: ../pre/verify_control_plane_running.yml -  tags: -  - pre_upgrade - -- include: ../../../openshift-master/validate_restart.yml -  tags: -  - pre_upgrade - -- name: Verify upgrade targets -  hosts: oo_masters_to_config -  tasks: -  - include: ../pre/verify_upgrade_targets.yml -  tags: -  - pre_upgrade - -- name: Verify docker upgrade targets -  hosts: oo_masters_to_config:oo_etcd_to_config -  tasks: -  - include: ../pre/tasks/verify_docker_upgrade_targets.yml -  tags: -  - pre_upgrade - -- include: ../pre/gate_checks.yml -  tags: -  - pre_upgrade - -# Pre-upgrade completed, nothing after this should be tagged pre_upgrade. - -# Separate step so we can execute in parallel and clear out anything unused -# before we get into the serialized upgrade process which will then remove -# remaining images if possible. -- name: Cleanup unused Docker images -  hosts: oo_masters_to_config:oo_etcd_to_config -  tasks: -  - include: ../cleanup_unused_images.yml - -- include: ../upgrade_control_plane.yml -  vars: -    master_config_hook: "v3_4/master_config_upgrade.yml" - -- include: ../post_control_plane.yml diff --git a/playbooks/common/openshift-cluster/upgrades/v3_4/upgrade_nodes.yml b/playbooks/common/openshift-cluster/upgrades/v3_4/upgrade_nodes.yml deleted file mode 100644 index 8531e6045..000000000 --- a/playbooks/common/openshift-cluster/upgrades/v3_4/upgrade_nodes.yml +++ /dev/null @@ -1,111 +0,0 @@ ---- -# -# Node Upgrade Playbook -# -# Upgrades nodes only, but requires the control plane to have already been upgraded. -# -- include: ../init.yml -  tags: -  - pre_upgrade - -- name: Configure the upgrade target for the common upgrade tasks -  hosts: oo_all_hosts -  tags: -  - pre_upgrade -  tasks: -  - set_fact: -      openshift_upgrade_target: "{{ '1.4' if deployment_type == 'origin' else '3.4' }}" -      openshift_upgrade_min: "{{ '1.3' if deployment_type == 'origin' else '3.3' }}" - -# Pre-upgrade -- include: ../initialize_nodes_to_upgrade.yml -  tags: -  - pre_upgrade - -- name: Update repos on nodes -  hosts: oo_masters_to_config:oo_nodes_to_upgrade:oo_etcd_to_config:oo_lb_to_config -  roles: -  - openshift_repos -  tags: -  - pre_upgrade - -- name: Set openshift_no_proxy_internal_hostnames -  hosts: oo_masters_to_config:oo_nodes_to_upgrade -  tags: -  - pre_upgrade -  tasks: -  - set_fact: -      openshift_no_proxy_internal_hostnames: "{{ hostvars | oo_select_keys(groups['oo_nodes_to_upgrade'] -                                                    | union(groups['oo_masters_to_config']) -                                                    | union(groups['oo_etcd_to_config'] | default([]))) -                                                | oo_collect('openshift.common.hostname') | default([]) | join (',') -                                                }}" -    when: -    - openshift_http_proxy is defined or openshift_https_proxy is defined -    - openshift_generate_no_proxy_hosts | default(True) | bool - -- include: ../pre/verify_inventory_vars.yml -  tags: -  - pre_upgrade - -- include: ../disable_node_excluders.yml -  tags: -  - pre_upgrade - -- include: ../../initialize_openshift_version.yml -  tags: -  - pre_upgrade -  vars: -    # Request specific openshift_release and let the openshift_version role handle converting this -    # to a more specific version, respecting openshift_image_tag and openshift_pkg_version if -    # defined, and overriding the normal behavior of protecting the installed version -    openshift_release: "{{ openshift_upgrade_target }}" -    openshift_protect_installed_version: False - -    # We skip the docker role at this point in upgrade to prevent -    # unintended package, container, or config upgrades which trigger -    # docker restarts. At this early stage of upgrade we can assume -    # docker is configured and running. -    skip_docker_role: True - -- name: Verify masters are already upgraded -  hosts: oo_masters_to_config -  tags: -  - pre_upgrade -  tasks: -  - fail: msg="Master running {{ openshift.common.version }} must be upgraded to {{ openshift_version }} before node upgrade can be run." -    when: openshift.common.version != openshift_version - -- include: ../pre/verify_control_plane_running.yml -  tags: -  - pre_upgrade - -- name: Verify upgrade targets -  hosts: oo_nodes_to_upgrade -  tasks: -  - include: ../pre/verify_upgrade_targets.yml -  tags: -  - pre_upgrade - -- name: Verify docker upgrade targets -  hosts: oo_nodes_to_upgrade -  tasks: -  - include: ../pre/tasks/verify_docker_upgrade_targets.yml -  tags: -  - pre_upgrade - -- include: ../pre/gate_checks.yml -  tags: -  - pre_upgrade - -# Pre-upgrade completed, nothing after this should be tagged pre_upgrade. - -# Separate step so we can execute in parallel and clear out anything unused -# before we get into the serialized upgrade process which will then remove -# remaining images if possible. -- name: Cleanup unused Docker images -  hosts: oo_nodes_to_upgrade -  tasks: -  - include: ../cleanup_unused_images.yml - -- include: ../upgrade_nodes.yml diff --git a/playbooks/common/openshift-cluster/upgrades/v3_5/master_config_upgrade.yml b/playbooks/common/openshift-cluster/upgrades/v3_5/master_config_upgrade.yml deleted file mode 100644 index 763922439..000000000 --- a/playbooks/common/openshift-cluster/upgrades/v3_5/master_config_upgrade.yml +++ /dev/null @@ -1,26 +0,0 @@ ---- -- modify_yaml: -    dest: "{{ openshift.common.config_base}}/master/master-config.yaml" -    yaml_key: 'admissionConfig.pluginConfig' -    yaml_value: "{{ openshift.master.admission_plugin_config }}" -  when: "'admission_plugin_config' in openshift.master" - -- modify_yaml: -    dest: "{{ openshift.common.config_base}}/master/master-config.yaml" -    yaml_key: 'admissionConfig.pluginOrderOverride' -    yaml_value: - -- modify_yaml: -    dest: "{{ openshift.common.config_base}}/master/master-config.yaml" -    yaml_key: 'kubernetesMasterConfig.admissionConfig' -    yaml_value: - -- modify_yaml: -    dest: "{{ openshift.common.config_base}}/master/master-config.yaml" -    yaml_key: 'controllerConfig.serviceServingCert.signer.certFile' -    yaml_value: service-signer.crt - -- modify_yaml: -    dest: "{{ openshift.common.config_base}}/master/master-config.yaml" -    yaml_key: 'controllerConfig.serviceServingCert.signer.keyFile' -    yaml_value: service-signer.key diff --git a/playbooks/common/openshift-cluster/upgrades/v3_5/validator.yml b/playbooks/common/openshift-cluster/upgrades/v3_5/validator.yml deleted file mode 100644 index ae63c9ca9..000000000 --- a/playbooks/common/openshift-cluster/upgrades/v3_5/validator.yml +++ /dev/null @@ -1,67 +0,0 @@ ---- -############################################################################### -# Pre upgrade checks for known data problems, if this playbook fails you should -# contact support. If you're not supported contact users@lists.openshift.com -# -# oc_objectvalidator provides these two checks -# 1 - SDN Data issues, never seen in the wild but known possible due to code audits -#     https://github.com/openshift/origin/issues/12697 -# 2 - Namespace protections, https://bugzilla.redhat.com/show_bug.cgi?id=1428934 -# -############################################################################### -- name: Verify 3.5 specific upgrade checks -  hosts: oo_first_master -  roles: -  - { role: lib_openshift } -  tasks: -  - name: Check for invalid namespaces and SDN errors -    oc_objectvalidator: - -  # What's all this PetSet business about? -  # -  # 'PetSets' were ALPHA resources in Kube <= 3.4. In >= 3.5 they are -  # no longer supported. The BETA resource 'StatefulSets' replaces -  # them. We can't migrate clients PetSets to -  # StatefulSets. Additionally, Red Hat has never officially supported -  # these resource types. Sorry users, but if you were using -  # unsupported resources from the Kube documentation then we can't -  # help you at this time. -  # -  # Reference: https://bugzilla.redhat.com/show_bug.cgi?id=1428229 -  - name: Check if legacy PetSets exist -    oc_obj: -      state: list -      all_namespaces: true -      kind: petsets -    register: l_do_petsets_exist - -  - name: Fail on unsupported resource migration 'PetSets' -    fail: -      msg: > -        PetSet objects were detected in your cluster. These are an -        Alpha feature in upstream Kubernetes 1.4 and are not supported -        by Red Hat. In Kubernetes 1.5, they are replaced by the Beta -        feature StatefulSets. Red Hat currently does not offer support -        for either PetSets or StatefulSets. - -        Automatically migrating PetSets to StatefulSets in OpenShift -        Container Platform (OCP) 3.5 is not supported. See the -        Kubernetes "Upgrading from PetSets to StatefulSets" -        documentation for additional information: - -        https://kubernetes.io/docs/tasks/manage-stateful-set/upgrade-pet-set-to-stateful-set/ - -        PetSets MUST be removed before upgrading to OCP 3.5. Red Hat -        strongly recommends reading the above referenced documentation -        in its entirety before taking any destructive actions. - -        If you want to simply remove all PetSets without manually -        migrating to StatefulSets, run this command as a user with -        cluster-admin privileges: - -        $ oc get petsets --all-namespaces -o yaml | oc delete -f - --cascade=false -    when: -    # Search did not fail, valid resource type found -    - l_do_petsets_exist.results.returncode == 0 -    # Items do exist in the search results -    - l_do_petsets_exist.results.results.0['items'] | length > 0 diff --git a/playbooks/common/openshift-cluster/upgrades/v3_6/master_config_upgrade.yml b/playbooks/common/openshift-cluster/upgrades/v3_6/master_config_upgrade.yml deleted file mode 100644 index 763922439..000000000 --- a/playbooks/common/openshift-cluster/upgrades/v3_6/master_config_upgrade.yml +++ /dev/null @@ -1,26 +0,0 @@ ---- -- modify_yaml: -    dest: "{{ openshift.common.config_base}}/master/master-config.yaml" -    yaml_key: 'admissionConfig.pluginConfig' -    yaml_value: "{{ openshift.master.admission_plugin_config }}" -  when: "'admission_plugin_config' in openshift.master" - -- modify_yaml: -    dest: "{{ openshift.common.config_base}}/master/master-config.yaml" -    yaml_key: 'admissionConfig.pluginOrderOverride' -    yaml_value: - -- modify_yaml: -    dest: "{{ openshift.common.config_base}}/master/master-config.yaml" -    yaml_key: 'kubernetesMasterConfig.admissionConfig' -    yaml_value: - -- modify_yaml: -    dest: "{{ openshift.common.config_base}}/master/master-config.yaml" -    yaml_key: 'controllerConfig.serviceServingCert.signer.certFile' -    yaml_value: service-signer.crt - -- modify_yaml: -    dest: "{{ openshift.common.config_base}}/master/master-config.yaml" -    yaml_key: 'controllerConfig.serviceServingCert.signer.keyFile' -    yaml_value: service-signer.key diff --git a/playbooks/common/openshift-cluster/upgrades/v3_6/upgrade.yml b/playbooks/common/openshift-cluster/upgrades/v3_6/upgrade.yml index 920dc2ffc..ef52f214b 100644 --- a/playbooks/common/openshift-cluster/upgrades/v3_6/upgrade.yml +++ b/playbooks/common/openshift-cluster/upgrades/v3_6/upgrade.yml @@ -63,7 +63,7 @@    tags:    - pre_upgrade -- include: ../../initialize_openshift_version.yml +- include: ../../../../init/version.yml    tags:    - pre_upgrade    vars: @@ -116,6 +116,8 @@    - include: ../cleanup_unused_images.yml  - include: ../upgrade_control_plane.yml +  vars: +    master_config_hook: "v3_6/master_config_upgrade.yml"  - include: ../upgrade_nodes.yml diff --git a/playbooks/common/openshift-cluster/upgrades/v3_6/upgrade_control_plane.yml b/playbooks/common/openshift-cluster/upgrades/v3_6/upgrade_control_plane.yml index 27d8515dc..4c6646a38 100644 --- a/playbooks/common/openshift-cluster/upgrades/v3_6/upgrade_control_plane.yml +++ b/playbooks/common/openshift-cluster/upgrades/v3_6/upgrade_control_plane.yml @@ -67,7 +67,7 @@    tags:    - pre_upgrade -- include: ../../initialize_openshift_version.yml +- include: ../../../../init/version.yml    tags:    - pre_upgrade    vars: @@ -76,7 +76,6 @@      # defined, and overriding the normal behavior of protecting the installed version      openshift_release: "{{ openshift_upgrade_target }}"      openshift_protect_installed_version: False -    openshift_install_base_package_group: "oo_masters_to_config"      # We skip the docker role at this point in upgrade to prevent      # unintended package, container, or config upgrades which trigger diff --git a/playbooks/common/openshift-cluster/upgrades/v3_6/upgrade_nodes.yml b/playbooks/common/openshift-cluster/upgrades/v3_6/upgrade_nodes.yml index ba6fcc3f8..f25cfe0d0 100644 --- a/playbooks/common/openshift-cluster/upgrades/v3_6/upgrade_nodes.yml +++ b/playbooks/common/openshift-cluster/upgrades/v3_6/upgrade_nodes.yml @@ -56,7 +56,7 @@    tags:    - pre_upgrade -- include: ../../initialize_openshift_version.yml +- include: ../../../../init/version.yml    tags:    - pre_upgrade    vars: diff --git a/playbooks/common/openshift-cluster/upgrades/v3_7/upgrade.yml b/playbooks/common/openshift-cluster/upgrades/v3_7/upgrade.yml index bf3b94682..e3c012380 100644 --- a/playbooks/common/openshift-cluster/upgrades/v3_7/upgrade.yml +++ b/playbooks/common/openshift-cluster/upgrades/v3_7/upgrade.yml @@ -67,7 +67,7 @@    tags:    - pre_upgrade -- include: ../../initialize_openshift_version.yml +- include: ../../../../init/version.yml    tags:    - pre_upgrade    vars: @@ -119,13 +119,13 @@    tasks:    - include: ../cleanup_unused_images.yml -#TODO: Why doesn't this compose using ./upgrade_control_plane rather than -# ../upgrade_control_plane?  - include: ../upgrade_control_plane.yml +  vars: +    master_config_hook: "v3_7/master_config_upgrade.yml"  # All controllers must be stopped at the same time then restarted  - name: Cycle all controller services to force new leader election mode -  hosts: oo_etcd_to_config +  hosts: oo_masters_to_config    gather_facts: no    tasks:    - name: Stop {{ openshift.common.service_type }}-master-controllers diff --git a/playbooks/common/openshift-cluster/upgrades/v3_7/upgrade_control_plane.yml b/playbooks/common/openshift-cluster/upgrades/v3_7/upgrade_control_plane.yml index b91bea617..a88fa7b2e 100644 --- a/playbooks/common/openshift-cluster/upgrades/v3_7/upgrade_control_plane.yml +++ b/playbooks/common/openshift-cluster/upgrades/v3_7/upgrade_control_plane.yml @@ -71,7 +71,7 @@    tags:    - pre_upgrade -- include: ../../initialize_openshift_version.yml +- include: ../../../../init/version.yml    tags:    - pre_upgrade    vars: @@ -80,7 +80,6 @@      # defined, and overriding the normal behavior of protecting the installed version      openshift_release: "{{ openshift_upgrade_target }}"      openshift_protect_installed_version: False -    openshift_install_base_package_group: "oo_masters_to_config"      # We skip the docker role at this point in upgrade to prevent      # unintended package, container, or config upgrades which trigger @@ -130,7 +129,7 @@  # All controllers must be stopped at the same time then restarted  - name: Cycle all controller services to force new leader election mode -  hosts: oo_etcd_to_config +  hosts: oo_masters_to_config    gather_facts: no    tasks:    - name: Stop {{ openshift.common.service_type }}-master-controllers diff --git a/playbooks/common/openshift-cluster/upgrades/v3_7/upgrade_nodes.yml b/playbooks/common/openshift-cluster/upgrades/v3_7/upgrade_nodes.yml index bc080f9a3..c0546bd2d 100644 --- a/playbooks/common/openshift-cluster/upgrades/v3_7/upgrade_nodes.yml +++ b/playbooks/common/openshift-cluster/upgrades/v3_7/upgrade_nodes.yml @@ -56,7 +56,7 @@    tags:    - pre_upgrade -- include: ../../initialize_openshift_version.yml +- include: ../../../../init/version.yml    tags:    - pre_upgrade    vars: diff --git a/playbooks/common/openshift-cluster/upgrades/v3_7/validator.yml b/playbooks/common/openshift-cluster/upgrades/v3_7/validator.yml index f76fc68d1..74d0cd8ad 100644 --- a/playbooks/common/openshift-cluster/upgrades/v3_7/validator.yml +++ b/playbooks/common/openshift-cluster/upgrades/v3_7/validator.yml @@ -11,13 +11,15 @@    tasks:    - name: Check for invalid namespaces and SDN errors      oc_objectvalidator: - +  # DO NOT DISABLE THIS, YOUR UPGRADE WILL FAIL IF YOU DO SO    - name: Confirm OpenShift authorization objects are in sync      command: >        {{ openshift.common.client_binary }} adm migrate authorization -    when: not openshift.common.version_gte_3_7 | bool +    when: +    - openshift_currently_installed_version | version_compare('3.7','<') +    - openshift_upgrade_pre_authorization_migration_enabled | default(true) | bool      changed_when: false      register: l_oc_result      until: l_oc_result.rc == 0 -    retries: 4 +    retries: 2      delay: 15 diff --git a/playbooks/common/openshift-cluster/upgrades/v3_5/filter_plugins b/playbooks/common/openshift-cluster/upgrades/v3_8/filter_plugins index 7de3c1dd7..7de3c1dd7 120000 --- a/playbooks/common/openshift-cluster/upgrades/v3_5/filter_plugins +++ b/playbooks/common/openshift-cluster/upgrades/v3_8/filter_plugins diff --git a/playbooks/common/openshift-cluster/upgrades/v3_7/master_config_upgrade.yml b/playbooks/common/openshift-cluster/upgrades/v3_8/master_config_upgrade.yml index c21ab97bc..1d4d1919c 100644 --- a/playbooks/common/openshift-cluster/upgrades/v3_7/master_config_upgrade.yml +++ b/playbooks/common/openshift-cluster/upgrades/v3_8/master_config_upgrade.yml @@ -1,22 +1,6 @@  ---  - modify_yaml:      dest: "{{ openshift.common.config_base}}/master/master-config.yaml" -    yaml_key: 'admissionConfig.pluginConfig' -    yaml_value: "{{ openshift.master.admission_plugin_config }}" -  when: "'admission_plugin_config' in openshift.master" - -- modify_yaml: -    dest: "{{ openshift.common.config_base}}/master/master-config.yaml" -    yaml_key: 'admissionConfig.pluginOrderOverride' -    yaml_value: - -- modify_yaml: -    dest: "{{ openshift.common.config_base}}/master/master-config.yaml" -    yaml_key: 'kubernetesMasterConfig.admissionConfig' -    yaml_value: - -- modify_yaml: -    dest: "{{ openshift.common.config_base}}/master/master-config.yaml"      yaml_key: 'controllerConfig.election.lockName'      yaml_value: 'openshift-master-controllers' @@ -29,3 +13,8 @@      dest: "{{ openshift.common.config_base}}/master/master-config.yaml"      yaml_key: 'controllerConfig.serviceServingCert.signer.keyFile'      yaml_value: service-signer.key + +- modify_yaml: +    dest: "{{ openshift.common.config_base }}/master/master-config.yaml" +    yaml_key: servingInfo.clientCA +    yaml_value: ca.crt diff --git a/playbooks/common/openshift-cluster/upgrades/v3_5/roles b/playbooks/common/openshift-cluster/upgrades/v3_8/roles index 415645be6..415645be6 120000 --- a/playbooks/common/openshift-cluster/upgrades/v3_5/roles +++ b/playbooks/common/openshift-cluster/upgrades/v3_8/roles diff --git a/playbooks/common/openshift-cluster/upgrades/v3_5/upgrade.yml b/playbooks/common/openshift-cluster/upgrades/v3_8/upgrade.yml index 30e719d8f..73df15d53 100644 --- a/playbooks/common/openshift-cluster/upgrades/v3_5/upgrade.yml +++ b/playbooks/common/openshift-cluster/upgrades/v3_8/upgrade.yml @@ -12,8 +12,8 @@    - pre_upgrade    tasks:    - set_fact: -      openshift_upgrade_target: "{{ '1.5' if deployment_type == 'origin' else '3.5' }}" -      openshift_upgrade_min: "{{ '1.4' if deployment_type == 'origin' else '3.4' }}" +      openshift_upgrade_target: '3.8' +      openshift_upgrade_min: '3.7'  # Pre-upgrade @@ -21,6 +21,10 @@    tags:    - pre_upgrade +- include: ../pre/verify_etcd3_backend.yml +  tags: +  - pre_upgrade +  - name: Update repos and initialize facts on all hosts    hosts: oo_masters_to_config:oo_nodes_to_upgrade:oo_etcd_to_config:oo_lb_to_config    tags: @@ -47,6 +51,10 @@    tags:    - pre_upgrade +- include: ../pre/verify_health_checks.yml +  tags: +  - pre_upgrade +  - include: ../pre/verify_control_plane_running.yml    tags:    - pre_upgrade @@ -59,7 +67,7 @@    tags:    - pre_upgrade -- include: ../../initialize_openshift_version.yml +- include: ../../../../init/version.yml    tags:    - pre_upgrade    vars: @@ -112,6 +120,22 @@    - include: ../cleanup_unused_images.yml  - include: ../upgrade_control_plane.yml +  vars: +    master_config_hook: "v3_7/master_config_upgrade.yml" + +# All controllers must be stopped at the same time then restarted +- name: Cycle all controller services to force new leader election mode +  hosts: oo_masters_to_config +  gather_facts: no +  tasks: +  - name: Stop {{ openshift.common.service_type }}-master-controllers +    systemd: +      name: "{{ openshift.common.service_type }}-master-controllers" +      state: stopped +  - name: Start {{ openshift.common.service_type }}-master-controllers +    systemd: +      name: "{{ openshift.common.service_type }}-master-controllers" +      state: started  - include: ../upgrade_nodes.yml diff --git a/playbooks/common/openshift-cluster/upgrades/v3_5/upgrade_control_plane.yml b/playbooks/common/openshift-cluster/upgrades/v3_8/upgrade_control_plane.yml index e9cec9220..48d55c16f 100644 --- a/playbooks/common/openshift-cluster/upgrades/v3_5/upgrade_control_plane.yml +++ b/playbooks/common/openshift-cluster/upgrades/v3_8/upgrade_control_plane.yml @@ -21,14 +21,18 @@    - pre_upgrade    tasks:    - set_fact: -      openshift_upgrade_target: "{{ '1.5' if deployment_type == 'origin' else '3.5' }}" -      openshift_upgrade_min: "{{ '1.4' if deployment_type == 'origin' else '3.4' }}" +      openshift_upgrade_target: '3.8' +      openshift_upgrade_min: '3.7'  # Pre-upgrade  - include: ../initialize_nodes_to_upgrade.yml    tags:    - pre_upgrade +- include: ../pre/verify_etcd3_backend.yml +  tags: +  - pre_upgrade +  - name: Update repos on control plane hosts    hosts: oo_masters_to_config:oo_etcd_to_config:oo_lb_to_config    tags: @@ -55,6 +59,10 @@    tags:    - pre_upgrade +- include: ../pre/verify_health_checks.yml +  tags: +  - pre_upgrade +  - include: ../pre/verify_control_plane_running.yml    tags:    - pre_upgrade @@ -63,7 +71,7 @@    tags:    - pre_upgrade -- include: ../../initialize_openshift_version.yml +- include: ../../../../init/version.yml    tags:    - pre_upgrade    vars: @@ -72,7 +80,6 @@      # defined, and overriding the normal behavior of protecting the installed version      openshift_release: "{{ openshift_upgrade_target }}"      openshift_protect_installed_version: False -    openshift_install_base_package_group: "oo_masters_to_config"      # We skip the docker role at this point in upgrade to prevent      # unintended package, container, or config upgrades which trigger @@ -118,6 +125,20 @@  - include: ../upgrade_control_plane.yml    vars: -    master_config_hook: "v3_5/master_config_upgrade.yml" +    master_config_hook: "v3_7/master_config_upgrade.yml" + +# All controllers must be stopped at the same time then restarted +- name: Cycle all controller services to force new leader election mode +  hosts: oo_masters_to_config +  gather_facts: no +  tasks: +  - name: Stop {{ openshift.common.service_type }}-master-controllers +    systemd: +      name: "{{ openshift.common.service_type }}-master-controllers" +      state: stopped +  - name: Start {{ openshift.common.service_type }}-master-controllers +    systemd: +      name: "{{ openshift.common.service_type }}-master-controllers" +      state: started  - include: ../post_control_plane.yml diff --git a/playbooks/common/openshift-cluster/upgrades/v3_5/upgrade_nodes.yml b/playbooks/common/openshift-cluster/upgrades/v3_8/upgrade_nodes.yml index e29d0f8e6..abd56e762 100644 --- a/playbooks/common/openshift-cluster/upgrades/v3_5/upgrade_nodes.yml +++ b/playbooks/common/openshift-cluster/upgrades/v3_8/upgrade_nodes.yml @@ -14,8 +14,8 @@    - pre_upgrade    tasks:    - set_fact: -      openshift_upgrade_target: "{{ '1.5' if deployment_type == 'origin' else '3.5' }}" -      openshift_upgrade_min: "{{ '1.4' if deployment_type == 'origin' else '3.4' }}" +      openshift_upgrade_target: '3.8' +      openshift_upgrade_min: '3.7'  # Pre-upgrade  - include: ../initialize_nodes_to_upgrade.yml @@ -48,11 +48,15 @@    tags:    - pre_upgrade +- include: ../pre/verify_health_checks.yml +  tags: +  - pre_upgrade +  - include: ../disable_node_excluders.yml    tags:    - pre_upgrade -- include: ../../initialize_openshift_version.yml +- include: ../../../../init/version.yml    tags:    - pre_upgrade    vars: diff --git a/playbooks/common/openshift-cluster/upgrades/v3_8/validator.yml b/playbooks/common/openshift-cluster/upgrades/v3_8/validator.yml new file mode 100644 index 000000000..d8540abfb --- /dev/null +++ b/playbooks/common/openshift-cluster/upgrades/v3_8/validator.yml @@ -0,0 +1,7 @@ +--- +- name: Verify 3.8 specific upgrade checks +  hosts: oo_first_master +  roles: +  - { role: lib_openshift } +  tasks: +  - debug: msg="noop" | 
