On 15 Jun 2009, at 08:13, Vincent C. wrote:


My Opsview version: 3.0.0 on SLES 10 SP2, customed RPM

I try to delete a service which is not used anymore and I get the following webexception:

Opsview error: Caught exception in Opsview::Web::Controller::Admin::Servicecheck->delete "Can't delete 271: DBD::mysql::st execute failed: Cannot delete or update a parent row: a foreign key constraint fails (`opsview/ servicecheckdependencies`, CONSTRAINT `servicecheckdependencies_dependencyid_fk` FOREIGN KEY (`dependencyid`) REFERENCES `servicechecks` (`id`)) [for Statement "DELETE

FROM   servicechecks
WHERE  id=?
" with ParamValues: 0='271'] at /usr/local/nagios/perl/lib/DBIx/ ContextualFetch.pm line 52. at /usr/local/opsview-web/script/../lib/Opsview/Web/ControllerBase/ Admin.pm line 240"


In my service check defintion I see that there is no host using the service check anymore. There aren't any exceptions of the service check defintion on some host. I also checked the host templates which were using the service check and it is removed from each. Finally, I checked the services wich could have a this service as a 'service check dependency' and I didn't find one.

This looks like there is a service check which is a service dependency on a different service check, and so the db is not allowing it.

It looks like id 271 is the one you are trying to remove. In mysql, if you run:

mysql> select servicechecks.name from servicechecks, servicecheckdependencies where servicechecks.id=servicecheckid and dependencyid=271

Then it will list the names of the service checks which still have 271 as a dependency.

I think the best behaviour is that if you delete a service check which is used as a dependency for a different service check, it should just remove that dependency at the same time. We'll fix this in a future version.

Addtionally, when trying to click the 'SCs' URL in the host template list of a host template definition, I get the following webexception:

Opsview error: Caught exception in Opsview::Web::Controller::Admin::Hosttemplate->edit "Can't call method "can" on an undefined value at /usr/local/opsview-web/ script/../lib/Opsview/Web/ControllerBase/Admin.pm line 253."
 Is this a bug or am I missing a perl module in my installtion?

This was fixed in 3.0.1.

Ton

_______________________________________________
Opsview-users mailing list
[email protected]
http://lists.opsview.org/listinfo/opsview-users

Reply via email to