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

zypper cannot install multiple packages #3570

Closed
furlongm opened this issue Jun 23, 2015 · 8 comments
Closed

zypper cannot install multiple packages #3570

furlongm opened this issue Jun 23, 2015 · 8 comments

Comments

@furlongm
Copy link

The following snippet fails on opensuse:

    package ['vim', 'vim-data'] do
      action :install
    end

Here is the failure:

Recipe: vim::default
  * zypper_package[vim, vim-data] action install
    * No candidate version available for vim-data
    ================================================================================
    Error executing action `install` on resource 'zypper_package[vim, vim-data]'
    ================================================================================

    Chef::Exceptions::Package
    -------------------------
    No candidate version available for vim-data

    Resource Declaration:
    ---------------------
    # In /srv/chef/cookbooks/vim/recipes/default.rb

     18:     package ['vim', 'vim-data'] do
     19:       action :install
     20:     end
     21:     cookbook_file 'vimrc.Suse' do

    Compiled Resource:
    ------------------
    # Declared in /srv/chef/cookbooks/vim/recipes/default.rb:18:in `from_file'

    zypper_package("vim, vim-data") do
      action :install
      retries 0
      retry_delay 2
      default_guard_interpreter :default
      package_name ["vim", "vim-data"]
      declared_type :package
      cookbook_name :vim
      recipe_name "default"
    end


