diff options
14 files changed, 111 insertions, 19 deletions
diff --git a/playbooks/adhoc/uninstall.yml b/playbooks/adhoc/uninstall.yml index 147e84131..ffdcd0ce1 100644 --- a/playbooks/adhoc/uninstall.yml +++ b/playbooks/adhoc/uninstall.yml @@ -148,6 +148,22 @@ - vovsbr when: "{{ openshift_remove_all | default(true) | bool }}" + - shell: atomic uninstall "{{ item }}"-master-api + changed_when: False + failed_when: False + with_items: + - openshift-enterprise + - atomic-enterprise + - origin + + - shell: atomic uninstall "{{ item }}"-master-controllers + changed_when: False + failed_when: False + with_items: + - openshift-enterprise + - atomic-enterprise + - origin + - shell: atomic uninstall "{{ item }}"-master changed_when: False failed_when: False diff --git a/playbooks/byo/openshift-cluster/upgrades/v3_4/upgrade_nodes.yml b/playbooks/byo/openshift-cluster/upgrades/v3_4/upgrade_nodes.yml index f6e66c477..ec63ea60e 100644 --- a/playbooks/byo/openshift-cluster/upgrades/v3_4/upgrade_nodes.yml +++ b/playbooks/byo/openshift-cluster/upgrades/v3_4/upgrade_nodes.yml @@ -47,7 +47,7 @@ tags: - pre_upgrade -- include: ../disable_excluder.yml +- include: ../../../../common/openshift-cluster/disable_excluder.yml tags: - pre_upgrade diff --git a/playbooks/byo/openshift-cluster/upgrades/v3_5/upgrade.yml b/playbooks/byo/openshift-cluster/upgrades/v3_5/upgrade.yml index e55ab1b16..6a6f0952b 100644 --- a/playbooks/byo/openshift-cluster/upgrades/v3_5/upgrade.yml +++ b/playbooks/byo/openshift-cluster/upgrades/v3_5/upgrade.yml @@ -101,3 +101,5 @@ - include: ../../../../common/openshift-cluster/upgrades/upgrade_nodes.yml - include: ../../../../common/openshift-cluster/upgrades/post_control_plane.yml + +- inlcude: ../../../../common/openshift-cluster/upgrades/v3_5/storage_upgrade.yml diff --git a/playbooks/byo/openshift-cluster/upgrades/v3_5/upgrade_control_plane.yml b/playbooks/byo/openshift-cluster/upgrades/v3_5/upgrade_control_plane.yml index e18b4280c..85894b371 100644 --- a/playbooks/byo/openshift-cluster/upgrades/v3_5/upgrade_control_plane.yml +++ b/playbooks/byo/openshift-cluster/upgrades/v3_5/upgrade_control_plane.yml @@ -104,3 +104,5 @@ - include: ../../../../common/openshift-cluster/upgrades/upgrade_control_plane.yml - include: ../../../../common/openshift-cluster/upgrades/post_control_plane.yml + +- inlcude: ../../../../common/openshift-cluster/upgrades/v3_5/storage_upgrade.yml diff --git a/playbooks/common/openshift-cluster/upgrades/v3_5/storage_upgrade.yml b/playbooks/common/openshift-cluster/upgrades/v3_5/storage_upgrade.yml new file mode 100644 index 000000000..3743f0f5d --- /dev/null +++ b/playbooks/common/openshift-cluster/upgrades/v3_5/storage_upgrade.yml @@ -0,0 +1,19 @@ +--- +############################################################################### +# Post upgrade - Upgrade job storage +############################################################################### +- name: Upgrade job storage + hosts: oo_first_master + roles: + - { role: openshift_cli } + vars: + # Another spot where we assume docker is running and do not want to accidentally trigger an unsafe + # restart. + skip_docker_role: True + tasks: + - name: Upgrade job storage + command: > + {{ openshift.common.client_binary }} adm --config={{ openshift.common.config_base }}/master/admin.kubeconfig + migrate storage --include=jobs --confirm + run_once: true + diff --git a/roles/openshift_hosted_templates/files/v1.4/enterprise/metrics-deployer.yaml b/roles/openshift_hosted_templates/files/v1.4/enterprise/metrics-deployer.yaml index 66051755c..6ead122c5 100644 --- a/roles/openshift_hosted_templates/files/v1.4/enterprise/metrics-deployer.yaml +++ b/roles/openshift_hosted_templates/files/v1.4/enterprise/metrics-deployer.yaml @@ -159,9 +159,9 @@ parameters: name: HEAPSTER_NODE_ID value: "nodename" - - description: "How often metrics should be gathered. Defaults value of '15s' for 15 seconds" + description: "How often metrics should be gathered. Defaults value of '30s' for 30 seconds" name: METRIC_RESOLUTION - value: "15s" + value: "30s" - description: "How long in seconds we should wait until Hawkular Metrics and Heapster starts up before attempting a restart" name: STARTUP_TIMEOUT diff --git a/roles/openshift_hosted_templates/files/v1.4/origin/metrics-deployer.yaml b/roles/openshift_hosted_templates/files/v1.4/origin/metrics-deployer.yaml index 54691572a..d191c0439 100644 --- a/roles/openshift_hosted_templates/files/v1.4/origin/metrics-deployer.yaml +++ b/roles/openshift_hosted_templates/files/v1.4/origin/metrics-deployer.yaml @@ -159,9 +159,9 @@ parameters: name: HEAPSTER_NODE_ID value: "nodename" - - description: "How often metrics should be gathered. Defaults value of '15s' for 15 seconds" + description: "How often metrics should be gathered. Defaults value of '30s' for 30 seconds" name: METRIC_RESOLUTION - value: "15s" + value: "30s" - description: "How long in seconds we should wait until Hawkular Metrics and Heapster starts up before attempting a restart" name: STARTUP_TIMEOUT diff --git a/roles/openshift_master/tasks/system_container.yml b/roles/openshift_master/tasks/system_container.yml index e3e3d7948..a0e1ac75e 100644 --- a/roles/openshift_master/tasks/system_container.yml +++ b/roles/openshift_master/tasks/system_container.yml @@ -17,7 +17,8 @@ changed_when: "'Extracting' in update_result.stdout" when: - ("master" in result.stdout) - - (openshift.common.version is defined) and (openshift.common.version == openshift_version) | bool + - l_is_same_version + - not l_is_ha - name: Uninstall Master system container package command: > @@ -25,12 +26,52 @@ failed_when: False when: - ("master" in result.stdout) - - (openshift.common.version is not defined) or (openshift.common.version != openshift_version) | bool + - not l_is_same_version + - not l_is_ha - name: Install Master system container package command: > atomic install --system --name={{ openshift.common.service_type }}-master {{ openshift.common.system_images_registry }}/{{ openshift.master.master_system_image }}:{{ openshift_image_tag }} when: - - (openshift.common.version is not defined) or (openshift.common.version != openshift_version) or ("master" not in result.stdout) | bool + - not l_is_same_version or ("master" not in result.stdout) | bool + - not l_is_ha + notify: + - restart master + +# HA +- name: Update Master HA system container package + command: > + atomic containers update {{ openshift.common.service_type }}-master-{{ item }} + register: update_result + changed_when: "'Extracting' in update_result.stdout" + with_items: + - api + - controllers + when: + - ("master" in result.stdout) + - l_is_same_version + - l_is_ha + +- name: Uninstall Master HA system container package + command: > + atomic uninstall {{ openshift.common.service_type }}-master-{{ item }} + failed_when: False + with_items: + - api + - controllers + when: + - ("master" in result.stdout) + - not l_is_same_version + - l_is_ha + +- name: Install Master HA system container package + command: > + atomic install --system --set COMMAND={{ item }} --name={{ openshift.common.service_type }}-master-{{ item }} {{ openshift.common.system_images_registry }}/{{ openshift.master.master_system_image }}:{{ openshift_image_tag }} + with_items: + - api + - controllers + when: + - not l_is_same_version or ("master" not in result.stdout) | bool + - l_is_ha notify: - restart master diff --git a/roles/openshift_master/tasks/systemd_units.yml b/roles/openshift_master/tasks/systemd_units.yml index 4ab98cbbb..506c8b129 100644 --- a/roles/openshift_master/tasks/systemd_units.yml +++ b/roles/openshift_master/tasks/systemd_units.yml @@ -27,7 +27,9 @@ template: src: "master_docker/master.docker.service.j2" dest: "{{ containerized_svc_dir }}/{{ openshift.common.service_type }}-master.service" - when: openshift.common.is_containerized | bool and (openshift.master.ha is not defined or not openshift.master.ha | bool and not openshift.common.is_master_system_container | bool) + when: + - openshift.common.is_containerized | bool and (openshift.master.ha is not defined or not openshift.master.ha) | bool + - not openshift.common.is_master_system_container | bool register: create_master_unit_file - command: systemctl daemon-reload @@ -37,7 +39,9 @@ template: src: "{{ ha_svc_template_path }}/atomic-openshift-master-{{ item }}.service.j2" dest: "{{ containerized_svc_dir }}/{{ openshift.common.service_type }}-master-{{ item }}.service" - when: openshift.master.ha is defined and openshift.master.ha | bool and openshift_master_cluster_method == "native" + when: + - openshift.master.ha is defined and openshift.master.ha | bool and openshift_master_cluster_method == "native" + - not openshift.common.is_master_system_container | bool with_items: - api - controllers diff --git a/roles/openshift_master/vars/main.yml b/roles/openshift_master/vars/main.yml index 01cd28c66..1e157097d 100644 --- a/roles/openshift_master/vars/main.yml +++ b/roles/openshift_master/vars/main.yml @@ -18,3 +18,6 @@ openshift_master_valid_grant_methods: - auto - prompt - deny + +l_is_ha: "{{ openshift.master.ha is defined and openshift.master.ha | bool }}" +l_is_same_version: "{{ (openshift.common.version is defined) and (openshift.common.version == openshift_version) | bool }}" diff --git a/roles/openshift_node/tasks/node_system_container.yml b/roles/openshift_node/tasks/node_system_container.yml index 01e2d33c7..3ae5c7600 100644 --- a/roles/openshift_node/tasks/node_system_container.yml +++ b/roles/openshift_node/tasks/node_system_container.yml @@ -16,14 +16,16 @@ register: update_result changed_when: "'Extracting' in update_result.stdout" when: - - (openshift.common.version is defined) and (openshift.common.version == openshift_version) and ("node" in result.stdout) | bool + - l_is_same_version + - ("node" in result.stdout) - name: Uninstall Node system container package command: > atomic uninstall {{ openshift.common.service_type }}-node failed_when: False when: - - (openshift.common.version is not defined) or (openshift.common.version != openshift_version) and ("node" in result.stdout) | bool + - not l_is_same_version + - ("node" in result.stdout) - name: Install Node system container package command: > @@ -31,4 +33,4 @@ register: install_node_result changed_when: "'Extracting' in pull_result.stdout" when: - - (openshift.common.version is not defined) or (openshift.common.version != openshift_version) or ("node" not in result.stdout) | bool + - not l_is_same_version or ("node" not in result.stdout) | bool diff --git a/roles/openshift_node/tasks/openvswitch_system_container.yml b/roles/openshift_node/tasks/openvswitch_system_container.yml index 47fac99eb..6114230d0 100644 --- a/roles/openshift_node/tasks/openvswitch_system_container.yml +++ b/roles/openshift_node/tasks/openvswitch_system_container.yml @@ -9,8 +9,6 @@ command: > atomic containers list --no-trunc -a -f container=openvswitch register: result - when: - - openshift.common.is_openvswitch_system_container | bool - name: Update OpenvSwitch system container package command: > @@ -18,19 +16,21 @@ register: update_result changed_when: "'Extracting' in update_result.stdout" when: - - (openshift.common.version is defined) and (openshift.common.version == openshift_version) and ("openvswitch" in result.stdout) | bool + - l_is_same_version + - ("openvswitch" in result.stdout) | bool - name: Uninstall OpenvSwitch system container package command: > atomic uninstall openvswitch failed_when: False when: - - (openshift.common.version is not defined) or (openshift.common.version != openshift_version) and ("openvswitch" in result.stdout) | bool + - not l_is_same_version + - ("openvswitch" in result.stdout) | bool - name: Install OpenvSwitch system container package command: > atomic install --system --name=openvswitch {{ openshift.common.system_images_registry }}/{{ openshift.node.ovs_system_image }}:{{ openshift_image_tag }} when: - - (openshift.common.version is not defined) or (openshift.common.version != openshift_version) or ("openvswitch" not in result.stdout) | bool + - not l_is_same_version or ("openvswitch" not in result.stdout) | bool notify: - restart docker diff --git a/roles/openshift_node/vars/main.yml b/roles/openshift_node/vars/main.yml new file mode 100644 index 000000000..0c2abf3b9 --- /dev/null +++ b/roles/openshift_node/vars/main.yml @@ -0,0 +1,2 @@ +--- +l_is_same_version: "{{ (openshift.common.version is defined) and (openshift.common.version == openshift_version) | bool }}" diff --git a/utils/src/ooinstall/variants.py b/utils/src/ooinstall/variants.py index a45be98bf..f25266f29 100644 --- a/utils/src/ooinstall/variants.py +++ b/utils/src/ooinstall/variants.py @@ -39,7 +39,7 @@ class Variant(object): # WARNING: Keep the versions ordered, most recent first: OSE = Variant('openshift-enterprise', 'OpenShift Container Platform', [ - Version('3.4', 'openshift-enterprise'), + Version('3.5', 'openshift-enterprise'), ]) REG = Variant('openshift-enterprise', 'Registry', [ @@ -51,6 +51,7 @@ origin = Variant('origin', 'OpenShift Origin', [ ]) LEGACY = Variant('openshift-enterprise', 'OpenShift Container Platform', [ + Version('3.4', 'openshift-enterprise'), Version('3.3', 'openshift-enterprise'), Version('3.2', 'openshift-enterprise'), Version('3.1', 'openshift-enterprise'), |