Skip to content

Conversation

degemer
Copy link
Member

@degemer degemer commented Nov 7, 2016

What does this PR do?

https://docs.python.org/2/library/tempfile.html#tempfile.SpooledTemporaryFile
Use SpooledTemporaryFile for subprocess output.

Motivation

SpooledTemporaryFile stores data in memory (up to max_size, 1 MB)
instead of on disk, it should stop the agent from completely crashing when disk is
full.

Testing Guidelines

Running the agent should be enough.

https://docs.python.org/2/library/tempfile.html#tempfile.SpooledTemporaryFile
SpooledTemporaryFile stores data in memory (up to max_size, 1 MB)
instead of on disk, it should stop the agent from completely crashing when disk is
full.
@degemer degemer added this to the 5.10.1 milestone Nov 7, 2016
@olivielpeau olivielpeau self-assigned this Nov 10, 2016
Copy link
Member

@olivielpeau olivielpeau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@degemer degemer merged commit 0df2bcf into master Nov 11, 2016
@degemer degemer deleted the quentin/subprocess-output-in-memory branch November 11, 2016 17:13
truthbk pushed a commit that referenced this pull request Nov 15, 2016
https://docs.python.org/2/library/tempfile.html#tempfile.SpooledTemporaryFile
SpooledTemporaryFile stores data in memory (up to max_size, 1 MB)
instead of on disk, it should stop the agent from completely crashing when disk is
full.
degemer added a commit that referenced this pull request Nov 15, 2016
* master: (254 commits)
  Reduce the maximum amount of argument to pylint.
  [forwarder] stop flushing after 10s
  [etcd] Report errors connecting to etcd endpoint (#3007)
  Postfix check should pass raise_on_empty_output=False
  [status] Silence requests exception
  [psutil] Only set `psutil.PROCFS_PATH` once in the collector (#3013)
  [ci] fix check name detection of test files (#3021)
  [ci][rabbitmq] Increase wait timeout (#3022)
  [core] SpooledTemporaryFile for subprocess output (#3002)
  [collector] isolate system checks (#3001)
  [ci] Fix Travis jobs timing out (#3017)
  [mongo] Use db.current_op instead of manually querying (#3016)
  [ci] fix bad citizens detection (#3020)
  [ci] add debug logs (#3019)
  [mongo] use `currentOp` for mongodb 3.2+
  Use proxy for API key check in info page (#3012)
  [mongo] Add MongoDB 3.2 support
  [mongo] Add MongoDB 3.2 to travis-ci config
  [packaging] 5.11.0 nightlies (#3009)
  [core] hard-deprecate start/stop/restart/status (#3004)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants