diff options
author | Scott Dodson <sdodson@redhat.com> | 2017-11-01 22:01:37 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-01 22:01:37 -0400 |
commit | ab5cc871009c74ec151cc75b6b29140f35fca2f7 (patch) | |
tree | 63208b3e70488478af48678aefa6b2ad591926d1 /roles | |
parent | 6b56e70cc4df60b228769ec257a6c5f77456084d (diff) | |
parent | 8d5e7b36d508298a0d92cba9c0f654c24c2fb0f2 (diff) | |
download | openshift-ab5cc871009c74ec151cc75b6b29140f35fca2f7.tar.gz openshift-ab5cc871009c74ec151cc75b6b29140f35fca2f7.tar.bz2 openshift-ab5cc871009c74ec151cc75b6b29140f35fca2f7.tar.xz openshift-ab5cc871009c74ec151cc75b6b29140f35fca2f7.zip |
Merge pull request #5982 from ingvagabund/check-v2-snapshot-presence-before-data-migration
check presence of v2 snapshot before the migration proceeds
Diffstat (limited to 'roles')
-rw-r--r-- | roles/etcd/tasks/migration/check.yml | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/roles/etcd/tasks/migration/check.yml b/roles/etcd/tasks/migration/check.yml index 0804d9e1c..5c45e5ae1 100644 --- a/roles/etcd/tasks/migration/check.yml +++ b/roles/etcd/tasks/migration/check.yml @@ -3,6 +3,17 @@ # Check the cluster is healthy - include: check_cluster_health.yml +# Check if there is at least one v2 snapshot +- name: Check if there is at least one v2 snapshot + find: + paths: "{{ etcd_data_dir }}/member/snap" + patterns: '*.snap' + register: snapshots_result + +- fail: + msg: "Before the migration can proceed the etcd member must write down at least one snapshot under {{ etcd_data_dir }}/member/snap directory." + when: snapshots_result.matched | int == 0 + # Check if the member has v3 data already # Run the migration only if the data are v2 - name: Check if there are any v3 data |