sous-chefs / apt

Development repository for the apt cookbook
https://supermarket.chef.io/cookbooks/apt
Apache License 2.0
202 stars 266 forks source link

apt update fails with "STDERR: E: The method driver /usr/lib/apt/methods/deb https could not be found." #217

Closed rj-reilly closed 7 years ago

rj-reilly commented 7 years ago

Cookbook version

5.0.1

12.17.44

Platform Details

Ubuntu 16.04 test kitchen vagrant

when using apt to add the grafana repo with

  apt_repository 'grafana-server' do
      uri 'deb https://packagecloud.io/grafana/stable/debian/'
      distribution 'jessie'
      components ["main"]
      keyserver 'https://packagecloud.io/gpg.key'
      action :add
      only_if { ubuntu? }
    end

the cookbook converge successfully but there is a nasty error about apt update

* apt_repository[grafana-server] action add
           * execute[apt-cache gencaches] action nothing (skipped due to action :nothing)
           * apt_update[grafana-server] action nothing (skipped due to action :nothing)
           * file[/etc/apt/sources.list.d/grafana-server.list] action create
             - create new file /etc/apt/sources.list.d/grafana-server.list
             - update content in file /etc/apt/sources.list.d/grafana-server.list from none to 344af1
             --- /etc/apt/sources.list.d/grafana-server.list    2017-01-10 01:42:37.980366517 +0000
             +++ /etc/apt/sources.list.d/.chef-grafana-server20170110-1648-ynmcz.list   2017-01-10 01:42:37.980366517 +0000
             @@ -1 +1,2 @@
             +deb      "deb https://packagecloud.io/grafana/stable/debian/" jessie main
             - change mode from '' to '0644'
             - change owner from '' to 'root'
             - change group from '' to 'root'
           * execute[apt-cache gencaches] action run
             - execute apt-cache gencaches
           * apt_update[grafana-server] action update
             - force update new lists of packages
             * directory[/var/lib/apt/periodic] action create (up to date)
             * directory[/etc/apt/apt.conf.d] action create (up to date)
             * file[/etc/apt/apt.conf.d/15update-stamp] action create_if_missing (up to date)
             * execute[apt-get -q update] action run

        ================================================================================
        Error executing action `run` on resource 'execute[apt-get -q update]'
        ================================================================================

        Mixlib::ShellOut::ShellCommandFailed
        ------------------------------------
        Expected process to exit with [0], but received '100'
        ---- Begin output of apt-get -q update ----
        STDOUT: Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
        Ign:2 http://repositories.sensuapp.org/apt sensu InRelease
        Hit:3 http://us.archive.ubuntu.com/ubuntu xenial InRelease
        Hit:4 http://repositories.sensuapp.org/apt sensu Release
        Get:5 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
        Get:6 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
        Hit:8 https://repos.influxdata.com/ubuntu xenial InRelease
        Ign:9 https://packages.erlang-solutions.com/debian xenial InRelease
        Hit:10 https://packages.erlang-solutions.com/debian xenial Release
        Fetched 306 kB in 1s (165 kB/s)
        Reading package lists...
        STDERR: E: The method driver /usr/lib/apt/methods/deb https could not be found.
        E: Failed to fetch deb https://packagecloud.io/grafana/stable/debian/dists/jessie/InRelease  
        E: Some index files failed to download. They have been ignored, or old ones used instead.
        ---- End output of apt-get -q update ----
        Ran apt-get -q update returned 100

        Resource Declaration:
        ---------------------
        # In /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44/lib/chef/provider/apt_update.rb

         80:         declare_resource(:execute, "apt-get -q update")
         81:       end

        Compiled Resource:
        ------------------
        # Declared in /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44/lib/chef/provider/apt_update.rb:80:in `do_update'

        execute("apt-get -q update") do
          action [:run]
          retries 0
          retry_delay 2
          default_guard_interpreter :execute
          command "apt-get -q update"
          backup 5
          returns 0
          declared_type :execute
          cookbook_name "demonops"
        end

        Platform:
        ---------
        x86_64-linux

       [2017-01-10T01:42:52+00:00] ERROR: apt_update[grafana-server] (/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44/lib/chef/provider/apt_repository.rb line 59) had an error: Mixlib::ShellOut::ShellCommandFailed: execute[apt-get -q update] (/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44/lib/chef/provider/apt_update.rb line 80) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '100'
       ---- Begin output of apt-get -q update ----
       STDOUT: Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
       Ign:2 http://repositories.sensuapp.org/apt sensu InRelease
       Hit:3 http://us.archive.ubuntu.com/ubuntu xenial InRelease
       Hit:4 http://repositories.sensuapp.org/apt sensu Release
       Get:5 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
       Get:6 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
       Hit:8 https://repos.influxdata.com/ubuntu xenial InRelease
       Ign:9 https://packages.erlang-solutions.com/debian xenial InRelease
       Hit:10 https://packages.erlang-solutions.com/debian xenial Release
       Fetched 306 kB in 1s (165 kB/s)
       Reading package lists...
       STDERR: E: The method driver /usr/lib/apt/methods/deb https could not be found.
       E: Failed to fetch deb https://packagecloud.io/grafana/stable/debian/dists/jessie/InRelease  
       E: Some index files failed to download. They have been ignored, or old ones used instead.
       ---- End output of apt-get -q update ----
       Ran apt-get -q update returned 100; ignore_failure is set, continuing

             ================================================================================
             Error executing action `update` on resource 'apt_update[grafana-server]'
             ================================================================================

             Mixlib::ShellOut::ShellCommandFailed
             ------------------------------------
             execute[apt-get -q update] (/opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44/lib/chef/provider/apt_update.rb line 80) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '100'
             ---- Begin output of apt-get -q update ----
             STDOUT: Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
             Ign:2 http://repositories.sensuapp.org/apt sensu InRelease
             Hit:3 http://us.archive.ubuntu.com/ubuntu xenial InRelease
             Hit:4 http://repositories.sensuapp.org/apt sensu Release
             Get:5 http://us.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]
             Get:6 http://us.archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]
             Hit:8 https://repos.influxdata.com/ubuntu xenial InRelease
             Ign:9 https://packages.erlang-solutions.com/debian xenial InRelease
             Hit:10 https://packages.erlang-solutions.com/debian xenial Release
             Fetched 306 kB in 1s (165 kB/s)
             Reading package lists...
             STDERR: E: The method driver /usr/lib/apt/methods/deb https could not be found.
             E: Failed to fetch deb https://packagecloud.io/grafana/stable/debian/dists/jessie/InRelease  
             E: Some index files failed to download. They have been ignored, or old ones used instead.
             ---- End output of apt-get -q update ----
             Ran apt-get -q update returned 100

             Resource Declaration:
             ---------------------
             # In /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44/lib/chef/provider/apt_repository.rb

       59:         declare_resource(:apt_update, new_resource.name) do
       60:           ignore_failure true
       61:           action :nothing
       62:         end
       63: 

             Compiled Resource:
             ------------------
             # Declared in /opt/chef/embedded/lib/ruby/gems/2.3.0/gems/chef-12.17.44/lib/chef/provider/apt_repository.rb:59:in `block in <class:AptRepository>'

             apt_update("grafana-server") do
        action [:nothing]
        ignore_failure true
        retries 0
        retry_delay 2
        default_guard_interpreter :default
        declared_type :apt_update
        cookbook_name "demonops"
             end

             Platform:
             ---------
             x86_64-linux

         * apt_package[grafana] action install
           - install version 2.6.0+dfsg-1 of package grafana
         * service[grafana-server] action start
           - start service service[grafana-server]