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

Project status #52

Open
idokaplan opened this issue Dec 20, 2016 · 6 comments
Open

Project status #52

idokaplan opened this issue Dec 20, 2016 · 6 comments

Comments

@idokaplan
Copy link

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

@mchugh19
Copy link

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.

@idokaplan
Copy link
Author

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

@mchugh19
Copy link

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.

@idokaplan
Copy link
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

@mchugh19
Copy link

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?

@woody3000
Copy link

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants