6033N/AWe want to put the Swift server executables in /usr/lib/swift, which means
2810N/Athat we need to be able to call them from there. We do so by using the
2810N/A"executable" keyword argument to subprocess.Popen() (and allow for it to be
2810N/Amocked out during testing).
2810N/A
2810N/AThis patch is not suitable for pushing upstream.
2810N/A
6033N/A--- swift-2.3.0/swift/common/manager.py.~1~ 2015-04-30 06:57:49.000000000 -0700
6033N/A+++ swift-2.3.0/swift/common/manager.py 2016-02-08 00:46:36.615826872 -0800
6033N/A@@ -577,7 +577,8 @@ class Server(object):
2810N/A re_out = subprocess.PIPE
2810N/A else:
2810N/A re_out = open(os.devnull, 'w+b')
2810N/A- proc = subprocess.Popen(args, stdout=re_out, stderr=re_err)
2810N/A+ proc = subprocess.Popen(args, stdout=re_out, stderr=re_err,
6033N/A+ executable='/usr/lib/swift/' + self.cmd)
2810N/A pid_file = self.get_pid_file_name(conf_file)
2810N/A write_file(pid_file, proc.pid)
2810N/A self.procs.append(proc)
6033N/A--- swift-2.3.0/test/unit/common/test_manager.py.~1~ 2015-04-30 06:57:49.000000000 -0700
6033N/A+++ swift-2.3.0/test/unit/common/test_manager.py 2016-02-08 00:45:32.431081803 -0800
4070N/A@@ -955,7 +955,7 @@ class TestServer(unittest.TestCase):
4070N/A class MockProc(object):
2810N/A
2810N/A def __init__(self, pid, args, stdout=MockProcess.NOTHING,
2810N/A- stderr=MockProcess.NOTHING):
2810N/A+ stderr=MockProcess.NOTHING, executable=None):
2810N/A self.pid = pid
2810N/A self.args = args
2810N/A self.stdout = stdout