diff options
author | Giuseppe Scrivano <gscrivan@redhat.com> | 2017-01-22 15:37:12 +0100 |
---|---|---|
committer | Giuseppe Scrivano <gscrivan@redhat.com> | 2017-02-10 10:53:44 +0100 |
commit | 73d91dbcbcd3f2188977ac36e06adf57803b4842 (patch) | |
tree | ef6822a7e30c1d16648aba48b33bcc17e1de3387 /playbooks/common/openshift-cluster/upgrades | |
parent | 599ce1d450a0b7425928e40b9dd7296e5f055586 (diff) | |
download | openshift-73d91dbcbcd3f2188977ac36e06adf57803b4842.tar.gz openshift-73d91dbcbcd3f2188977ac36e06adf57803b4842.tar.bz2 openshift-73d91dbcbcd3f2188977ac36e06adf57803b4842.tar.xz openshift-73d91dbcbcd3f2188977ac36e06adf57803b4842.zip |
etcd: use as system container
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Diffstat (limited to 'playbooks/common/openshift-cluster/upgrades')
-rw-r--r-- | playbooks/common/openshift-cluster/upgrades/etcd/backup.yml | 2 | ||||
-rw-r--r-- | playbooks/common/openshift-cluster/upgrades/etcd/upgrade.yml | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/playbooks/common/openshift-cluster/upgrades/etcd/backup.yml b/playbooks/common/openshift-cluster/upgrades/etcd/backup.yml index d0eadf1fc..45aabf3e4 100644 --- a/playbooks/common/openshift-cluster/upgrades/etcd/backup.yml +++ b/playbooks/common/openshift-cluster/upgrades/etcd/backup.yml @@ -4,7 +4,7 @@ vars: embedded_etcd: "{{ groups.oo_etcd_to_config | default([]) | length == 0 }}" timestamp: "{{ lookup('pipe', 'date +%Y%m%d%H%M%S') }}" - etcdctl_command: "{{ 'etcdctl' if not openshift.common.is_containerized or embedded_etcd else 'docker exec etcd_container etcdctl' }}" + etcdctl_command: "{{ 'etcdctl' if not openshift.common.is_containerized or embedded_etcd else 'docker exec etcd_container etcdctl' if not openshift.common.is_etcd_system_container else 'runc exec etcd etcdctl' }}" roles: - openshift_facts tasks: diff --git a/playbooks/common/openshift-cluster/upgrades/etcd/upgrade.yml b/playbooks/common/openshift-cluster/upgrades/etcd/upgrade.yml index 0f8d94737..690858c53 100644 --- a/playbooks/common/openshift-cluster/upgrades/etcd/upgrade.yml +++ b/playbooks/common/openshift-cluster/upgrades/etcd/upgrade.yml @@ -14,6 +14,16 @@ register: etcd_container_version failed_when: false when: openshift.common.is_containerized | bool + - name: Record containerized etcd version + command: docker exec etcd_container rpm -qa --qf '%{version}' etcd\* + register: etcd_container_version + failed_when: false + when: openshift.common.is_containerized | bool and not openshift.common.is_etcd_system_container | bool + - name: Record containerized etcd version + command: runc exec etcd_container rpm -qa --qf '%{version}' etcd\* + register: etcd_container_version + failed_when: false + when: openshift.common.is_containerized | bool and openshift.common.is_etcd_system_container | bool # I really dislike this copy/pasta but I wasn't able to find a way to get it to loop # through hosts, then loop through tasks only when appropriate |