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

zypper upgrade is broken #4863

Open
fstrudel opened this Issue Apr 25, 2016 · 1 comment

Comments

Projects
None yet
4 participants
@fstrudel

fstrudel commented Apr 25, 2016

Description

The commit aa6663d has introduced a regression: when we update RPM on our repository, the chef-client run executing:

package 'xxx' do
  action :upgrade
end

does not upgrade the RPM package xxx using zypper on our SLES11 nodes.

Chef Version

chef-client > 12.6.0 (12.6.0 and below are fine)

Platform Version

SLES11
Linux 3.0.101-0.47.55-default #1 SMP Thu May 28 08:25:11 UTC 2015 (dc083ee) x86_64 x86_64 x86_64 GNU/Linux

Replication Case

On a SLES11 machine:

  • Have a RPM repo somewhere with package xxx, version 1.0 installed
  • Run the recipe
package 'xxx' do
  action :upgrade
end

(assuming your repo has been set correctly)

  • package xxx version 1.0 should be installed
  • Update RPM repo with package xxx, version 2.0
  • Re-run chef-client on the node. -> 2.0 is not installed, where it should.

Client Output

Here we are supposed to upgrade package 'xxx' from version 2.7.0.0-3617669 to 2.7.0.0-3792298.

# chef-client -l debug
[...]
[2016-04-21T16:33:51+00:00] INFO: Processing zypper_package[xxx] action upgrade (workspace_cas::default line 41)
[2016-04-21T16:33:51+00:00] DEBUG: Providers for generic zypper_package resource enabled on node include: [Chef::Provider::Package::Zypper]
[2016-04-21T16:33:51+00:00] DEBUG: Provider for action upgrade on resource zypper_package[xxx] is Chef::Provider::Package::Zypper
[2016-04-21T16:33:51+00:00] DEBUG: zypper_package[xxx] checking zypper
[2016-04-21T16:33:51+00:00] DEBUG: zypper_package[xxx] version 2.7.0.0-3792298
[2016-04-21T16:33:51+00:00] DEBUG: zypper_package[xxx] is installed
[2016-04-21T16:33:51+00:00] DEBUG: zypper_package[xxx] out of date version 2.7.0.0-3617669
[2016-04-21T16:33:51+00:00] DEBUG: zypper_package[xxx] checking zypper
[2016-04-21T16:33:51+00:00] DEBUG: zypper_package[xxx] version 2.7.0.0-3792298
[2016-04-21T16:33:51+00:00] DEBUG: zypper_package[xxx] is installed
[2016-04-21T16:33:51+00:00] DEBUG: zypper_package[xxx] out of date version 2.7.0.0-3617669
[2016-04-21T16:33:51+00:00] DEBUG: zypper_package[xxx] xxx the 2.7.0.0-3792298 is already installed
[2016-04-21T16:33:51+00:00] DEBUG: zypper_package[xxx] no versions to upgrade - nothing to do
[...]

The problem is the way the output of zypper is nowparsed. This is what you have when xxx version 2.7.0.0-3617669 is installed and xxx version 2.7.0.0-3792298 is available on the remote repository:

root@mysles11_node# rpm -qa | grep xxx
xxx-2.7.0.0-3617669
root@mysles11_node # zypper if xxx
Loading repository data...
Reading installed packages...

Information for package xxx:

Repository: my-repo
Name: xxx
Version: 2.7.0.0-3792298
Arch: noarch
Vendor: Acme Inc
Installed: Yes
Status: out-of-date (version 2.7.0.0-3617669 installed)
Installed Size: 77.5 MiB
Summary: xxx package
Description: 
#

Stacktrace

NOTE: CHEF CLIENT BUGS ONLY

This issue tracker is for the code contained within this repo -- chef-client, base knife functionality (not
plugins), chef-apply, chef-solo, chef-client -z, etc.

@bluca

This comment has been minimized.

bluca commented Aug 26, 2016

Hello, any news on this? It's a rather annoying bug :-(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment