summaryrefslogtreecommitdiffstats
path: root/playbooks/common/openshift-cluster/upgrades
diff options
context:
space:
mode:
authorScott Dodson <sdodson@redhat.com>2017-04-07 09:13:43 -0400
committerScott Dodson <sdodson@redhat.com>2017-04-07 09:24:48 -0400
commitda3c31cae2870a66a0524ae06c37a3fb44e1b312 (patch)
treec4ca7718037bf303a74fca7087b64ff17477d754 /playbooks/common/openshift-cluster/upgrades
parent483e58decb4daae9c355a5be8f090d1778133143 (diff)
downloadopenshift-da3c31cae2870a66a0524ae06c37a3fb44e1b312.tar.gz
openshift-da3c31cae2870a66a0524ae06c37a3fb44e1b312.tar.bz2
openshift-da3c31cae2870a66a0524ae06c37a3fb44e1b312.tar.xz
openshift-da3c31cae2870a66a0524ae06c37a3fb44e1b312.zip
Create member/snap directory encase it doesn't exist
Fixes TASK [Copy etcd v3 data store] ************************************************* fatal: [host.redhat.com]: FAILED! => { "changed": true, "cmd": [ "cp", "-a", "/var/lib/etcd//member/snap", "/var/lib/origin/etcd-backup-pre-upgrade-20170407055413/member/" ], "delta": "0:00:00.003152", "end": "2017-04-07 01:54:17.584685", "failed": true, "rc": 1, "start": "2017-04-07 01:54:17.581533", "warnings": [] } STDERR: cp: cannot create directory ?/var/lib/origin/etcd-backup-pre-upgrade-20170407055413/member/?: No such file or directory
Diffstat (limited to 'playbooks/common/openshift-cluster/upgrades')
-rw-r--r--playbooks/common/openshift-cluster/upgrades/etcd/backup.yml9
1 files changed, 7 insertions, 2 deletions
diff --git a/playbooks/common/openshift-cluster/upgrades/etcd/backup.yml b/playbooks/common/openshift-cluster/upgrades/etcd/backup.yml
index 347621a14..31a6c6c66 100644
--- a/playbooks/common/openshift-cluster/upgrades/etcd/backup.yml
+++ b/playbooks/common/openshift-cluster/upgrades/etcd/backup.yml
@@ -85,10 +85,15 @@
path: "{{ openshift.etcd.etcd_data_dir }}/member/snap/db"
register: v3_db
+ - name: Ensure v3 backup directory exists
+ file:
+ path: "{{ openshift.common.data_dir }}/etcd-backup-{{ backup_tag | default('') }}{{ timestamp }}/member/snap"
+ state: directory
+
- name: Copy etcd v3 data store
command: >
- cp -a {{ openshift.etcd.etcd_data_dir }}/member/snap
- {{ openshift.common.data_dir }}/etcd-backup-{{ backup_tag | default('') }}{{ timestamp }}/member/
+ cp -a {{ openshift.etcd.etcd_data_dir }}/member/snap/db
+ {{ openshift.common.data_dir }}/etcd-backup-{{ backup_tag | default('') }}{{ timestamp }}/member/snap/
when: v3_db.stat.exists
- set_fact: