summaryrefslogtreecommitdiffstats
path: root/playbooks
diff options
context:
space:
mode:
authorDevan Goodwin <dgoodwin@redhat.com>2015-10-28 15:29:52 -0300
committerDevan Goodwin <dgoodwin@redhat.com>2015-10-29 13:27:07 -0300
commit3d7c5c6fd545112d87fa09e4a8c3f3cbc1cda1ee (patch)
treeb5e4bebe5650d543a22746a1531f5662312288f3 /playbooks
parent7197aba51d24ab2cf6cde77efa853903d7ddd5ba (diff)
downloadopenshift-3d7c5c6fd545112d87fa09e4a8c3f3cbc1cda1ee.tar.gz
openshift-3d7c5c6fd545112d87fa09e4a8c3f3cbc1cda1ee.tar.bz2
openshift-3d7c5c6fd545112d87fa09e4a8c3f3cbc1cda1ee.tar.xz
openshift-3d7c5c6fd545112d87fa09e4a8c3f3cbc1cda1ee.zip
First cut at checking available disk space for etcd backup.
Diffstat (limited to 'playbooks')
-rw-r--r--playbooks/adhoc/upgrades/upgrade.yml27
1 files changed, 26 insertions, 1 deletions
diff --git a/playbooks/adhoc/upgrades/upgrade.yml b/playbooks/adhoc/upgrades/upgrade.yml
index e8d6a335d..c2c1d57e8 100644
--- a/playbooks/adhoc/upgrades/upgrade.yml
+++ b/playbooks/adhoc/upgrades/upgrade.yml
@@ -1,5 +1,5 @@
---
-- name: Verify deployment type
+- name: Verify upgrade can proceed
hosts: masters
tasks:
# Checking the global deployment type rather than host facts, this is about
@@ -7,6 +7,31 @@
- fail: msg="Deployment type enterprise not supported for upgrade"
when: deployment_type == "enterprise"
+- name: Backup etcd
+ hosts: masters
+ vars:
+ embedded_etcd: "{{ openshift.master.embedded_etcd }}"
+ roles:
+ - openshift_facts
+ tasks:
+ - name: display all variables set for the current host
+ debug:
+ var: hostvars[inventory_hostname]
+ - debug: var=embedded_etcd
+ - name: Check available data dir disk space
+ shell: >
+ df --output=avail -k {{ openshift.common.data_dir }} | tail -n 1
+ register: avail_disk
+ when: embedded_etcd | bool
+ - debug: var=avail_disk.stdout
+ - name: Check current etcd disk usage
+ shell: >
+ df --output=avail -k /var/lib/openshift/openshift.local.etcd/ | tail -n 1
+ register: etc_disk_usage
+ when: embedded_etcd | bool
+ - debug: var=etc_disk_usage.stdout
+ - fail: msg="All done for now."
+
- name: Re-Run cluster configuration to apply latest configuration changes
include: ../../common/openshift-cluster/config.yml
vars: