Details
-
Bug
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
None
-
None
-
None
-
None
-
-
Night's Watch
-
2
-
NW - 2020-11-11
-
Needs Assessment
-
Not Needed
-
Needs Assessment
Description
MODULES-10813 introduced a new powershell script that is executed on every Windows upgrade: prerequisites_check.ps1.
This script checks whether the version in the MSI matches what $package_version we want to install.
To install a nightly build, the user would pass something like 7.0.0.463.gf7e6640e to package_version. This gets munged by the puppet_agent module into 7.0.0.463 which is then given to the prerequisites_check.ps1 script.
It appears that MSI packaging does not discern between released builds and nightly builds, as the versions reported by the MSI package are always of type MAJOR.MINOR.PATCH.
This causes the puppet-agent upgrade with nightly packages to fail with the following message:
Notice: /Stage[main]/Puppet_agent::Install::Windows/Exec[prerequisites_check.ps1]/returns: ERROR: The expected puppet-agent version(7.0.0.463) does NOT match the .msi version 7.0.0. Installation will STOP!
|
Error: 'C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NoLogo -NonInteractive C:\Users\ADMINI~1\AppData\Local\Temp\prerequisites_check.ps1 7.0.0.463 C:\ProgramData\Puppetlabs\packages\puppet-agent-7.0.0.463.gf7e6640e-x64.msi C:\Users\ADMINI~1\AppData\Local\Temp\puppet-2020_10_29-09_40-installer.log' returned 1 instead of one of [0]
|
Error: /Stage[main]/Puppet_agent::Install::Windows/Exec[prerequisites_check.ps1]/returns: change from 'notrun' to ['0'] failed: 'C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe -NoProfile -NoLogo -NonInteractive C:\Users\ADMINI~1\AppData\Local\Temp\prerequisites_check.ps1 7.0.0.463 C:\ProgramData\Puppetlabs\packages\puppet-agent-7.0.0.463.gf7e6640e-x64.msi C:\Users\ADMINI~1\AppData\Local\Temp\puppet-2020_10_29-09_40-installer.log' returned 1 instead of one of [0]
|
Notice: /Stage[main]/Puppet_agent::Install::Windows/Exec[install_puppet.ps1]: Dependency Exec[prerequisites_check.ps1] has failures: true
|
In this case it would be enough to check only if the 7.0.0 part of the version matches.
Attachments
Issue Links
- is caused by
-
MODULES-10813 puppet_agent Module can only upgrade to a version with Master when specifying other versions
-
- Resolved
-