Icinga / icinga-powershell-framework

This PowerShell module will allow to fetch data from Windows hosts and use them for inventory and monitoring solutions. Together with the Icinga Web 2 module, a detailed overview of your Windows infrastructure will be drawn.
MIT License
75 stars 33 forks source link

Installation fails: AllowUpdates can´t be processed #37

Closed benhartwich closed 3 years ago

benhartwich commented 4 years ago

Expected Behavior

Running the icinga2 wizard successfully when using this module

Current Behavior

The installation wizard failes with:

Install-IcingaAgent : Die Argumenttransformation für den Parameter "AllowUpdates" kann nicht verarbeitet werden. Der
Wert "" kann nicht in den Typ "System.Boolean" konvertiert werden. Boolesche Parameter akzeptieren nur boolesche Werte
oder Zahlen wie "$True", "$False", "1" oder "0".
In C:\Program Files\WindowsPowerShell\Modules\icinga-powershell-framework\lib\core\icingaagent\misc\Start-IcingaAgentIn
stallWizard.psm1:472 Zeichen:94
+ ... ion -Source $PackageSource -AllowUpdates $AllowVersionChanges) -Or $R ...
+                                              ~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Install-IcingaAgent], ParameterBindingArgumentTransformationException
    + FullyQualifiedErrorId : ParameterArgumentTransformationError,Install-IcingaAgent

Possible Solution

Enable AllowUpdates per default.

Steps to Reproduce (for bugs)

  1. Use the kickstart script from the installation page
  2. Fill out all questions
  3. Run the installer

Context

I´m using the following installer command line: Start-IcingaAgentInstallWizard -UseDirectorSelfService 1 -DirectorUrl https://icinga.test.eu/director/ -SelfServiceAPIKey xxxxx -AddFirewallRule True -AgentVersion 'latest' -PackageSource 'https://packages.icinga.com/windows/' -Endpoints icinga.test.eu -CAPort 5665 -AcceptConnections True -EndpointConnections [icinga.test.eu]:5665 -CAEndpoint icinga.test.eu -Ticket 'xxxxx' -EmptyTicket 1 -InstallFrameworkPlugins 1 -PluginsUrl 'https://github.com/Icinga/icinga-powershell-plugins/archive/v1.0.0-rc1/v1.0.0-rc1.zip' -InstallFrameworkService 1 -FrameworkServiceUrl 'https://github.com/Icinga/icinga-powershell-service/releases/download/v1.0.0/icinga-service-v1.0.0.zip' -ServiceDirectory 'C:\Program Files\icinga-framework-service\' -ServiceBin 'C:\Program Files\icinga-framework-service\icinga-service.exe' -RunInstaller

I´ve tried to add -AllowUpdates 1 or -AllowUpdates True before -RunInstaller, but the error persists.

Your Environment

LordHepipud commented 4 years ago

Thank you for the report. Could you please get more into detail on how you run the Wizard do end up with this configuration? In general the AllowUpdates part is coming directly from the Icinga Director and is set internally.

The proper argument to set it manually on CLI would be

-AllowVersionChanges 1

With this your current configuration should run without problems.

benhartwich commented 4 years ago

Thanks, installation succeeded.