Commit 23b73714 authored by David Johnson's avatar David Johnson

Attempts to workaround docker daemon sending garbled container output.

Seems that when the host is heavily loaded, docker will mix in control
chars, etc, to the output of a container.  We try to filter as much as
possible, but sadly it's not just control chars; printable chars can
sneak through.
parent d633f6a2
# Copyright (c) 2017 University of Utah and the Flux Group.
# Copyright (c) 2017, 2018 University of Utah and the Flux Group.
......@@ -282,6 +282,7 @@ sub container_run($$$$;$$$) {
$args->{'Image'} = $image;
$args->{'Cmd'} = $cmd;
$args->{'Tty'} = JSON::PP::false;
my ($code,$content,$resp);
($code,$content) = $self->container_create($id,$args);
if ($code) {
......@@ -4128,6 +4128,12 @@ sub analyzeImage($$)
if ($needunlock);
return $code;
# Santize the output. For whatever reason(s), under heavy load, it
# comes with non-printable chars occasionally, and with CRLF. Odd.
#$buf =~ s/[^[:ascii:]]//g;
#$buf =~ s/\r\n//g;
$buf =~ s/[\000-\011\014\015-\037\176-\255]//g;
TBDebugTimeStamp(" output:\n$buf");
print FD $buf;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment