Skip to content
This repository has been archived by the owner. It is now read-only.

[dev.icinga.com #5465] Bugfix for #4339 actually breaks sending commands through API #1252

Closed
icinga-migration opened this issue Jan 15, 2014 · 4 comments
Labels
Milestone

Comments

@icinga-migration
Copy link
Member

@icinga-migration icinga-migration commented Jan 15, 2014

This issue has been migrated from Redmine: https://dev.icinga.com/issues/5465

Created by lensen on 2014-01-15 11:12:58 +00:00

Assignee: mfrosch
Status: Resolved (closed on 2014-02-18 15:14:13 +00:00)
Target Version: 1.10.1
Last Update: 2014-02-18 15:14:13 +00:00 (in Redmine)

Icinga Version: 1.10.2
Icinga Web Version: 1.10.0
IDO Version: 1.10.2
OS Version: Gentoo
DB Type: MySQL
DB Version: x
Browser Version: x

Sending commands through the API fails due to a bugfix for #4339

Example:
curl -d 'command=SCHEDULE_SVC_CHECK' -d 'data={checktime 14:44:07"}' -d 'target=[{instance http://icinga.instance1/icinga-web/web/api/cmd/authkey=validkey/json

Returns:

{"success":true,"errors":[]}

And nothing shows up in the (debug) logs.

I managed to fix this with attached patch.

Once patched, the API once again returns:

{"success":true}

And the external commands show up in the Icinga logs.

Attachments

Changesets

2014-02-18 12:38:20 +00:00 by mfrosch fd76752

Removed unnecessary try/catch block on ApiCommand.

Adopted from GitHub pull request ##1

Fixes #5465
Refs #5013

Relations:

@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Jan 15, 2014

Updated by lensen on 2014-01-15 11:16:08 +00:00

Created pull request on Github:
#1

@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Jan 15, 2014

Updated by mfriedrich on 2014-01-15 11:28:08 +00:00

  • Category set to Commands
  • Status changed from New to Assigned
  • Assigned to set to mfrosch
  • Target Version set to 1.10.1
@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Feb 18, 2014

Updated by mfrosch on 2014-02-18 12:39:30 +00:00

Hey there,
thanks for your patch and pull request.

Marius fixed this initially in November, but I adopted your removal of the try/catch block.

-Markus

@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Feb 18, 2014

Updated by mfrosch on 2014-02-18 15:14:13 +00:00

  • Status changed from Assigned to Resolved
  • Done % changed from 0 to 100

Applied in changeset fd76752.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
1 participant
You can’t perform that action at this time.