diff options
author | Jan Chaloupka <jchaloup@redhat.com> | 2017-05-21 18:44:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-05-21 18:44:31 +0200 |
commit | 4cd57c9d9f2ed4838f7dceed36cd48b418b5f2f3 (patch) | |
tree | 9d52993b1625ed02ad7590e381b1313cebaa5d82 /playbooks/common/openshift-cluster/upgrades/etcd/containerized_tasks.yml | |
parent | 22dfad7ae3492cf949871981e3a84bcefbd138f0 (diff) | |
parent | 4fcbe72aeaf359d56ac636a8722f817ec10c629f (diff) | |
download | openshift-4cd57c9d9f2ed4838f7dceed36cd48b418b5f2f3.tar.gz openshift-4cd57c9d9f2ed4838f7dceed36cd48b418b5f2f3.tar.bz2 openshift-4cd57c9d9f2ed4838f7dceed36cd48b418b5f2f3.tar.xz openshift-4cd57c9d9f2ed4838f7dceed36cd48b418b5f2f3.zip |
Merge pull request #4217 from ingvagabund/move-etcd-upgrade-code-into-role
Move etcd upgrade code into role
Diffstat (limited to 'playbooks/common/openshift-cluster/upgrades/etcd/containerized_tasks.yml')
-rw-r--r-- | playbooks/common/openshift-cluster/upgrades/etcd/containerized_tasks.yml | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/playbooks/common/openshift-cluster/upgrades/etcd/containerized_tasks.yml b/playbooks/common/openshift-cluster/upgrades/etcd/containerized_tasks.yml deleted file mode 100644 index 5f8b59e17..000000000 --- a/playbooks/common/openshift-cluster/upgrades/etcd/containerized_tasks.yml +++ /dev/null @@ -1,46 +0,0 @@ ---- -- name: Verify cluster is healthy pre-upgrade - command: "etcdctl --cert-file /etc/etcd/peer.crt --key-file /etc/etcd/peer.key --ca-file /etc/etcd/ca.crt -C https://{{ openshift.common.hostname }}:2379 cluster-health" - -- name: Get current image - shell: grep 'ExecStart=' /etc/systemd/system/etcd_container.service | awk '{print $NF}' - register: current_image - -- name: Set new_etcd_image - set_fact: - new_etcd_image: "{{ current_image.stdout | regex_replace('/etcd.*$','/etcd:' ~ upgrade_version ) }}" - -- name: Pull new etcd image - command: "docker pull {{ new_etcd_image }}" - -- name: Update to latest etcd image - replace: - dest: /etc/systemd/system/etcd_container.service - regexp: "{{ current_image.stdout }}$" - replace: "{{ new_etcd_image }}" - -- name: Restart etcd_container - systemd: - name: etcd_container - daemon_reload: yes - state: restarted - -## TODO: probably should just move this into the backup playbooks, also this -## will fail on atomic host. We need to revisit how to do etcd backups there as -## the container may be newer than etcdctl on the host. Assumes etcd3 obsoletes etcd (7.3.1) -- name: Upgrade etcd for etcdctl when not atomic - package: name=etcd state=latest - when: not openshift.common.is_atomic | bool - -- name: Verify cluster is healthy - command: "etcdctl --cert-file /etc/etcd/peer.crt --key-file /etc/etcd/peer.key --ca-file /etc/etcd/ca.crt -C https://{{ openshift.common.hostname }}:2379 cluster-health" - register: etcdctl - until: etcdctl.rc == 0 - retries: 3 - delay: 10 - -- name: Store new etcd_image - openshift_facts: - role: etcd - local_facts: - etcd_image: "{{ new_etcd_image }}" |