summaryrefslogtreecommitdiffstats
path: root/playbooks
diff options
context:
space:
mode:
Diffstat (limited to 'playbooks')
-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