diff options
author | Giuseppe Scrivano <gscrivan@redhat.com> | 2017-07-03 21:49:39 +0200 |
---|---|---|
committer | Giuseppe Scrivano <gscrivan@redhat.com> | 2017-07-03 21:52:26 +0200 |
commit | ddfb742877fa4be468fd0dad51624d8e6380a962 (patch) | |
tree | 08701f54e002c317fe5c65494e7148f73456a17d | |
parent | ffb9854b1245120b571f637f072fac967082ed40 (diff) | |
download | openshift-ddfb742877fa4be468fd0dad51624d8e6380a962.tar.gz openshift-ddfb742877fa4be468fd0dad51624d8e6380a962.tar.bz2 openshift-ddfb742877fa4be468fd0dad51624d8e6380a962.tar.xz openshift-ddfb742877fa4be468fd0dad51624d8e6380a962.zip |
etcd, syscontainer: fix copy of existing datastore
Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1466638
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
-rw-r--r-- | roles/etcd/tasks/system_container.yml | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/roles/etcd/tasks/system_container.yml b/roles/etcd/tasks/system_container.yml index a01df66b3..e735bf50a 100644 --- a/roles/etcd/tasks/system_container.yml +++ b/roles/etcd/tasks/system_container.yml @@ -1,4 +1,7 @@ --- +- set_fact: + l_etcd_src_data_dir: "{{ '/var/lib/origin/openshift.local.etcd' if r_etcd_common_embedded_etcd | bool else '/var/lib/etcd/' }}" + - name: Pull etcd system container command: atomic pull --storage=ostree {{ openshift.etcd.etcd_image }} register: pull_result @@ -50,7 +53,7 @@ - name: Check for previous etcd data store stat: - path: "{{ etcd_data_dir }}/member/" + path: "{{ l_etcd_src_data_dir }}/member/" register: src_datastore - name: Check for etcd system container data store @@ -66,7 +69,7 @@ - name: Copy etcd data store command: > - cp -a {{ etcd_data_dir }}/member + cp -a {{ l_etcd_src_data_dir }}/member {{ r_etcd_common_system_container_host_dir }}/etcd.etcd/member when: - src_datastore.stat.exists |