Commit Graph

100 Commits

Author SHA1 Message Date
Thomas Gelf 6786cc768f Director: some fixes for PHP v8.1
refs #2435
2021-11-24 11:56:18 +01:00
Eric Lippmann 1a61cfc5c7 Use Icinga 2's generate-ticket API 2021-07-12 23:54:47 +02:00
Mattia Codato 9387ede99a Add hook deployment onCollect 2021-04-20 16:13:48 +02:00
Thomas Gelf bf0653d238 CoreApi: unify config URL encoding 2020-03-10 00:08:43 +01:00
Thomas Gelf 66fdeec923 DeploymentHook: fix typo, keep compatibility 2020-01-21 20:08:35 +01:00
Thomas Gelf be8c1101f2 travis: use phpcs 3.5.2 2019-11-28 07:13:22 +01:00
Thomas Gelf ece50a0947 InspectPackages: new feature
fixes #1995
2019-10-17 03:18:00 +02:00
Thomas Gelf c8a3681fa4 CoreApi: more specific type-hint 2019-10-16 10:54:59 +02:00
Thomas Gelf 34a38e1f32 RestApiRespons: show part of the result on parse...
...errors
2019-09-22 17:07:22 +02:00
Thomas Gelf eaf0a5e92d CoreApi: accept versions prefixed with 'r' 2019-09-01 14:06:11 +02:00
Eric Lippmann d9b75c4a86 pgsql: Fix unexpected removal of current deployment
The director automatically removes uncollected deployments if they're
older than the running one. Deployments are uncollected if Icinga 2 did
not write a status file or startup log (yet). This happens when you
manage to ship a deployment while Icinga 2 is already preparing to
restart with a deployed configuration. It also removes deployments
which were forgotten by Icinga 2 because of bugs in previous versions.

If there are uncollected deployments, the check whether they are older
than the running one is based on string comparison of the deployments'
start time. While this works for MySQL and MariaDB where the output of
timestamps is always ISO, it may fail for PostgreSQL because there the
output format is configurable. If the output format is set to report
the day first, the string comparison "fails" and removes every first
deployment of a month:

Deployment timestamp: 01-JUN-19 00:03:37 -07:00
Running timestamp: 31-MAY-19 23:54:53 -07:00

The string comparison now reports the deployment as older than the
running one and removes it.

The fix is as easy as to use timestamps for the comparison.
2019-07-01 15:04:19 +02:00
Thomas Gelf 099c53a008
Merge pull request #1843 from gianlucapiccolo/deploy-hook
Add deployment hooks
2019-04-24 13:38:43 +02:00
Gianluca Piccolo 4a4808eea5 Add deployment hooks 2019-04-24 12:17:31 +02:00
Thomas Gelf 6bcb4a461e CoreApi: fix method call 2019-04-24 11:21:16 +02:00
Thomas Gelf 8c04de0a14 ImportsourceHookTable: show malformed data...
...plus some namespacing/cleanup
2019-04-04 13:22:39 +02:00
Thomas Gelf 44af7b3ae3 RestApiClient: do not send Connection: close...
...just throw away the curl handle. Otherwise Icinga v2.9 fails
2018-11-27 19:02:39 +01:00
Thomas Gelf 01f82b2d48 RestApiClient: use correct RuntimeException 2018-11-22 08:25:33 +01:00
Thomas Gelf 4352264b73 ImportSourceCoreApi: import flapping only for 2.8+
fixes #1652
2018-11-14 13:34:39 +01:00
Thomas Gelf 9aab203f59 CoreApi: disconnect after each request for...
...specific Icinga 2 versions

fixes #1695
fixes #1696
2018-11-14 13:25:07 +01:00
Thomas Gelf 24a7dbcac8 RestApi: remove outdated code, clean up, allow...
...to disconnect curl on demand or after each request
2018-11-14 08:19:25 +01:00
Thomas Gelf ad8a2e04f6 CoreApi: allow to fetch the Icinga Core version 2018-11-14 08:12:58 +01:00
Thomas Gelf b9ff77b4bb DeploymentLog: deal with Icinga 2 race condition...
...clean up our DB and Icinga 2 stages via API

