summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDevan Goodwin <dgoodwin@redhat.com>2015-10-29 15:07:42 -0300
committerDevan Goodwin <dgoodwin@redhat.com>2015-10-29 15:07:42 -0300
commit18df191a381ced63613dea302c5bf2e172d3c803 (patch)
treef6c595fd4fe820624e854641f7ed4b3b43009a39
parent3d7c5c6fd545112d87fa09e4a8c3f3cbc1cda1ee (diff)
downloadopenshift-18df191a381ced63613dea302c5bf2e172d3c803.tar.gz
openshift-18df191a381ced63613dea302c5bf2e172d3c803.tar.bz2
openshift-18df191a381ced63613dea302c5bf2e172d3c803.tar.xz
openshift-18df191a381ced63613dea302c5bf2e172d3c803.zip
Functional disk space checking for etcd backup.
-rw-r--r--playbooks/adhoc/upgrades/upgrade.yml5
1 files changed, 4 insertions, 1 deletions
diff --git a/playbooks/adhoc/upgrades/upgrade.yml b/playbooks/adhoc/upgrades/upgrade.yml
index c2c1d57e8..ec0eca66c 100644
--- a/playbooks/adhoc/upgrades/upgrade.yml
+++ b/playbooks/adhoc/upgrades/upgrade.yml
@@ -26,10 +26,13 @@
- 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
+ du -k {{ openshift.common.data_dir }}/openshift.local.etcd | tail -n 1 | cut -f1
register: etc_disk_usage
when: embedded_etcd | bool
- debug: var=etc_disk_usage.stdout
+ - name: Abort if insufficient disk space for etcd backup
+ fail: msg="{{ etc_disk_usage.stdout }} Kb disk space required for etcd backup, {{ avail_disk.stdout }} Kb available."
+ when: (embedded_etcd | bool) and (etc_disk_usage.stdout|int > avail_disk.stdout|int)
- fail: msg="All done for now."
- name: Re-Run cluster configuration to apply latest configuration changes