From ddfb742877fa4be468fd0dad51624d8e6380a962 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Mon, 3 Jul 2017 21:49:39 +0200 Subject: etcd, syscontainer: fix copy of existing datastore Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1466638 Signed-off-by: Giuseppe Scrivano --- roles/etcd/tasks/system_container.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'roles/etcd/tasks') 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 -- cgit v1.2.3