2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-25 19:10:10 +00:00

Add '-l' to nodersync command

This commit is contained in:
Jarrod Johnson 2022-09-29 08:05:02 -04:00
parent 5a62307d1e
commit 04ee7a8c31

View File

@ -46,6 +46,8 @@ def run():
help='Specify a maximum number of '
'nodes to run rsync to, '
'prompting if over the threshold')
argparser.add_option('-l', '--loginname', type='str',
help='Username to use when connecting, defaults to current user.')
argparser.add_option('-f', '-c', '--count', type='int', default=168,
help='Number of nodes to concurrently rsync')
# among other things, FD_SETSIZE limits. Besides, spawning too many
@ -61,7 +63,10 @@ def run():
c = client.Command()
cmdstr = ' '.join(args[:-1])
cmdstr = 'rsync -av --info=progress2 ' + cmdstr
cmdstr += ' {node}:' + targpath
if options.loginname:
cmdstr += ' {}@'.format(options.loginname) + '{node}:' + targpath
else:
cmdstr += ' {node}:' + targpath
currprocs = 0
all = set([])