jenkins-bot has submitted this change and it was merged.

Change subject: Cleanup scap.ssh integration
......................................................................


Cleanup scap.ssh integration

Three small, mostly cosmetic changes:

* Change command specification for rsync wikiversions from list of
  arguments to string. The list of arguments version was difficult to
  read.
* Make scap.ssh.cluster_monitor's count of completed commands be 1-based
  rather than 0-based.
* Avoid adding an unneeded newline in scap.ssh.cluster_monitor when the
  first host returns an error.

Change-Id: I930ab34b100ab7deb804ce8546818e1d1dde5b98
---
M scap/ssh.py
M scap/tasks.py
2 files changed, 7 insertions(+), 7 deletions(-)

Approvals:
  Ori.livneh: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/scap/ssh.py b/scap/ssh.py
index aadfa81..f6452fd 100644
--- a/scap/ssh.py
+++ b/scap/ssh.py
@@ -88,14 +88,15 @@
 
     try:
         for done, (host, status, output) in \
-                enumerate(cluster_ssh(hosts, command)):
+                enumerate(cluster_ssh(hosts, command), start=1):
             if status == 0:
                 ok += 1
             else:
                 failed += 1
-                # Start a new console line on the assumption that logger will
-                # be appending to console as well.
-                sys.stderr.write('\n')
+                if done > 1:
+                    # Start a new console line on the assumption that logger
+                    # will be appending to console as well.
+                    sys.stderr.write('\n')
                 logger.warning('%s on %s returned [%d]: %s',
                     description, host, status, output)
 
diff --git a/scap/tasks.py b/scap/tasks.py
index 0afd87c..0e3ea15 100644
--- a/scap/tasks.py
+++ b/scap/tasks.py
@@ -160,8 +160,7 @@
             t.mark('refreshWikiversionsCDB')
 
             run_on_cluster('rsync wikiversions', mw_install_hosts,
-                ['rsync', '-l', '%(MW_RSYNC_HOST)s::common/'
-                'wikiversions.{json,cdb}' % args.cfg,
-                '%(MW_COMMON)s' % args.cfg],
+                '/usr/bin/rsync -l %(MW_RSYNC_HOST)s::common/'
+                'wikiversions.{json,cdb} %(MW_COMMON)s' % args.cfg,
                 user='mwdeploy')
             t.mark('rsync wikiversions')

-- 
To view, visit https://gerrit.wikimedia.org/r/114744
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I930ab34b100ab7deb804ce8546818e1d1dde5b98
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/tools/scap
Gerrit-Branch: master
Gerrit-Owner: BryanDavis <[email protected]>
Gerrit-Reviewer: BryanDavis <[email protected]>
Gerrit-Reviewer: Chad <[email protected]>
Gerrit-Reviewer: Ori.livneh <[email protected]>
Gerrit-Reviewer: Reedy <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to