Don't enforce foreground with -d switch

We have a separate switch in place to enforce running in foreground so
it's time to decouple debug logging from running in foreground.

Change-Id: I5ad1138b0054786686a8b22aece1a473be88eee0
This commit is contained in:
Tobias Henkel 2020-01-31 11:37:31 +01:00
parent 0022884dc2
commit 31d212b72a
No known key found for this signature in database
GPG Key ID: 03750DEC158E5FA2
2 changed files with 8 additions and 10 deletions

View File

@ -0,0 +1,5 @@
---
upgrade:
- |
The -d switch doesn't enforce foreground anymore. It only enables debug
logging. To start zuul in foreground please add the -f switch instead.

View File

@ -121,10 +121,7 @@ class ZuulApp(object):
parser = self.createParser()
self.args = parser.parse_args(args)
# The arguments debug and foreground both lead to nodaemon mode so
# set nodaemon if one of them is set.
if ((hasattr(self.args, 'debug') and self.args.debug) or
(hasattr(self.args, 'foreground') and self.args.foreground)):
if hasattr(self.args, 'foreground') and self.args.foreground:
self.args.nodaemon = True
else:
self.args.nodaemon = False
@ -174,13 +171,9 @@ class ZuulDaemonApp(ZuulApp, metaclass=abc.ABCMeta):
def createParser(self):
parser = super(ZuulDaemonApp, self).createParser()
parser.add_argument('-d', dest='debug', action='store_true',
help='run in foreground with debug log. Note '
'that in future this will be changed to only '
'request debug logging. If you want to keep '
'running the process in the foreground '
'migrate/add the -f switch.')
help='enable debug log')
parser.add_argument('-f', dest='foreground', action='store_true',
help='run in foreground with info log')
help='run in foreground')
return parser
def getPidFile(self):