2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-02-19 03:55:36 +00:00

Syncfiles fixes

This commit is contained in:
Jarrod Johnson 2021-03-24 17:33:26 -04:00
parent 8ab35b11cd
commit 07ae3593c3

View File

@ -56,6 +56,7 @@ class SyncList(object):
else:
raise Exception(
'Section "{}" is not currently supported in syncfiles'.format(ent[:-1]))
continue
if '->' in ent:
k, v = ent.split('->')
k = k.strip()
@ -82,9 +83,9 @@ def sync_list_to_node(synclist, node, suffixes):
if 'merge' in suffixes:
while suffixes['merge'] and suffixes['merge'][0] == '/':
suffixes['merge'] = suffixes['merge'][1:]
for ent in sl.appendmap:
stage_ent(sl.appendmap, ent,
os.path.join(targdir, suffixes['append']))
for ent in sl.mergemap:
stage_ent(sl.mergemap, ent,
os.path.join(targdir, suffixes['merge']))
sshutil.prep_ssh_key('/etc/confluent/ssh/automation')
output = subprocess.check_output(
['rsync', '-aL', targdir + '/', 'root@{}:/'.format(node)])