summaryrefslogtreecommitdiffstats
path: root/playbooks/common
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2017-02-06 15:55:11 -0500
committerGitHub <noreply@github.com>2017-02-06 15:55:11 -0500
commit5c40085f671cd1c0d21303304be7346e91a54248 (patch)
tree2faa6e5b33fe5640aebe9f10f8f64d01fc19e516 /playbooks/common
parent1b910a05286d1368d69998a0f5c79fb6eaee2c21 (diff)
parent2d867c4dffc4c1edfff620ddb00163dccdbdb5ca (diff)
downloadopenshift-5c40085f671cd1c0d21303304be7346e91a54248.tar.gz
openshift-5c40085f671cd1c0d21303304be7346e91a54248.tar.bz2
openshift-5c40085f671cd1c0d21303304be7346e91a54248.tar.xz
openshift-5c40085f671cd1c0d21303304be7346e91a54248.zip
Merge pull request #3254 from dgoodwin/skip-router-registry-hack
Temporary hack to skip router/registry upgrade.
Diffstat (limited to 'playbooks/common')
-rw-r--r--playbooks/common/openshift-cluster/upgrades/post_control_plane.yml14
1 files changed, 10 insertions, 4 deletions
diff --git a/playbooks/common/openshift-cluster/upgrades/post_control_plane.yml b/playbooks/common/openshift-cluster/upgrades/post_control_plane.yml
index 2bbcbe1f8..9771d5445 100644
--- a/playbooks/common/openshift-cluster/upgrades/post_control_plane.yml
+++ b/playbooks/common/openshift-cluster/upgrades/post_control_plane.yml
@@ -26,21 +26,26 @@
registry_url: "{{ openshift.master.registry_url }}"
openshift_hosted_templates_import_command: replace
pre_tasks:
+
+ # TODO: remove temp_skip_router_registry_upgrade variable. This is a short term hack
+ # to allow ops to use this control plane upgrade, without triggering router/registry
+ # upgrade which has not yet been synced with their process.
- name: Collect all routers
command: >
{{ oc_cmd }} get pods --all-namespaces -l 'router' -o json
register: all_routers
failed_when: false
changed_when: false
+ when: temp_skip_router_registry_upgrade is not defined
- set_fact: haproxy_routers="{{ (all_routers.stdout | from_json)['items'] | oo_pods_match_component(openshift_deployment_type, 'haproxy-router') | oo_select_keys_from_list(['metadata']) }}"
- when: all_routers.rc == 0
+ when: all_routers.rc == 0 and temp_skip_router_registry_upgrade is not defined
- set_fact: haproxy_routers=[]
- when: all_routers.rc != 0
+ when: all_routers.rc != 0 and temp_skip_router_registry_upgrade is not defined
- name: Update router image to current version
- when: all_routers.rc == 0
+ when: all_routers.rc == 0 and temp_skip_router_registry_upgrade is not defined
command: >
{{ oc_cmd }} patch dc/{{ item['labels']['deploymentconfig'] }} -n {{ item['namespace'] }} -p
'{"spec":{"template":{"spec":{"containers":[{"name":"router","image":"{{ router_image }}","livenessProbe":{"tcpSocket":null,"httpGet":{"path": "/healthz", "port": 1936, "host": "localhost", "scheme": "HTTP"},"initialDelaySeconds":10,"timeoutSeconds":1}}]}}}}'
@@ -53,9 +58,10 @@
register: _default_registry
failed_when: false
changed_when: false
+ when: temp_skip_router_registry_upgrade is not defined
- name: Update registry image to current version
- when: _default_registry.rc == 0
+ when: _default_registry.rc == 0 and temp_skip_router_registry_upgrade is not defined
command: >
{{ oc_cmd }} patch dc/docker-registry -n default -p
'{"spec":{"template":{"spec":{"containers":[{"name":"registry","image":"{{ registry_image }}"}]}}}}'