icingaweb2-module-director
icingaweb2-module-director copied to clipboard
Unable to clone single service
Expected Behavior
Cloning a single service should be successful.
Current Behavior
When cloning a single service the operation fails, with the error message:
"Trying to recreate icinga_service ("{"host_id":"1","object_name":"test2"}", id=180) (DbObject.php:928)"
It seems the Director is trying to clone a service to the new one but with same ID as the cloned one is and it throws Duplicate ID exception there , at least when looking into the DbObject.php line:930:
Possible Solution
Steps to Reproduce (for bugs)
-
Go to: Icinga Director > Services > Single Services
-
Select a service there and click on Clone
-
Enter a new service name and click Clone and there the error message will appear
Your Environment
- Director version (System - About): 1.10.2
- Icinga Web 2 version and modules (System - About): 2.11.4
- Icinga 2 version (
icinga2 --version
): r2.13.5-1 - Operating System and version: CentOS Linux release 7.9.2009
- Webserver, PHP versions: 7.3.33
I tried that like ten times and couldn't reproduce the issue. Things you can try since it seems you are on the beginning on your journey with icinga director.
- delete the host and the host template.
- create a new host template
- create a host using the host-template
- assign a service to the host.
- clone that service
Hey @moreamazingnick, Thank you for your answer. The screenshots are from our TEST Icinga and we have this exact issue on our PROD icinga (same versions)..
I tried to do everything @moreamazingnick recommended, but the issue still remains.
I tried as well, with MariaDB, PostreSQL - works as expected