Issues creating service / service apply via Director CLI
Note: This may be a feature request, just wasn't sure where that was noted in a milestone or if this is a bug.
Describe the bug
I can create service templates, but not services/service apply rules via the Director CLI. I am going by the page: https://icinga.com/docs/director/latest/doc/60-CLI.
Object after creating service "check-ping4":
Config file "zones.d/director-global/service_apply.conf"
apply Service "check-ping4" {
import "check-ping4"
assign where "Standard Linux Server" in host.templates
import DirectorOverrideTemplate
}
However, I can't get the CLI to show this object to verify it/create it:
[root@udaicinga-dev /]# icingacli director service show test
ERROR: Icinga\Exception\NotFoundError in /usr/share/icingaweb2/modules/director/library/Director/Data/Db/DbObject.php:622 with message: Failed to load icinga_service for host_id IS NULL AND service_set_id IS NULL AND object_name = 'test' AND object_type = 'template'
[root@udaicinga-dev /]# icingacli director service show test --object_type apply
ERROR: Icinga\Exception\NotFoundError in /usr/share/icingaweb2/modules/director/library/Director/Data/Db/DbObject.php:622 with message: Failed to load icinga_service for host_id IS NULL AND service_set_id IS NULL AND object_name = 'test' AND object_type = 'template'
The object as it is shown from a Directory deploy push diff
Config file "zones.d/master/services.conf"
back
object Service "test" {
host_name = "host.comain.com
import "check-ping4"
}
To Reproduce
Attempt to create a service/service apply rule via the Directory CLI
Expected behavior
Verify and create the service/apply rule as expected.
Your Environment
Include as many relevant details about the environment you experienced the problem in
- Icinga Web 2 version and modules (System - About):
Icinga Web 2 Version
2.7.1
Git commit
b0bf9c4b0637f6113adb788e78c2bcf619225dd8
PHP Version
7.1.30
Git commit date
2019-08-14
- Web browser used: Chrome/Firefox
- Icinga 2 version used (
icinga2 --version): r2.10.5-1 - PHP version used (
php --version):
/opt/rh/rh-php71/root/usr/sbin/php-fpm --version | head -n 1 | awk '{print $2}'
7.1.30
- Server operating system and version:
# cat /etc/os-release
NAME="Red Hat Enterprise Linux Server"
VERSION="7.7 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.7"
PRETTY_NAME="Red Hat Enterprise Linux Server 7.7 (Maipo)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.7:GA:server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.7
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="7.7"
Additional context
Add any other context about the problem here.
Bump, issue is still present more than 3 years later with Director 1.10.2 on icingaweb 2.11.2.
Still the same