Debug-logs exception when too many logs are passed on to subprocess
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mojo: Continuous Delivery for Juju |
Confirmed
|
Medium
|
Unassigned |
Bug Description
Only after turning Mojo's debug on I figured out why its verify phase was failing catastrophically: my service went rogue for a few minutes generating over 4k oops, which is way above the $(ulimit -n) of the unit, so when Mojo ran the verify phase it failed due to other issues but then it errored out when pulling the logs. I suppose limiting how many logs Mojo would pull is not a solution -- well, unless there is an easy parameter for us to use in debug-logs -- so maybe at least it should not error out like that based on the current $(ulimit -n)?
$ mojo --log_level DEBUG verify --options config=
2016-02-29 21:14:57 [INFO] Using pre-existing container class lxc
2016-02-29 21:14:57 [INFO] Pulling secrets from /srv/mojo/
2016-02-29 21:14:57 [INFO] Running script verify-nagios
2016-02-29 21:21:46 [DEBUG] Debug Log Config found: {'service-cache': {'logs': ['/srv/
2016-02-29 21:22:17 [ERROR] Unknown error
Traceback (most recent call last):
File "/usr/lib/
args.func(args)
File "/usr/lib/
return method(*args, **kwargs)
File "/usr/lib/
phase.
File "/usr/lib/
exception_
File "/usr/lib/
for log in self._gather_
File "/usr/lib/
content = self._run_
File "/usr/lib/
return subprocess.
File "/usr/lib/
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "/usr/lib/
errread, errwrite)
File "/usr/lib/
raise child_exception
OSError: [Errno 7] Argument list too long
description: | updated |
Changed in mojo: | |
status: | New → Confirmed |
importance: | Undecided → Medium |