Do not swallow stdout from storlet daemons

Change-Id: If93917303ca993dba6762cbe2310b09c2919da1d
Signed-off-by: Takashi Kajinami <kajinamit@oss.nttdata.com>
This commit is contained in:
Takashi Kajinami
2025-08-13 22:52:44 +09:00
parent da318b97e5
commit c911bc32fd
2 changed files with 5 additions and 2 deletions

View File

@@ -132,10 +132,10 @@ class StorletDaemonFactory(SBusServer):
try:
daemon_p = subprocess.Popen(
pargs, stdout=subprocess.DEVNULL, stderr=subprocess.PIPE,
pargs, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
close_fds=True, shell=False, env=env)
logger_p = subprocess.Popen(
'logger', stdin=daemon_p.stderr,
'logger', stdin=daemon_p.stdout,
stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL,
close_fds=True, shell=False)
except OSError:

View File

@@ -115,6 +115,7 @@ class TestStorletDaemonFactory(unittest.TestCase):
def __init__(self, pid):
self.pid = pid
self.stderr = mock.MagicMock()
self.stdout = mock.MagicMock()
with mock.patch(self.os_path_isfile_path) as isfile, \
mock.patch(self.os_access_path) as access, \
@@ -253,6 +254,7 @@ class TestStorletDaemonFactory(unittest.TestCase):
def __init__(self, pid):
self.pid = pid
self.stderr = mock.MagicMock()
self.stdout = mock.MagicMock()
with mock.patch(self.os_path_isfile_path) as isfile, \
mock.patch(self.os_access_path) as access, \
@@ -559,6 +561,7 @@ class TestStorletDaemonFactory(unittest.TestCase):
def __init__(self, pid):
self.pid = pid
self.stderr = mock.MagicMock()
self.stdout = mock.MagicMock()
with mock.patch(self.os_path_isfile_path) as isfile, \
mock.patch(self.os_access_path) as access, \