diff options
author | Jan Chaloupka <jchaloup@redhat.com> | 2017-11-01 21:29:54 +0100 |
---|---|---|
committer | Jan Chaloupka <jchaloup@redhat.com> | 2017-11-01 21:29:54 +0100 |
commit | 8d5e7b36d508298a0d92cba9c0f654c24c2fb0f2 (patch) | |
tree | f047bf75010a37bd9190131b0452e0ceb68da3e5 /roles/etcd | |
parent | 5bfc68706be9127199a3f3f06e04588720ed50f5 (diff) | |
download | openshift-8d5e7b36d508298a0d92cba9c0f654c24c2fb0f2.tar.gz openshift-8d5e7b36d508298a0d92cba9c0f654c24c2fb0f2.tar.bz2 openshift-8d5e7b36d508298a0d92cba9c0f654c24c2fb0f2.tar.xz openshift-8d5e7b36d508298a0d92cba9c0f654c24c2fb0f2.zip |
check presence of v2 snapshot before the migration proceeds
Diffstat (limited to 'roles/etcd')
-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 |