weixin_39690097 2020-11-29 10:24
浏览 0

[dev.icinga.com #11370] API: can't remove an unused checkcommand (dependencies are not updated at runtime)

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

Created by kowallix on 2016-03-14 07:34:04 +00:00

Assignee: (none) Status: Closed (closed on 2016-05-10 11:54:28 +00:00) Target Version: (none) Last Update: 2016-05-11 07:39:44 +00:00 (in Redmine)

Icinga Version: 2.4.3
Backport?: Not yet backported
Include in Changelog: 1

I create a new checkcommand using the API. And I add a service which uses the new checkcommand.

Then I delete the service Then I want to delete the checkcommand

curl -k -s -u someone:secret -H 'Accept: application/json' -X DELETE 'https://icinga2poc.somewhere:5665/v1/objects/checkcommands/check_graphite_series_threshold' {results cannot be deleted because other objects depend on it. Use cascading delete to delete it anyway."],name could not be deleted.",type

I got a list of all services - no other check was using the checkcommand.

So I used the cascade option.

The checkcommand was deleted, but the classicUI was very unhappy.

Whoops! Error: Could not read object configuration data.

The log says: [1457418639] Error: Service description, host name, or check command is NULL [1457418639] Error: Could not register service (config file '/var/cache/icinga2/objects.cache', starting on line 271)

The Web2 UI continued to work. The classicUI worked after we restarted the icinga2 process.

Attachments

Relations:

该提问来源于开源项目:Icinga/icinga2

  • 写回答

9条回答 默认 最新

  • weixin_39690097 2020-11-29 10:24
    关注

    Updated by mfriedrich on 2016-03-14 12:49:42 +00:00

    • Relates set to 11374
    评论

报告相同问题?