You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Created by arlecchino on 2015-09-23 16:02:55 +00:00
Assignee: gbeutner
Status: Resolved (closed on 2015-09-24 06:30:47 +00:00)
Target Version: 2.3.11
Last Update: 2015-09-25 12:38:51 +00:00 (in Redmine)
Icinga Version: 2.3.10
Backport?: Already backported
Include in Changelog: 1
If the rule uses a Dictionary iterator syntax and the value is an array the reported error is:
"critical/config: Error: Array iterator requires value to be an array."
Other way round:
If the rule uses an Array iterator syntax and the value is a dictionary the reported error is:
"critical/config: Error: Dictionary iterator requires value to be a dictionary."
Updated by arlecchino on 2015-09-23 18:08:45 +00:00
Configuration:
object Host "ahost" {
import "generic-host"
check_command = "dummy"
address = "127.0.0.1"
vars.os = "Linux"
vars.zones = ["zone1", "zone2", "zone3"]
}
apply Service "reproduce" for (cfg => zone in host.vars.zones) {
import "generic-service"
check_command = "dummy"
vars.zone = zone
assign where host.vars.zones
}
This reports error:
critical/config: Error: Array iterator requires value to be an array.
At apply Service "reproduce" for (cfg => zone in host.vars.zones):
I don't see any array iterator.
host.vars.zones is an array.
So what the error message wants to tell me?!
Shouldn't this instead report "Dictionary iterator requires value to be a dictionary"?
Then I would have understood what was wrong.
"for (cfg => zone in host.vars.zones" is a dictionary iterator, i.e. it expects host.vars.zones to be a dictionary and iterates over each key-value pair.
The problem here is that the error message is incorrect. It should be: "Dictionary iterator requires value to be a dictionary."
This issue has been migrated from Redmine: https://dev.icinga.com/issues/10205
Created by arlecchino on 2015-09-23 16:02:55 +00:00
Assignee: gbeutner
Status: Resolved (closed on 2015-09-24 06:30:47 +00:00)
Target Version: 2.3.11
Last Update: 2015-09-25 12:38:51 +00:00 (in Redmine)
If the rule uses a Dictionary iterator syntax and the value is an array the reported error is:
"critical/config: Error: Array iterator requires value to be an array."
Other way round:
If the rule uses an Array iterator syntax and the value is a dictionary the reported error is:
"critical/config: Error: Dictionary iterator requires value to be a dictionary."
I don't think this error reporting makes sense.
Changesets
2015-09-24 06:30:03 +00:00 by (unknown) 0c10d64
2015-09-25 12:38:40 +00:00 by (unknown) 992e045
The text was updated successfully, but these errors were encountered: