Skip to content

Commit bb07fbf

Browse files
authored
Merge pull request #2068 from batrick/jouranlctl-all
tasks/internal/syslog: gather all journald entries
2 parents 501b942 + c2a4865 commit bb07fbf

File tree

1 file changed

+17
-13
lines changed

1 file changed

+17
-13
lines changed

teuthology/task/internal/syslog.py

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,18 @@ def syslog(ctx, config):
159159
ctx.summary['failure_reason'] = \
160160
"'{error}' in syslog".format(error=stdout)
161161

162+
log.info('Gathering journactl...')
163+
run.wait(
164+
cluster.run(
165+
args=[
166+
'sudo', 'journalctl',
167+
run.Raw('>'),
168+
f'{archive_dir}/syslog/journalctl.log',
169+
],
170+
wait=False,
171+
)
172+
)
173+
162174
log.info('Compressing syslogs...')
163175
run.wait(
164176
cluster.run(
@@ -172,25 +184,17 @@ def syslog(ctx, config):
172184
'sudo',
173185
'xargs',
174186
'-0',
187+
'--max-args=1',
188+
'--max-procs=0',
189+
'--verbose',
175190
'--no-run-if-empty',
176191
'--',
177192
'gzip',
193+
'-5',
194+
'--verbose',
178195
'--',
179196
],
180197
wait=False,
181198
)
182199
)
183200

184-
log.info('Gathering journactl -b0...')
185-
run.wait(
186-
cluster.run(
187-
args=[
188-
'sudo', 'journalctl', '-b0',
189-
run.Raw('|'),
190-
'gzip', '-9',
191-
run.Raw('>'),
192-
f'{archive_dir}/syslog/journalctl-b0.gz',
193-
],
194-
wait=False,
195-
)
196-
)

0 commit comments

Comments
 (0)