Page 1 of 1

Force write config files on 2014R1.1

Posted: Wed Jun 11, 2014 2:06 pm
by GldRush98
I'm having a weird problem where I deleted a service from a host from the service's Configure tab.
It didn't delete, so I went in to CCM, found the service, deleted it from there and applied the config.
Now the service no longer shows in CCM but it is still in Nagios. I tried restarted all the Nagios services and ran the mysql repair script to make sure I didn't have any weird database corruption going on.
I looked at the actual cfg file for that host and sure enough the service is still sitting in the config file and the config file hasn't been modified for a week and a half.
So, I went to tools in CCM and hit write config files, and it tells me
Write host configurations ...
Host configuration files successfully written!

Write service configurations ...
Service configuration files successfully written!

Configuration file: hostgroups.cfg successfully written!
Configuration file: servicegroups.cfg successfully written!
Configuration file: hosttemplates.cfg successfully written!
Configuration file: servicetemplates.cfg successfully written!
Configuration file: timeperiods.cfg successfully written!
Configuration file: commands.cfg successfully written!
Configuration file: contacts.cfg successfully written!
Configuration file: contactgroups.cfg successfully written!
Configuration file: contacttemplates.cfg successfully written!
Configuration file: servicedependencies.cfg successfully written!
Configuration file: hostdependencies.cfg successfully written!
Configuration file: serviceescalations.cfg successfully written!
Configuration file: hostescalations.cfg successfully written!
Configuration file: serviceextinfo.cfg successfully written!
Configuration file: hostextinfo.cfg successfully written!
But, the cfg file remains unmodified and still has the now deleted service in it.
I feel like the write config files isn't actually re-writing the config file because it thinks nothing has changed for some reason.
Any ideas?

Re: Force write config files on 2014R1.1

Posted: Wed Jun 11, 2014 2:11 pm
by tmcdonald
Hey GladRush

This is a known issue and we've got a bug fix task open for it currently.

Re: Force write config files on 2014R1.1

Posted: Wed Jun 11, 2014 2:13 pm
by GldRush98
Ah, ok, thank you tmcdonald

Re: Force write config files on 2014R1.1

Posted: Wed Jun 11, 2014 3:16 pm
by lmiltchev
As a "workaround" you can open any other service in the CCM on the same host (as the service that you are trying to delete), and click on "Save". Next, Apply Configuration. The service should be deleted now. Let me know if this worked for you.

Re: Force write config files on 2014R1.1

Posted: Wed Jun 11, 2014 4:58 pm
by GldRush98
lmiltchev wrote:As a "workaround" you can open any other service in the CCM on the same host (as the service that you are trying to delete), and click on "Save". Next, Apply Configuration. The service should be deleted now. Let me know if this worked for you.
Yes, that got rid of it for me!

Re: Force write config files on 2014R1.1

Posted: Wed Jun 11, 2014 9:48 pm
by sreinhardt
Great! I will lock this for now, and we shall have to wait for the next release.