Skip to content

Project status #52

Open
Open

Description

@idokaplan

Hi,

When I execute a command (for example - highstate) and the target servers are wrong, the build still finished as success.

Response on state.highstate for G@env:stage:

  • {}

Finished: SUCCESS

Please advise.
Thanks!
Ido

Activity

  1. mchugh19 commented on Dec 20, 2016

    @mchugh19

    Hmmm. I'll chalk this up as related to saltstack/salt#37043. I don't think I've seen an example of an empty return being successful, so I'll special case this as an error.

  2. idokaplan commented on Dec 20, 2016

    @idokaplan
    Author

    I just want to make sure that I understand, is it a bug? is it related to Jenkins plugin or Salt?

  3. mchugh19 commented on Dec 20, 2016

    @mchugh19

    Yep, it's a bug. The saltapi does not give a consistent response, so it is sometimes difficult to determine the success or failure of any query (hence the upstream bug report). In this particular case, I think we can also have the jenkins plugin detect this output and fail the job.

    As a workaround, I think you could select the 'wait for completion' option which would fail on this output.

  4. idokaplan commented on Dec 20, 2016

    @idokaplan
    Author

    I have selected "wait for completion", but all the builds fails even if they should be success.

    {"Error": "java.io.IOException: Server returned HTTP response code: 401 for URL: https:// sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1676)\n\tat sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)\n\tat com.waytta.Utils.getJSON(Utils.java:57)\n\tat com.waytta.SaltAPIBuilder.perform(SaltAPIBuilder.java:297)\n\tat hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)\n\tat hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:779)\n\tat hudson.model.Build$BuildExecution.build(Build.java:205)\n\tat hudson.model.Build$BuildExecution.doRun(Build.java:162)\n\tat hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)\n\tat hudson.model.Run.execute(Run.java:1729)\n\tat hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)\n\tat hudson.model.ResourceController.execute(ResourceController.java:98)\n\tat hudson.model.Executor.run(Executor.java:404)\n"}
    Build step 'Send a message to Salt API' marked build as failure
    Finished: FAILURE

  5. mchugh19 commented on Mar 24, 2017

    @mchugh19

    If you have an example of json response from the saltapi, I can ensure it passes validation. In your last mentioned output, it looks like the http endpoint returns a 401 which makes it sound like there was some other problem. Do you have an example response?

  6. woody3000 commented on Oct 22, 2018

    @woody3000

    Just ran into this same issue. Adding the @jobs runner to the external auth allowed our user to access the /jobs endpoint:
    - '@jobs' # to allow access to the jobs runner and/or wheel module

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