Rfaulk has uploaded a new change for review.
https://gerrit.wikimedia.org/r/82216
Change subject: add - write deploy user name to lock file.
......................................................................
add - write deploy user name to lock file.
Change-Id: Iebe501075538da5a138d3855d818c14dbfd5cf7c
---
M sartoris/sartoris.py
1 file changed, 13 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/sartoris refs/changes/16/82216/1
diff --git a/sartoris/sartoris.py b/sartoris/sartoris.py
index 965f410..5b36fee 100755
--- a/sartoris/sartoris.py
+++ b/sartoris/sartoris.py
@@ -259,9 +259,13 @@
return False
def _create_lock(self):
- """ Create a lock file """
+ """
+ Create a lock file
+ Write the user name to the lock file in the dploy directory.
+ """
log.info('{0}::SSH Lock create.'.format(__name__))
+
os.system("ssh {0}@{1} touch {2}/{3}/{4}".format(
self.config['user'],
self.config['target'],
@@ -269,6 +273,14 @@
self.DEPLOY_DIR,
self.LOCK_FILE_HANDLE))
+ os.system("ssh {0}@{1} echo \"{2}\" >> {3}/{4}/{5}".format(
+ self.config['user'],
+ self.config['target'],
+ self.config['user'],
+ self.config['path'],
+ self.DEPLOY_DIR,
+ self.LOCK_FILE_HANDLE))
+
def _remove_lock(self):
""" Remove the lock file """
cmd = "ssh {0}@{1} rm {2}/{3}/{4}".format(
--
To view, visit https://gerrit.wikimedia.org/r/82216
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iebe501075538da5a138d3855d818c14dbfd5cf7c
Gerrit-PatchSet: 1
Gerrit-Project: sartoris
Gerrit-Branch: master
Gerrit-Owner: Rfaulk <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits