Ryan Lane has uploaded a new change for review.
https://gerrit.wikimedia.org/r/112317
Change subject: Continue on single repo failures for deployment server init
......................................................................
Continue on single repo failures for deployment server init
Rather than failing immediately if a single repo is broken (for
instance if the upstream is listed incorrectly), continue on to
other non-broken repos.
Change-Id: I27add880f7f4b864f7357a298d42cd5c8bd7e8cd
---
M modules/deployment/files/modules/deploy.py
1 file changed, 7 insertions(+), 4 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/17/112317/1
diff --git a/modules/deployment/files/modules/deploy.py
b/modules/deployment/files/modules/deploy.py
index 6ec43c9..ce592ad 100644
--- a/modules/deployment/files/modules/deploy.py
+++ b/modules/deployment/files/modules/deploy.py
@@ -90,11 +90,12 @@
def deployment_server_init():
+ ret_status = 0
serv = _get_redis_serv()
is_deployment_server = __grains__.get('deployment_server')
hook_dir = __grains__.get('deployment_global_hook_dir')
if not is_deployment_server:
- return 0
+ return ret_status
deploy_user = __grains__.get('deployment_repo_user')
repo_config = __pillar__.get('repo_config')
for repo in repo_config:
@@ -120,7 +121,8 @@
status = __salt__['cmd.retcode'](cmd, runas=deploy_user,
umask=002)
if status != 0:
- return status
+ ret_status = 1
+ continue
# git clone does ignores umask and does explicit mkdir with 755
__salt__['file.set_mode'](config['location'], 2775)
# Set the repo name in the repo's config
@@ -128,8 +130,9 @@
status = __salt__['cmd.retcode'](cmd, cwd=config['location'],
runas=deploy_user, umask=002)
if status != 0:
- return status
- return 0
+ ret_status = 1
+ continue
+ return ret_status
def sync_all():
--
To view, visit https://gerrit.wikimedia.org/r/112317
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I27add880f7f4b864f7357a298d42cd5c8bd7e8cd
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ryan Lane <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits