Yuvipanda has submitted this change and it was merged. Change subject: tools: make webservice2 behave like webservice when called so ......................................................................
tools: make webservice2 behave like webservice when called so When webservice2 is called as webservice, it will default to precise for lighttpd. This should be changed to trusty at some point, but not yet... Bug: T90855 Change-Id: Ibc09c8f611a41dc8aaf25e9e516cba28d3d17013 --- M modules/toollabs/files/webservice2 1 file changed, 13 insertions(+), 4 deletions(-) Approvals: Yuvipanda: Looks good to me, approved jenkins-bot: Verified diff --git a/modules/toollabs/files/webservice2 b/modules/toollabs/files/webservice2 index 54a75ed..a705739 100644 --- a/modules/toollabs/files/webservice2 +++ b/modules/toollabs/files/webservice2 @@ -146,7 +146,7 @@ choices=['stop', 'start', 'restart', 'status']) parser.add_argument('--release', help='Which Ubuntu release the node running the webservice sould be on', - choices=['precise', 'trusty'], default='trusty') + choices=['precise', 'trusty']) # Compat with 'old style' webservice params, which were '-lighttpd' and '-tomcat' # Only support lighttpd and tomcat because old webservice only supported those @@ -159,9 +159,18 @@ job = get_job_xml(job_name) - # And no precise for these, so default to trusty - if args.server in ('uwsgi-python', 'nodejs', 'tomcat'): - args.release = 'trusty' + # If called as 'webservice' then default to precise instead of trusty, only for lighttpd. + # This should change at some point as we force more tools to get on trusty + if args.release is None: + if sys.argv[0].endswith('webservice') and args.server == 'lighttpd': + args.release = 'precise' + else: + args.release = 'trusty' + + # No precise support for anything other than lighttpd + if args.release == 'precise' and args.server != 'lighttpd': + print 'Running on Ubuntu Precise only available for lighttpd servers' + sys.exit(-1) if args.action == 'start': if job is not None: -- To view, visit https://gerrit.wikimedia.org/r/201383 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibc09c8f611a41dc8aaf25e9e516cba28d3d17013 Gerrit-PatchSet: 2 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Yuvipanda <yuvipa...@gmail.com> Gerrit-Reviewer: Yuvipanda <yuvipa...@gmail.com> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits