icinga-powershell-framework icon indicating copy to clipboard operation
icinga-powershell-framework copied to clipboard

When updating the agent, save indiviudal settings from the icinga service

Open stevie-sy opened this issue 4 years ago • 6 comments

Maybe it's a bug or a feature request for you - your decision :-) : We set some individual settings to the icinga service, like if the icinga service is crashing, the service should restart automatic. e.g.: image

If you start the Cmdlet "Start-IcingaAgentInstallWizard" fyou uninstall the old version and than you install the new version. It looks like during the uninstall process the service will be deleted and after the install the service will be recreated.

image

While a backup of the icinga configuration will be created during the hole update process and restored afterwards, this should also be done with the settings of the service.

Expected Behavior

Save indiviudal settings of the service, if set and restore it after the update process. This could also be switch, for people who think this should not be don automatic.

Your Environment

Tested with W2012R2, W2016 and W2019 PS: 4.6 and 4.7 Icinga-PowerShell-Framework 1.3.0

stevie-sy avatar Jan 08 '21 20:01 stevie-sy

Basically this can be seen as bug/feature request in both ways. The issue here is that for updating/downgrading the Agent we have to uninstall the Agent first, because the MSI installer is not allowing proper upgrades by cli. By doing so, the Icinga Agent service is uninstalled and reinstalled.

A proper fix for this would be, if the MSI installer allows an upgrade and leaves the service as it is. So this is a feature for the Icinga Agent MSI installer and a small re-write on the upgrade procedure of the module. I will have a look on this.

LordHepipud avatar Jan 11 '21 15:01 LordHepipud

If I'm correct, you've fixed this with https://github.com/Icinga/icinga-powershell-framework/pull/521 in 1.10.0.?

stevie-sy avatar Aug 30 '22 07:08 stevie-sy

The settings of the Agent are not saved, but we set the recover states by default now. But in general yes, recovery is set with the mentioned PR.

LordHepipud avatar Aug 30 '22 08:08 LordHepipud

ref/NC/761567

tbauriedel avatar Sep 09 '22 09:09 tbauriedel

The same applies for "update-icinga -name agent": all individual settings of the agent-service like "Recovery" or "Startup type" were reset after updating the agent.

tectumopticum avatar Jun 17 '24 08:06 tectumopticum

Additionaly it would be nice to have an explizit option to set the Startup Type, which could be used with an installer configuration.

RincewindsHat avatar Jun 18 '24 13:06 RincewindsHat