Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sensu-agent cannot downgrade version on Windows using Chocolatey #1312

Open
elfranne opened this issue Jun 30, 2021 · 0 comments
Open

sensu-agent cannot downgrade version on Windows using Chocolatey #1312

elfranne opened this issue Jun 30, 2021 · 0 comments

Comments

@elfranne
Copy link

elfranne commented Jun 30, 2021

Description of problem

Forcing a specific version does not work with the Chocolatey Windows package manager.

The sensu 6.4 update requires specific way of signing certificates (requires dns alt names), so I wanted to downgrade the sensu version until i could fix the certificates.

Command used and debugging output

in hiera using:

sensu::version: '6.3'

The error from running Puppet:

Error: Could not update: Execution of 'C:\ProgramData\chocolatey\choco.exe upgra
de sensu-agent --version 6.3 -y  --ignore-package-exit-codes --no-progress' retu
rned 1: Chocolatey v0.10.15
Upgrading the following packages:
sensu-agent
By upgrading you accept licenses for the packages.
A newer version of sensu-agent (v6.4.0.4826) is already installed.
 Use --allow-downgrade or --force to attempt to upgrade to older versions, or us
e side by side to allow multiple versions.

Chocolatey upgraded 0/1 packages. 1 packages failed.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Failures
 - sensu-agent - A newer version of sensu-agent (v6.4.0.4826) is already install
ed.
 Use --allow-downgrade or --force to attempt to upgrade to older versions, or us
e side by side to allow multiple versions.
Error: /Stage[main]/Sensu::Agent/Package[sensu-go-agent]/ensure: change from '6.
4.0.4826' to '6.3' failed: Could not update: Execution of 'C:\ProgramData\chocol
atey\choco.exe upgrade sensu-agent --version 6.3 -y  --ignore-package-exit-codes
 --no-progress' returned 1: Chocolatey v0.10.15
Upgrading the following packages:
sensu-agent
By upgrading you accept licenses for the packages.
A newer version of sensu-agent (v6.4.0.4826) is already installed.
 Use --allow-downgrade or --force to attempt to upgrade to older versions, or us
e side by side to allow multiple versions.

Chocolatey upgraded 0/1 packages. 1 packages failed.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Failures
 - sensu-agent - A newer version of sensu-agent (v6.4.0.4826) is already install
ed.
 Use --allow-downgrade or --force to attempt to upgrade to older versions, or us
e side by side to allow multiple versions.

Platform and version information

  • Your OS: Windows 2012 server (but applies to all Windows likely)
  • Your Ruby version: 2.5.9
  • Your version of Puppet: 6.22.1
  • Your version of Sensu:
  • Your version of this module: 5.8.0 (latest)

Anything else to add that you think will be helpful?

An option to not manage the sensu-agent package or set the --allow-downgrade as default option to be consistent with other OS.

package { 'sensu-go-agent':
  ensure            => $version,
  provider          => 'chocolatey',
  install_options   => ['--allow-downgrade'],
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant