Deactivated Hosts Aren't Removed from Core

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Hossy
Posts: 27
Joined: Fri Dec 27, 2013 12:37 pm

Re: Deactivated Hosts Aren't Removed from Core

Post by Hossy »

lmiltchev wrote:I would really recommend upgrading your Nagios XI instance. We have many bug fixes and added features after 2012R1.8. Please, read the change log here:

http://assets.nagios.com/downloads/nagi ... S-2012.TXT
I will discuss this internally. Upgrading our instance is a little bit involved, hence my question about testing on 2012R1.8.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Deactivated Hosts Aren't Removed from Core

Post by lmiltchev »

I will discuss this internally. Upgrading our instance is a little bit involved, hence my question about testing on 2012R1.8.
I did a fresh install of 2012R1.8. Tried to deactivate and delete localhost. In both cases I was warned about dependent relationships...
example1.PNG
example2.PNG
You do not have the required permissions to view the files attached to this post.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Hossy
Posts: 27
Joined: Fri Dec 27, 2013 12:37 pm

Re: Deactivated Hosts Aren't Removed from Core

Post by Hossy »

lmiltchev wrote:
I will discuss this internally. Upgrading our instance is a little bit involved, hence my question about testing on 2012R1.8.
I did a fresh install of 2012R1.8. Tried to deactivate and delete localhost. In both cases I was warned about dependent relationships...
example1.PNG
example2.PNG
Thanks, lmiltchev. Can you recap the steps you performed to make sure I didn't miss something? Please use as much detail as possible.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Deactivated Hosts Aren't Removed from Core

Post by abrist »

lmiltchev wrote: In both cases I was warned about dependent relationships...
This is WAI, as the services for localhost depend on it. If you remove the host before the services (in this case) you will receive the error.
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Deactivated Hosts Aren't Removed from Core

Post by lmiltchev »

Thanks, lmiltchev. Can you recap the steps you performed to make sure I didn't miss something? Please use as much detail as possible.
1. I downloaded the 2012R1.8 tarball to my "/tmp" directory, un-tared it, cd-ed to "/tmp/nagiosxi" directory and ran "./fullinstall".

2. I logged in the CCM->Hosts, clicked on the "Yes Active" button (trying to deactivate localhost), and saw the error message about dependent relationships (my first screenshot).

3. I clicked on the "Delete" action button (trying to delete localhost), and saw another error message about dependent relationships (my second screenshot).
Be sure to check out our Knowledgebase for helpful articles and solutions!
Hossy
Posts: 27
Joined: Fri Dec 27, 2013 12:37 pm

Re: Deactivated Hosts Aren't Removed from Core

Post by Hossy »

lmiltchev wrote:
Thanks, lmiltchev. Can you recap the steps you performed to make sure I didn't miss something? Please use as much detail as possible.
1. I downloaded the 2012R1.8 tarball to my "/tmp" directory, un-tared it, cd-ed to "/tmp/nagiosxi" directory and ran "./fullinstall".

2. I logged in the CCM->Hosts, clicked on the "Yes Active" button (trying to deactivate localhost), and saw the error message about dependent relationships (my first screenshot).

3. I clicked on the "Delete" action button (trying to delete localhost), and saw another error message about dependent relationships (my second screenshot).
So you didn't apply the patch from Steve?
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Deactivated Hosts Aren't Removed from Core

Post by lmiltchev »

I applied it to a newer version of XI and it worked as expected. I didn't apply it on Nagios XI 2012R1.8, but this didn't seem to make a difference... I am not 100% sure what the issue is. I tried to follow the steps that you outlined:
Here's what happens:
1. Deactivate a host (and possibly another type of change) that causes the "Verify" step to fail.
2. Apply Configuration (this fails).
3. CCM reverts the config files to their previous state, but leaves the database settings unchanged.
4. User fixes the error.
5. Apply Configuration (this succeeds this time).
During my tests:
1. Deactivate a host (and possibly another type of change) that causes the "Verify" step to fail.
I tried to deactivate or delete localhost, but I would get the "Item localhost cannot be disabled because it has dependent relationships" error. "Verify" didn't fail for me, since the host was NOT deactivated.
2. Apply Configuration (this fails).
Apply Configuration didn't fail either.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Hossy
Posts: 27
Joined: Fri Dec 27, 2013 12:37 pm

Re: Deactivated Hosts Aren't Removed from Core

Post by Hossy »

lmiltchev wrote:I applied it to a newer version of XI and it worked as expected. I didn't apply it on Nagios XI 2012R1.8, but this didn't seem to make a difference... I am not 100% sure what the issue is. I tried to follow the steps that you outlined:
Is there an option to enable/disable the checking of dependencies before delete/deactivate operations?
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Deactivated Hosts Aren't Removed from Core

Post by slansing »

No, not that I know of, the reason being is the dependencies are made in the database as well, and it won't let you break that chain because of this.
Hossy
Posts: 27
Joined: Fri Dec 27, 2013 12:37 pm

Re: Deactivated Hosts Aren't Removed from Core

Post by Hossy »

slansing wrote:No, not that I know of, the reason being is the dependencies are made in the database as well, and it won't let you break that chain because of this.
slansing: There can't be any dependencies (at least in the form of an enforced relationship) because my instance currently allows me to deactivate/delete and break the config.

We are currently upgrading to 2012R2.8 and will test again when that is complete.
Locked