summaryrefslogtreecommitdiffstats
path: root/playbooks
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2017-01-22 15:37:12 +0100
committerGiuseppe Scrivano <gscrivan@redhat.com>2017-02-10 10:53:44 +0100
commit73d91dbcbcd3f2188977ac36e06adf57803b4842 (patch)
treeef6822a7e30c1d16648aba48b33bcc17e1de3387 /playbooks
parent599ce1d450a0b7425928e40b9dd7296e5f055586 (diff)
downloadopenshift-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')
-rw-r--r--playbooks/adhoc/uninstall.yml5
-rw-r--r--playbooks/common/openshift-cluster/upgrades/etcd/backup.yml2
-rw-r--r--playbooks/common/openshift-cluster/upgrades/etcd/upgrade.yml10
3 files changed, 15 insertions, 2 deletions
diff --git a/playbooks/adhoc/uninstall.yml b/playbooks/adhoc/uninstall.yml
index ff71cfe38..147e84131 100644
--- a/playbooks/adhoc/uninstall.yml
+++ b/playbooks/adhoc/uninstall.yml
@@ -164,9 +164,12 @@
- atomic-enterprise
- origin
- - shell: atomic uninstall openvswitch
+ - shell: atomic uninstall "{{ item }}"
changed_when: False
failed_when: False
+ with_items:
+ - etcd
+ - openvswitch
- shell: find /var/lib/origin/openshift.local.volumes -type d -exec umount {} \; 2>/dev/null || true
changed_when: False
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