Remove state_dir requirement from merger

The merger process does not use the state_dir, remove the check
that it exists.  It was already undocumented, so this now matches
the documentation.

Change-Id: Ie8cbe75ce4dff774b3f5b3bdaaf324fd9ba6698f
This commit is contained in:
James E. Blair 2017-08-03 16:48:07 -07:00
parent d23f45d12e
commit 0ea6d12c54
2 changed files with 0 additions and 13 deletions

View File

@ -1940,7 +1940,6 @@ class ZuulTestCase(BaseTestCase):
self.config.get('scheduler', 'tenant_config')))
self.config.set('scheduler', 'state_dir', self.state_root)
self.config.set('merger', 'git_dir', self.merger_src_root)
self.config.set('merger', 'state_dir', self.merger_state_root)
self.config.set('executor', 'git_dir', self.executor_src_root)
self.config.set('executor', 'private_key_file', self.private_key_file)
self.config.set('executor', 'state_dir', self.executor_state_root)

View File

@ -22,7 +22,6 @@ import extras
# instead it depends on lockfile-0.9.1 which uses pidfile.
pid_file_module = extras.try_imports(['daemon.pidlockfile', 'daemon.pidfile'])
import os
import sys
import signal
@ -80,17 +79,6 @@ def main():
server.read_config()
server.configure_connections(source_only=True)
state_dir = get_default(server.config, 'merger', 'state_dir',
'/var/lib/zuul', expand_user=True)
test_fn = os.path.join(state_dir, 'test')
try:
f = open(test_fn, 'w')
f.close()
os.unlink(test_fn)
except Exception:
print("\nUnable to write to state directory: %s\n" % state_dir)
raise
pid_fn = get_default(server.config, 'merger', 'pidfile',
'/var/run/zuul-merger/zuul-merger.pid',
expand_user=True)