summaryrefslogtreecommitdiffstats
path: root/playbooks/adhoc/upgrades/upgrade.yml
diff options
context:
space:
mode:
authorDevan Goodwin <dgoodwin@redhat.com>2015-10-30 09:02:26 -0300
committerDevan Goodwin <dgoodwin@redhat.com>2015-10-30 09:33:32 -0300
commitef2e4fc1fa247ba51394766f9cf9279f0beaf0b0 (patch)
treefdf7f8adcac640f029da0c957217286fead821fe /playbooks/adhoc/upgrades/upgrade.yml
parent18df191a381ced63613dea302c5bf2e172d3c803 (diff)
downloadopenshift-ef2e4fc1fa247ba51394766f9cf9279f0beaf0b0.tar.gz
openshift-ef2e4fc1fa247ba51394766f9cf9279f0beaf0b0.tar.bz2
openshift-ef2e4fc1fa247ba51394766f9cf9279f0beaf0b0.tar.xz
openshift-ef2e4fc1fa247ba51394766f9cf9279f0beaf0b0.zip
Add etcd_data_dir fact.
Diffstat (limited to 'playbooks/adhoc/upgrades/upgrade.yml')
-rw-r--r--playbooks/adhoc/upgrades/upgrade.yml27
1 files changed, 14 insertions, 13 deletions
diff --git a/playbooks/adhoc/upgrades/upgrade.yml b/playbooks/adhoc/upgrades/upgrade.yml
index ec0eca66c..948a320a2 100644
--- a/playbooks/adhoc/upgrades/upgrade.yml
+++ b/playbooks/adhoc/upgrades/upgrade.yml
@@ -14,25 +14,26 @@
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
+ - debug: var=etcd_data_dir
+ - name: Check available disk space for etcd backup
+ # We assume to be using the data dir for all backups.
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
+
+ - name: Check current embedded etcd disk usage
shell: >
- du -k {{ openshift.common.data_dir }}/openshift.local.etcd | tail -n 1 | cut -f1
- register: etc_disk_usage
+ du -k {{ openshift.master.etcd_data_dir }} | tail -n 1 | cut -f1
+ register: etcd_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="{{ etcd_disk_usage.stdout }} Kb disk space required for etcd backup, {{ avail_disk.stdout }} Kb available."
+ when: (embedded_etcd | bool) and (etcd_disk_usage.stdout|int > avail_disk.stdout|int)
+ - name: Install etcd (for etcdctl)
+ yum: pkg=etcd state=latest
+ - name: Generate etcd backup
+ command: etcdctl backup
- fail: msg="All done for now."
- name: Re-Run cluster configuration to apply latest configuration changes