fixes #1488
2018-10-05 14:55:48 +02:00
Thomas Gelf 4e327ed54d Json: allow null/false 2018-10-04 06:47:50 +02:00
Markus Frosch 7817c3b781 legacy: Allow configuration for file modes 2018-09-18 16:31:21 +02:00
Markus Frosch 93e1a88e10 legacy: Deploy files with proper permissions
So we can use the same logic as for icingaweb2 configs.
2018-09-18 15:10:42 +02:00
Bruno Mendola c2d54f9de9 Import check commands from Core API
fixes #1527
2018-06-15 16:19:40 +02:00
Thomas Gelf 5d4408862a Settings, CoreApi: allow to configure package name
fixes #1497
2018-06-01 16:27:00 +02:00
Thomas Gelf cf5b7c7001 CoreApi: old patch, unused code 2018-05-29 22:22:13 +02:00
Thomas Gelf 3e46602802 Json: wrap json_encode to emit errors
refs #1445
2018-03-28 18:16:30 +02:00
Thomas Gelf e879b02875 KickstartHelper: import Event Commands
fixes #1389
2018-02-20 12:39:37 +01:00
Thomas Gelf cca4092151 Deployment: move logic to dedicated classes
Extended DirectorDeploymentLog, new DeploymentInfo class
2017-07-20 08:22:31 +02:00
Thomas Gelf 8216daa3af Core: give empty list on 404, remove obsolete...
...view scripts
2017-07-14 13:21:42 +02:00
Thomas Gelf cde328eeed CoreApi: add checkServiceAndWaitForResult()
Will be moved to icingadb soon, committing this to clean up my stash
2017-07-14 13:21:42 +02:00
Thomas Gelf 8b98113e83 CoreApi: just comments 2017-03-13 22:08:43 +01:00
Thomas Gelf a3249350c2 CoreApi: remove space for compliance 2017-02-02 12:34:00 +01:00
Thomas Gelf aa0c04d5e7 CoreApi: add a couple of helper methods 2017-01-31 10:03:58 +01:00
Thomas Gelf e1b420d4c4 CoreApi: allow to stream raw events
fixes #744
2017-01-24 11:14:12 +01:00
Thomas Gelf 5c158e708e RestApiClient: re-add lost method 2017-01-19 22:49:51 +01:00
Thomas Gelf b7a10d296c phpcs: mostly new PSR-2 SpacingAfter/Before checks 2017-01-13 20:54:52 +01:00
Thomas Gelf 9e771f2d5a Fix phpcs complaints 2017-01-13 19:47:54 +01:00
Markus Frosch f6a5c8cbc5 LegacyDeploymentApi: Expire old stages that haven't got activated
For about an hour.

refs #13049
2016-11-04 16:56:52 +01:00
Markus Frosch a3d69c4f4c LegacyDeploymentApi: Call activation tool to deploy a new stage
refs #13049
2016-11-04 16:40:22 +01:00
Markus Frosch 660f41f94d LegacyDeploymentApi: Call activation tool to deploy a new stage
refs #13049
2016-11-04 16:38:08 +01:00
Markus Frosch 7fc0da6e21 LegacyDeploymentApi: Add deployment Api for Icinga 1.x
refs #13049
2016-11-04 16:12:33 +01:00
Markus Frosch 1786d08321 CoreApi: Use DeploymentApiInterface
refs #13049
2016-11-04 14:13:07 +01:00
Thomas Gelf e410beb935 CoreApi: skip incomplete stages
fixes #13028
2016-11-02 11:06:15 +01:00
Thomas Gelf ee0def7d2b Lots of files: make IDE users happy 2016-11-01 18:28:36 +01:00
Thomas Gelf cbf1a30a26 Kickstart: import notification commands
fixes #12028
2016-10-30 12:35:12 +00:00
Thomas Gelf b8b047a1e4 ImportSourceCoreApi: allow to import user groups
fixes #11511
2016-08-24 14:15:40 +00:00
Thomas Gelf f6c1a9f0f7 CoreApi: shorten startup log
Everything more than 60k is absolutely insane

fixes #12231
2016-07-26 13:14:14 +02:00