Running handlers:
[2015-06-23T09:34:41+00:00] ERROR: Running exception handlers
Running handlers complete
[2015-06-23T09:34:41+00:00] ERROR: Exception handlers complete
Chef Client failed. 0 resources updated in 17.682571971 seconds
[2015-06-23T09:34:42+00:00] FATAL: Stacktrace dumped to /srv/chef/chef-stacktrace.out
[2015-06-23T09:34:42+00:00] ERROR: Found 1 errors, they are stored in the backtrace
[2015-06-23T09:34:42+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

I've tried with 12.3.0 and 12.4.0rc2.

@furlongm
Copy link
Author

Both packages are available and both are actually already installed:

# zypper se vim
Loading repository data...
Reading installed packages...

S | Name                      | Summary                                                             | Type
--+---------------------------+---------------------------------------------------------------------+--------

[SNIP]

i | vim                       | Vi IMproved                                                         | package
i | vim-data                  | Vi IMproved                                                         | package

I'm able to reproduce with any array of packages, not just the above. It's always the second package that is reported as having no candidate version. It doesn't matter if that package is installed or not.

@lamont-granquist
Copy link
Contributor

Multipackage is only supported on apt and yum.

@lamont-granquist lamont-granquist added this to the Help Wanted milestone Jun 24, 2015
@kleini
Copy link

kleini commented Aug 14, 2015

I am stumbling over the same problem. I need to install about 50 packages which is much slower because I have to install each package on its own. Installing all 50 packages with a single zypper call is about factor 25 faster.

@gsaslis
Copy link
Contributor

gsaslis commented Oct 12, 2015

+1 having the same problem here

gsaslis pushed a commit to gsaslis/tomcat that referenced this issue Oct 12, 2015
This reverts commit 8dbce7d, as it breaks compatibility with the opensuse platform. There is a known limitation with the zypper package manager (Chef issue [#3570](chef/chef#3570) ) where it doesn't yet support the multipackage notation. The test kitchen run fails (we really need to run those in Travis)
gsaslis pushed a commit to gsaslis/chef that referenced this issue Oct 24, 2015
@gsaslis
Copy link
Contributor

gsaslis commented Oct 24, 2015

PR #4102 should address this issue..

@lamont-granquist - please feel free to review and advise if there's something you'd like to see improved, so I can amend... : )

@furlongm
Copy link
Author

It seems that aa6663d has not fully fixed this issue. Although the syntax works, it seems to constantly loop over the array of packages, sometimes until a timeout occurs. For an array of packages of length 9 (as below) it will run get_versions 81 times (9 x 9). It does this twice, once for get_candidate_versions and once for get_current_versions, so it runs get_versions 162 (81 + 81) times in total for the below array. This means it runs zypper --non-interactive info package_name 162 times for 9 packages. Is this expected?

[2016-02-17T09:30:39+00:00] INFO: Processing zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] action install (net::default line 1)
[2016-02-17T09:30:39+00:00] DEBUG: Providers for generic zypper_package resource enabled on node include: [Chef::Provider::Package::Zypper]
[2016-02-17T09:30:39+00:00] DEBUG: Provider for action install on resource zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] is Chef::Provider::Package::Zypper
[2016-02-17T09:30:39+00:00] DEBUG: ethtool
[2016-02-17T09:30:39+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] checking zypper
[2016-02-17T09:30:40+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] version 4.0-5.2
[2016-02-17T09:30:40+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] is installed
[2016-02-17T09:30:40+00:00] DEBUG: tcpdump
[2016-02-17T09:30:40+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] checking zypper
[2016-02-17T09:30:42+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] version 4.5.1-2.2
[2016-02-17T09:30:42+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] is installed
[2016-02-17T09:30:42+00:00] DEBUG: nmap
[2016-02-17T09:30:42+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] checking zypper
[2016-02-17T09:30:43+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] version 6.47-9.10
[2016-02-17T09:30:43+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] is installed
[2016-02-17T09:30:43+00:00] DEBUG: telnet
[2016-02-17T09:30:43+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] checking zypper
[2016-02-17T09:30:44+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] version 1.2-167.1
[2016-02-17T09:30:44+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] is installed
[2016-02-17T09:30:44+00:00] DEBUG: iftop
[2016-02-17T09:30:44+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] checking zypper
[2016-02-17T09:30:45+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] version 0.99.4-7.2
[2016-02-17T09:30:45+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] is installed
[2016-02-17T09:30:45+00:00] DEBUG: whois
[2016-02-17T09:30:45+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] checking zypper
[2016-02-17T09:30:47+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] version 5.2.10-4.2
[2016-02-17T09:30:47+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] is installed
[2016-02-17T09:30:47+00:00] DEBUG: wget
[2016-02-17T09:30:47+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] checking zypper
[2016-02-17T09:30:48+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] version 1.14-2.2
[2016-02-17T09:30:48+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] is installed
[2016-02-17T09:30:48+00:00] DEBUG: iperf
[2016-02-17T09:30:48+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] checking zypper
[2016-02-17T09:30:49+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] version 3.0.11-3.2
[2016-02-17T09:30:49+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] is installed
[2016-02-17T09:30:49+00:00] DEBUG: ipset
[2016-02-17T09:30:49+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] checking zypper
[2016-02-17T09:30:51+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] version 6.25.1-4.17
[2016-02-17T09:30:51+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] is installed
[2016-02-17T09:30:51+00:00] DEBUG: ethtool
[2016-02-17T09:30:51+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] checking zypper
[2016-02-17T09:30:52+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] version 4.0-5.2
[2016-02-17T09:30:52+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] is installed
[2016-02-17T09:30:52+00:00] DEBUG: tcpdump
[2016-02-17T09:30:52+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] checking zypper
[2016-02-17T09:30:53+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] version 4.5.1-2.2
[2016-02-17T09:30:53+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] is installed
[2016-02-17T09:30:53+00:00] DEBUG: nmap
[2016-02-17T09:30:53+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] checking zypper
[2016-02-17T09:30:55+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] version 6.47-9.10
[2016-02-17T09:30:55+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] is installed
[2016-02-17T09:30:55+00:00] DEBUG: telnet
[2016-02-17T09:30:55+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] checking zypper
[2016-02-17T09:30:56+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] version 1.2-167.1
[2016-02-17T09:30:56+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] is installed
[2016-02-17T09:30:56+00:00] DEBUG: iftop
[2016-02-17T09:30:56+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] checking zypper
[2016-02-17T09:30:57+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] version 0.99.4-7.2
[2016-02-17T09:30:57+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] is installed
[2016-02-17T09:30:57+00:00] DEBUG: whois
[2016-02-17T09:30:57+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] checking zypper
[2016-02-17T09:30:59+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] version 5.2.10-4.2
[2016-02-17T09:30:59+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] is installed
[2016-02-17T09:30:59+00:00] DEBUG: wget
[2016-02-17T09:30:59+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] checking zypper
[2016-02-17T09:31:00+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] version 1.14-2.2
[2016-02-17T09:31:00+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] is installed
[2016-02-17T09:31:00+00:00] DEBUG: iperf
[2016-02-17T09:31:00+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] checking zypper
[2016-02-17T09:31:01+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] version 3.0.11-3.2
[2016-02-17T09:31:01+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] is installed
[2016-02-17T09:31:01+00:00] DEBUG: ipset
[2016-02-17T09:31:01+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] checking zypper
[2016-02-17T09:31:02+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] version 6.25.1-4.17
[2016-02-17T09:31:02+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] is installed
[2016-02-17T09:31:02+00:00] DEBUG: ethtool
[2016-02-17T09:31:02+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] checking zypper
[2016-02-17T09:31:04+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] version 4.0-5.2
[2016-02-17T09:31:04+00:00] DEBUG: zypper_package[ethtool, tcpdump, nmap, telnet, iftop, whois, wget, iperf, ipset] is installed
... until timeout occurs ...

@furlongm
Copy link
Author

Actually it calls get_versions 164 times for 9 packages, not 162 times. Not sure where the extra two runs are called from though.

furlongm added a commit to furlongm/standalone-configuration-management that referenced this issue Feb 17, 2016
@lamont-granquist
Copy link
Contributor

please open a new bug for the infinite loop problem in 12.7.2

@mwrock mwrock added Bug and removed Bug labels Mar 2, 2016
@chef chef locked and limited conversation to collaborators Nov 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants