From 4a517db8a1db7e665bc7df253d86911677016818 Mon Sep 17 00:00:00 2001 From: jeramirez Date: Thu, 11 Feb 2016 14:42:37 -0400 Subject: [PATCH] swap two cmd in sync/host/sec_attr/__init__.py swapping the rm to the end will allow the command to run on the frontend itself unless is forbidden by design. --- src/rocks-pylib/rocks/commands/sync/host/sec_attr/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rocks-pylib/rocks/commands/sync/host/sec_attr/__init__.py b/src/rocks-pylib/rocks/commands/sync/host/sec_attr/__init__.py index 7720a95d..91d9d9a0 100644 --- a/src/rocks-pylib/rocks/commands/sync/host/sec_attr/__init__.py +++ b/src/rocks-pylib/rocks/commands/sync/host/sec_attr/__init__.py @@ -154,12 +154,12 @@ def run(self, params, args): # Ship the pickled file to destination host cmd = 'scp -q -o UserKnownHostsFile=%s %s %s:%s; ' % (khfname, fname, host, fname) - # Remove the file from the frontend - cmd = cmd + 'rm -rf %s; ' % (fname) # Run the unpickle procedure and run the plugin cmd = cmd + 'ssh -o UserKnownHostsFile=%s %s ' % (khfname,host) +\ '"/opt/rocks/bin/rocks '+\ 'run host sec_attr %s"' % (fname) + # Remove the file from the frontend + cmd = cmd + ';rm -rf %s ' % (fname) p = Parallel(cmd, host) p.start() threads.append(p)