Details
-
Bug
-
Status: Closed
-
Normal
-
Resolution: Done
-
PUP 3.7.4
-
None
-
5
-
RE 2015-03-25, RE 2015-04-08, RE 2015-04-22
-
Bug Fix
Description
Overview
Attempting to run puppet with install_options set to disable GPG checks for package installation results in an error from the zypper command that the -name and {-no-gpg-checks}} options are not recognised.
With the stock puppet zypper provider, its impossible to install packages with option set.
Test case
The following Puppet code was used to attempt to bypass the zypper GPG signing requirements:
package { 'REDACTED':,
|
provider => 'zypper',
|
name => REDACTED,
|
ensure => $user_supplied_variable,
|
install_options => [ '--no-gpg-checks' ],
|
}
|
Running this code resulted in an error from the zypper command being returned via a failed Puppet execution:
# /opt/puppet/bin/puppet agent --test
|
Info: Retrieving pluginfacts
|
Info: Retrieving plugin
|
Info: Loading facts
|
Info: Caching catalog for REDACTED
|
Info: Applying configuration version '1425621321'
|
Error: Could not update: Execution of '/usr/bin/zypper --terse install --auto-agree-with-licenses --no-confirm --name --no-gpg-checks REDACTED(was package name)' returned 2: Unknown option --name
|
Unknown option --no-gpg-checks
|
Wrapped exception:
|
Execution of '/usr/bin/zypper --terse install --auto-agree-with-licenses --no-confirm --name --no-gpg-checks REDACTED' returned 2: Unknown option --name
|
Unknown option --no-gpg-checks
|
Error: /Stage[main]/REDACTED/Package[REDACTED]/ensure: change from absent to latest failed: Could not update: Execution of '/usr/bin/zypper --terse install --auto-agree-with-licenses --no-confirm --name --no-gpg-checks REDACTED' returned 2: Unknown option --name
|
Unknown option --no-gpg-checks
|
Notice: Finished catalog run in 0.97 seconds
|
Experimental workaround
The zypper command in this version of SUSE expects the parameters to be ordered in a different way to that which is coded into the zypper.rb provider. As an experiment, I was able to rearrange things so that the parameters were fed in the order that the program accepts:
- --no-gpg-checks must come before the action (install)
- --name doesn't seem to be recognised at any position and had to be removed
- package name should directly follow the action, eg install foobar
Long term fix
Due to the way zypper is invoked, perhaps we may need two arguments to be passed to different parts of the command to get it to work as advertised, eg:
zypper $default_options $command_options $subcommand $subcommand_options $package_name
|
Or perhaps the invocation of the zypper command has changed between SUSE versions?
risk: low
probability: low: zypper install options on sles10
severity: low (workarounds exist)
test layer: unit
Attachments
Issue Links
- links to
- mentioned in
-
Page Loading...