Skip to content

Make full-output configurable #128

Open

Description

@chforster

I currently have the problem that my Jenkins runs into an "OutOfMemory" Exception when performing a 'cmd.run' on multiple machines which have a big return (e.g. unzip a large file without quiet parameter).
Same occurs when applying states.

It would be nice to make the "full_return" configurable which is currently hardcoded

saltFunc.put("full_return", true);

Activity

  1. mchugh19 commented on Aug 27, 2018

    @mchugh19

    Sure, that makes sense. I'll look into adding that.

  2. mchugh19 commented on Aug 29, 2018

    @mchugh19

    I've been looking over the output and am not quite sure why you are seeing the OutOfMemory error.

    Here's an example of a tar extraction run via the salt-api and cmd.run:

    {"return": [{"master": "./
    ./_modules/
    ./_modules/saltcheck.py
    ...
    "}]}
    

    Here's the same job run with full_return: "True"

    {"return": [{"master": {"jid": "20180829153616106818", "retcode": 0, "ret": "./
    ./_modules/
    ./_modules/saltcheck.py
    ...
    "}}]}
    

    I can make a release which disables the full_return option, but it might be in the parsing of the large json return that you are actually seeing the problem. I'll work up a beta release to disable full_return, and we can go from there.

    As a quick test, you could try enabling the "Skip validation of salt return" option. This should skip over the processing of any large JSON output.

  3. chforster commented on Aug 30, 2018

    @chforster
    Author

    Currenty I can not reproduce the Issue due to missing system resources.

    It happened when applying a state via your Jenkins Plugin NOT async and parallel on 10 machines (wildcard grain), which triggered a shell script (via cmd.run) which then extracted a big tar file (1.2G - approx 50.000 Files).
    The log Output was not saved to a specific Workspace File but in Jenkins System Log.

    Here my environment Info:

    • Jenkins 2.140
    • Saltstack Plugin 3.2.0
    • salt 2018.3.0 (Oxygen)
    • salt-api 2018.3.0 (Oxygen)
    • TornadoServer/4.2.1

    Configuration in Jenkins:

    • SaltAPI Version: 2017.7
    • Display format: json

    I recently solved the Problem by applying the state directly on the saltmaster and not from Jenkins.

  4. mchugh19 commented on Aug 30, 2018

    @mchugh19

    If you are able to capture the salt-api output of that operation, could you sent it to me? ([email protected]) That use case could be used to test large json returns.

    Also, if you ever run into problems like that in the future, try skipping validation of the return. That is the probable cause of resource utilization.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions