Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Salt runner client does not properly report exit code #195

Open
jmarinaro opened this issue Jun 14, 2019 · 0 comments
Open

Salt runner client does not properly report exit code #195

jmarinaro opened this issue Jun 14, 2019 · 0 comments

Comments

@jmarinaro
Copy link

jmarinaro commented Jun 14, 2019

The salt runner is not passing through the exit code due not matching the expected format of a list of minion returns. The runner is returning an extra data dictionary wrapper.

Before

# pepper --fail-any --client runner state.sls debug/state; echo $?
{
    "return": [
        {
            "data": {
                "salt_master": {
                    "test_|-always-fails_|-foo_|-fail_without_changes": {
                        "__id__": "always-fails",
                        "__run_num__": 1,
                        "__sls__": "debug/state",
                        "changes": {},
                        "comment": "Failure!",
                        "duration": 0.505,
                        "name": "foo",
                        "result": false,
                        "start_time": "20:49:18.876819"
                    },
                    "test_|-always-passes_|-foo_|-succeed_without_changes": {
                        "__id__": "always-passes",
                        "__run_num__": 0,
                        "__sls__": "debug/state",
                        "changes": {},
                        "comment": "Success!",
                        "duration": 0.443,
                        "name": "foo",
                        "result": true,
                        "start_time": "20:49:18.876186"
                    }
                }
            },
            "outputter": "highstate",
            "retcode": 1
        }
    ]
}
0

After

# pepper --fail-any --client runner state.sls debug/state; echo $?
{
    "return": [
        {
            "data": {
                "salt_master": {
                    "test_|-always-fails_|-foo_|-fail_without_changes": {
                        "__id__": "always-fails",
                        "__run_num__": 1,
                        "__sls__": "debug/state",
                        "changes": {},
                        "comment": "Failure!",
                        "duration": 0.543,
                        "name": "foo",
                        "result": false,
                        "start_time": "21:13:17.477775"
                    },
                    "test_|-always-passes_|-foo_|-succeed_without_changes": {
                        "__id__": "always-passes",
                        "__run_num__": 0,
                        "__sls__": "debug/state",
                        "changes": {},
                        "comment": "Success!",
                        "duration": 0.575,
                        "name": "foo",
                        "result": true,
                        "start_time": "21:13:17.477012"
                    }
                }
            },
            "outputter": "highstate",
            "retcode": 1
        }
    ]
}
1

debug/state.sls

always-passes:
  test.succeed_without_changes:
    - name: foo

always-fails:
  test.fail_without_changes:
    - name: foo
jmarinaro added a commit to jmarinaro/pepper that referenced this issue Jun 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant