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

[dev.icinga.com #8770] object Notification + apply Service fails with error "...refers to service which doesn't exist" #2778

Closed
icinga-migration opened this issue Mar 16, 2015 · 10 comments
Milestone

Comments

@icinga-migration
Copy link
Member

@icinga-migration icinga-migration commented Mar 16, 2015

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

Created by styk on 2015-03-16 14:38:17 +00:00

Assignee: gbeutner
Status: Resolved (closed on 2015-03-23 11:50:50 +00:00)
Target Version: 2.3.3
Last Update: 2015-03-23 11:50:50 +00:00 (in Redmine)

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

Since I updated Icinga2 to version 2.3.0 and following versions I get the following error

critical/config: Error: Notification object refers to a host/service which doesn't exist.
Location:
/etc/icinga2/conf.d/testhost.conf(15): }
/etc/icinga2/conf.d/testhost.conf(16):
/etc/icinga2/conf.d/testhost.conf(17): object Notification "Testnotify" {
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
/etc/icinga2/conf.d/testhost.conf(18):   host_name = "Test_Host"
/etc/icinga2/conf.d/testhost.conf(19):   service_name = "Testservice"

when using a config set up like this:

object Host "Test_Host" {
  address               = "127.0.0.1"

  vars.community        = "test"

  check_interval        = 10
  check_command         = "hostalive"
}

apply Service "Testservice" {
  import "generic-service"
  check_command = "ping4"
  check_interval = "7200"
  assign where host.vars.community == "test"
}

object Notification "Testnotify" {
  host_name = "Test_Host"
  service_name = "Testservice"
  command = "mail-service-notification"
  interval = "86400"

  users = [ "icingaadmin" ]

  types = [ Problem, Recovery ]
}

This worked properly with all previous versions, but does not since 2.3.0. If I append the service via

object Service "Testservice" {
  import "generic-service"
  check_command = "ping4"
  check_interval = "7200"
  host_name = "Test_Host"
}

everything works.

I´m working on Ubuntu 14.04LTS, Icinga 2.3.2

Changesets

2015-03-19 14:58:38 +00:00 by (unknown) e22386e

Make load order for objects more reliable

fixes #8770

2015-03-19 16:05:08 +00:00 by (unknown) da27079

Clean up ConfigItem::CommitNewItems a bit

refs #8770

2015-03-23 14:58:15 +00:00 by (unknown) 148a6c5

Make load order for objects more reliable

fixes #8770
@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Mar 17, 2015

Updated by gbeutner on 2015-03-17 07:57:51 +00:00

  • Subject changed from Config error seit update auf 2.3.0 "...refers to service which doesn´t exist" to object Notification + apply Service fails with error "...refers to service which doesn't exist"
  • Description updated
@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Mar 18, 2015

Updated by gbeutner on 2015-03-18 16:43:56 +00:00

  • Category set to Configuration
  • Status changed from New to Assigned
  • Assigned to set to gbeutner
@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Mar 19, 2015

Updated by mfriedrich on 2015-03-19 09:13:07 +00:00

  • Target Version set to 2.3.3
@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Mar 19, 2015

Updated by gbeutner on 2015-03-19 12:51:43 +00:00

Ideally the load order should be:

  • Host (and other independent object types)
  • Plain objects (object Service ...)
  • Apply (apply Service ...)
  • Plain dependent objects (object Notification)
  • Apply for dependent objects (apply Notification)
@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Mar 19, 2015

Updated by Anonymous on 2015-03-19 15:00:06 +00:00

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

Applied in changeset e22386e.

@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Mar 19, 2015

Updated by gbeutner on 2015-03-19 15:20:54 +00:00

  • Estimated Hours set to 3
@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Mar 19, 2015

Updated by gbeutner on 2015-03-19 15:21:10 +00:00

@styk: Please test this.

@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Mar 19, 2015

Updated by gbeutner on 2015-03-19 15:21:33 +00:00

  • Status changed from Resolved to Feedback
  • Assigned to changed from gbeutner to styk
@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Mar 20, 2015

Updated by styk on 2015-03-20 16:53:24 +00:00

Tested git master, seems to work now.

@icinga-migration

This comment has been minimized.

Copy link
Member Author

@icinga-migration icinga-migration commented Mar 23, 2015

Updated by gbeutner on 2015-03-23 11:50:52 +00:00

  • Status changed from Feedback to Resolved
  • Assigned to changed from styk to gbeutner

OK, thanks.

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