saltstack / salt

Software to automate the management and configuration of any infrastructure or application at scale. Get access to the Salt software package repository here:
https://repo.saltproject.io/
Apache License 2.0
14.14k stars 5.47k forks source link

Saltstack failing to install packages from Salt managed repo #51945

Closed xkisu closed 4 years ago

xkisu commented 5 years ago

Saltstack is failing to install a package, but said package can be manually installed perfectly fine

Last week one of our formulas that was working fine suddenly stopped properly installing required packages.

Because this just suddenly started happening in the last week or two and happens on 2 completely different vagrant setups it leads me to assume that it must be caused by an updated version of something, but I can't find anything that's been updated in the last couple weeks.

Here is the relevant error output from attempting to apply our topstate:

----------
          ID: ceph_repo
    Function: pkgrepo.managed
        Name: ceph
      Result: True
     Comment: Configured package repo 'ceph'
     Started: 09:52:41.403903
    Duration: 174.632 ms
     Changes:
              ----------
              repo:
                  ceph
----------
          ID: ceph_noarch_repo
    Function: pkgrepo.managed
        Name: ceph-noarch
      Result: True
     Comment: Configured package repo 'ceph-noarch'
     Started: 09:52:41.578842
    Duration: 77.853 ms
     Changes:
              ----------
              repo:
                  ceph-noarch
----------
          ID: ceph_source_repo
    Function: pkgrepo.managed
        Name: ceph-noarch
      Result: True
     Comment: Configured package repo 'ceph-noarch'
     Started: 09:52:41.656954
    Duration: 78.336 ms
     Changes:
              ----------
              baseurl:
                  ----------
                  new:
                      http://download.ceph.com/rpm-mimic/el7/SRPMS
                  old:
                      http://download.ceph.com/rpm-mimic/el7/noarch
----------
          ID: common_packages
    Function: pkg.installed
        Name: u'ceph-common'
      Result: False
     Comment: Error occurred installing package(s). Additional info follows:

              errors:
                  - Running scope as unit run-32344.scope.
                    Loaded plugins: fastestmirror
                    Loading mirror speeds from cached hostfile
                     * base: mirrors.coreix.net
                     * epel: mirror.freethought-internet.co.uk
                     * extras: mirror.freethought-internet.co.uk
                     * updates: mirrors.clouvider.net
                    No package u'ceph-common' available.
                    Error: Nothing to do
     Started: 09:52:41.735509
    Duration: 4058.527 ms
     Changes:

Setup

Centos 7 Vagrant 2.2.4 Virtualbox 5.2.26

Steps to Reproduce Issue

Test case Vagrantfile:

Vagrant.configure("2") do |config|
  config.vm.box = "centos/7"
  config.vm.host_name = "node1"

  config.vm.provider "virtualbox" do |vb, override|
    vb.name = "saltstack"
    vb.memory = "1024"
    vb.customize ["modifyvm", :id, "--natdnshostresolver1", "off"]
    override.vm.box_download_checksum_type = "sha256"
    override.vm.box_download_checksum = "b24c912b136d2aa9b7b94fc2689b2001c8d04280cf25983123e45b6a52693fb3"
    override.vm.box_url = "https://cloud.centos.org/centos/7/vagrant/x86_64/images/CentOS-7-x86_64-Vagrant-1803_01.VirtualBox.box"
  end

  config.vm.provider "hyperv" do |h, override|
    override.vm.box_download_checksum_type = "sha256"
    override.vm.box_download_checksum = "875802aae6f94daffc5d8a0b1495bb2f1fae5eef5295e4cca37b2abaeb2c00fa"
    override.vm.box_url = "https://cloud.centos.org/centos/7/vagrant/x86_64/images/CentOS-7-x86_64-Vagrant-1811_02.HyperV.box"
  end

  config.vm.provision "shell", inline: <<-SHELL
    echo "nameserver 1.1.1.1" | tee -a /etc/resolv.conf
  SHELL

  config.vm.provision :salt do |salt|
    salt.masterless = true
    salt.minion_id = "node1"
    salt.pillar({})
    salt.colorize = true
    salt.verbose = true
    salt.log_level = "warning"
    salt.run_highstate = true
  end
end

Test case sls:

ceph_repo:
  pkgrepo.managed:
    - name: ceph
    - enabled: 1
    - baseurl: "https://download.ceph.com/rpm-mimic/el7/$basearch"
    - gpgcheck: 1
    - gpgkey: https://download.ceph.com/keys/release.asc

ceph_noarch_repo:
  pkgrepo.managed:
    - name: ceph-noarch
    - enabled: 1
    - baseurl: "http://download.ceph.com/rpm-mimic/el7/noarch"
    - gpgcheck: 1
    - gpgkey: https://download.ceph.com/keys/release.asc

ceph_source_repo:
  pkgrepo.managed:
    - name: ceph-source
    - enabled: 1
    - baseurl: "http://download.ceph.com/rpm-mimic/el7/SRPMS"
    - gpgcheck: 1
    - gpgkey: https://download.ceph.com/keys/release.asc

common_packages:
  pkg.installed:
  - names:
    - ceph-common
  - fromrepo: ceph

Output from running the test case:

local:
----------
          ID: ceph_repo
    Function: pkgrepo.managed
        Name: ceph
      Result: True
     Comment: Package repo 'ceph' already configured
     Started: 10:10:50.594595
    Duration: 1146.926 ms
     Changes:
----------
          ID: ceph_noarch_repo
    Function: pkgrepo.managed
        Name: ceph-noarch
      Result: True
     Comment: Package repo 'ceph-noarch' already configured
     Started: 10:10:51.741845
    Duration: 41.597 ms
     Changes:
----------
          ID: ceph_source_repo
    Function: pkgrepo.managed
        Name: ceph-source
      Result: True
     Comment: Package repo 'ceph-source' already configured
     Started: 10:10:51.783656
    Duration: 38.233 ms
     Changes:
----------
          ID: common_packages
    Function: pkg.installed
        Name: ceph-common
      Result: False
     Comment: Error occurred installing package(s). Additional info follows:

              errors:
                  - Running scope as unit run-4210.scope.
                    Loaded plugins: fastestmirror
                    Loading mirror speeds from cached hostfile
                    Resolving Dependencies
                    --> Running transaction check
                    ---> Package ceph-common.x86_64 2:13.2.4-0.el7 will be installed
                    --> Processing Dependency: python-rbd = 2:13.2.4-0.el7 for package: 2:ceph-common-13.2.4-0.el7.x86_64
                    --> Processing Dependency: libcephfs2 = 2:13.2.4-0.el7 for package: 2:ceph-common-13.2.4-0.el7.x86_64
                    --> Processing Dependency: python-rgw = 2:13.2.4-0.el7 for package: 2:ceph-common-13.2.4-0.el7.x86_64
                    --> Processing Dependency: libradosstriper1 = 2:13.2.4-0.el7 for package: 2:ceph-common-13.2.4-0.el7.x86_64
                    --> Processing Dependency: python-cephfs = 2:13.2.4-0.el7 for package: 2:ceph-common-13.2.4-0.el7.x86_64
                    --> Processing Dependency: python-rados = 2:13.2.4-0.el7 for package: 2:ceph-common-13.2.4-0.el7.x86_64
                    --> Processing Dependency: librbd1 = 2:13.2.4-0.el7 for package: 2:ceph-common-13.2.4-0.el7.x86_64
                    --> Processing Dependency: librados2 = 2:13.2.4-0.el7 for package: 2:ceph-common-13.2.4-0.el7.x86_64
                    --> Processing Dependency: liboath.so.0(LIBOATH_1.10.0)(64bit) for package: 2:ceph-common-13.2.4-0.el7.x86_64
                    --> Processing Dependency: python-prettytable for package: 2:ceph-common-13.2.4-0.el7.x86_64
                    --> Processing Dependency: liboath.so.0(LIBOATH_1.2.0)(64bit) for package: 2:ceph-common-13.2.4-0.el7.x86_64
                    --> Processing Dependency: libibverbs.so.1()(64bit) for package: 2:ceph-common-13.2.4-0.el7.x86_64
                    --> Processing Dependency: librbd.so.1()(64bit) for package: 2:ceph-common-13.2.4-0.el7.x86_64
                    --> Processing Dependency: libtcmalloc.so.4()(64bit) for package: 2:ceph-common-13.2.4-0.el7.x86_64
                    --> Processing Dependency: libsnappy.so.1()(64bit) for package: 2:ceph-common-13.2.4-0.el7.x86_64
                    --> Processing Dependency: libleveldb.so.1()(64bit) for package: 2:ceph-common-13.2.4-0.el7.x86_64
                    --> Processing Dependency: liboath.so.0()(64bit) for package: 2:ceph-common-13.2.4-0.el7.x86_64
                    --> Processing Dependency: librados.so.2()(64bit) for package: 2:ceph-common-13.2.4-0.el7.x86_64
                    --> Processing Dependency: libfuse.so.2()(64bit) for package: 2:ceph-common-13.2.4-0.el7.x86_64
                    --> Processing Dependency: libradosstriper.so.1()(64bit) for package: 2:ceph-common-13.2.4-0.el7.x86_64
                    --> Processing Dependency: libbabeltrace.so.1()(64bit) for package: 2:ceph-common-13.2.4-0.el7.x86_64
                    --> Processing Dependency: libbabeltrace-ctf.so.1()(64bit) for package: 2:ceph-common-13.2.4-0.el7.x86_64
                    --> Processing Dependency: libceph-common.so.0()(64bit) for package: 2:ceph-common-13.2.4-0.el7.x86_64
                    --> Processing Dependency: libcephfs.so.2()(64bit) for package: 2:ceph-common-13.2.4-0.el7.x86_64
                    --> Running transaction check
                    ---> Package ceph-common.x86_64 2:13.2.4-0.el7 will be installed
                    --> Processing Dependency: liboath.so.0(LIBOATH_1.10.0)(64bit) for package: 2:ceph-common-13.2.4-0.el7.x86_64
                    --> Processing Dependency: python-prettytable for package: 2:ceph-common-13.2.4-0.el7.x86_64
                    --> Processing Dependency: liboath.so.0(LIBOATH_1.2.0)(64bit) for package: 2:ceph-common-13.2.4-0.el7.x86_64
                    --> Processing Dependency: libibverbs.so.1()(64bit) for package: 2:ceph-common-13.2.4-0.el7.x86_64
                    --> Processing Dependency: libtcmalloc.so.4()(64bit) for package: 2:ceph-common-13.2.4-0.el7.x86_64
                    --> Processing Dependency: libsnappy.so.1()(64bit) for package: 2:ceph-common-13.2.4-0.el7.x86_64
                    --> Processing Dependency: libleveldb.so.1()(64bit) for package: 2:ceph-common-13.2.4-0.el7.x86_64
                    --> Processing Dependency: liboath.so.0()(64bit) for package: 2:ceph-common-13.2.4-0.el7.x86_64
                    --> Processing Dependency: libfuse.so.2()(64bit) for package: 2:ceph-common-13.2.4-0.el7.x86_64
                    --> Processing Dependency: libbabeltrace.so.1()(64bit) for package: 2:ceph-common-13.2.4-0.el7.x86_64
                    --> Processing Dependency: libbabeltrace-ctf.so.1()(64bit) for package: 2:ceph-common-13.2.4-0.el7.x86_64
                    ---> Package libcephfs2.x86_64 2:13.2.4-0.el7 will be installed
                    --> Processing Dependency: libibverbs.so.1()(64bit) for package: 2:libcephfs2-13.2.4-0.el7.x86_64
                    ---> Package librados2.x86_64 2:13.2.4-0.el7 will be installed
                    --> Processing Dependency: libibverbs.so.1(IBVERBS_1.1)(64bit) for package: 2:librados2-13.2.4-0.el7.x86_64
                    --> Processing Dependency: libibverbs.so.1(IBVERBS_1.0)(64bit) for package: 2:librados2-13.2.4-0.el7.x86_64
                    --> Processing Dependency: libibverbs.so.1()(64bit) for package: 2:librados2-13.2.4-0.el7.x86_64
                    --> Processing Dependency: liblttng-ust.so.0()(64bit) for package: 2:librados2-13.2.4-0.el7.x86_64
                    ---> Package libradosstriper1.x86_64 2:13.2.4-0.el7 will be installed
                    --> Processing Dependency: libibverbs.so.1()(64bit) for package: 2:libradosstriper1-13.2.4-0.el7.x86_64
                    ---> Package librbd1.x86_64 2:13.2.4-0.el7 will be installed
                    --> Processing Dependency: libibverbs.so.1()(64bit) for package: 2:librbd1-13.2.4-0.el7.x86_64
                    --> Processing Dependency: liblttng-ust.so.0()(64bit) for package: 2:librbd1-13.2.4-0.el7.x86_64
                    ---> Package python-cephfs.x86_64 2:13.2.4-0.el7 will be installed
                    ---> Package python-rados.x86_64 2:13.2.4-0.el7 will be installed
                    ---> Package python-rbd.x86_64 2:13.2.4-0.el7 will be installed
                    ---> Package python-rgw.x86_64 2:13.2.4-0.el7 will be installed
                    --> Processing Dependency: librgw2 = 2:13.2.4-0.el7 for package: 2:python-rgw-13.2.4-0.el7.x86_64
                    --> Processing Dependency: librgw.so.2()(64bit) for package: 2:python-rgw-13.2.4-0.el7.x86_64
                    --> Running transaction check
                    ---> Package ceph-common.x86_64 2:13.2.4-0.el7 will be installed
                    --> Processing Dependency: liboath.so.0(LIBOATH_1.10.0)(64bit) for package: 2:ceph-common-13.2.4-0.el7.x86_64
                    --> Processing Dependency: python-prettytable for package: 2:ceph-common-13.2.4-0.el7.x86_64
                    --> Processing Dependency: liboath.so.0(LIBOATH_1.2.0)(64bit) for package: 2:ceph-common-13.2.4-0.el7.x86_64
                    --> Processing Dependency: libibverbs.so.1()(64bit) for package: 2:ceph-common-13.2.4-0.el7.x86_64
                    --> Processing Dependency: libtcmalloc.so.4()(64bit) for package: 2:ceph-common-13.2.4-0.el7.x86_64
                    --> Processing Dependency: libsnappy.so.1()(64bit) for package: 2:ceph-common-13.2.4-0.el7.x86_64
                    --> Processing Dependency: libleveldb.so.1()(64bit) for package: 2:ceph-common-13.2.4-0.el7.x86_64
                    --> Processing Dependency: liboath.so.0()(64bit) for package: 2:ceph-common-13.2.4-0.el7.x86_64
                    --> Processing Dependency: libfuse.so.2()(64bit) for package: 2:ceph-common-13.2.4-0.el7.x86_64
                    --> Processing Dependency: libbabeltrace.so.1()(64bit) for package: 2:ceph-common-13.2.4-0.el7.x86_64
                    --> Processing Dependency: libbabeltrace-ctf.so.1()(64bit) for package: 2:ceph-common-13.2.4-0.el7.x86_64
                    ---> Package libcephfs2.x86_64 2:13.2.4-0.el7 will be installed
                    --> Processing Dependency: libibverbs.so.1()(64bit) for package: 2:libcephfs2-13.2.4-0.el7.x86_64
                    ---> Package librados2.x86_64 2:13.2.4-0.el7 will be installed
                    --> Processing Dependency: libibverbs.so.1(IBVERBS_1.1)(64bit) for package: 2:librados2-13.2.4-0.el7.x86_64
                    --> Processing Dependency: libibverbs.so.1(IBVERBS_1.0)(64bit) for package: 2:librados2-13.2.4-0.el7.x86_64
                    --> Processing Dependency: libibverbs.so.1()(64bit) for package: 2:librados2-13.2.4-0.el7.x86_64
                    --> Processing Dependency: liblttng-ust.so.0()(64bit) for package: 2:librados2-13.2.4-0.el7.x86_64
                    ---> Package libradosstriper1.x86_64 2:13.2.4-0.el7 will be installed
                    --> Processing Dependency: libibverbs.so.1()(64bit) for package: 2:libradosstriper1-13.2.4-0.el7.x86_64
                    ---> Package librbd1.x86_64 2:13.2.4-0.el7 will be installed
                    --> Processing Dependency: libibverbs.so.1()(64bit) for package: 2:librbd1-13.2.4-0.el7.x86_64
                    --> Processing Dependency: liblttng-ust.so.0()(64bit) for package: 2:librbd1-13.2.4-0.el7.x86_64
                    ---> Package librgw2.x86_64 2:13.2.4-0.el7 will be installed
                    --> Processing Dependency: libibverbs.so.1()(64bit) for package: 2:librgw2-13.2.4-0.el7.x86_64
                    --> Processing Dependency: liblttng-ust.so.0()(64bit) for package: 2:librgw2-13.2.4-0.el7.x86_64
                    --> Processing Dependency: liboath.so.0()(64bit) for package: 2:librgw2-13.2.4-0.el7.x86_64
                    --> Finished Dependency Resolution
                    Error: Package: 2:librgw2-13.2.4-0.el7.x86_64 (ceph)
                               Requires: liblttng-ust.so.0()(64bit)
                    Error: Package: 2:ceph-common-13.2.4-0.el7.x86_64 (ceph)
                               Requires: libibverbs.so.1()(64bit)
                    Error: Package: 2:ceph-common-13.2.4-0.el7.x86_64 (ceph)
                               Requires: python-prettytable
                    Error: Package: 2:librgw2-13.2.4-0.el7.x86_64 (ceph)
                               Requires: liboath.so.0()(64bit)
                    Error: Package: 2:librgw2-13.2.4-0.el7.x86_64 (ceph)
                               Requires: libibverbs.so.1()(64bit)
                    Error: Package: 2:ceph-common-13.2.4-0.el7.x86_64 (ceph)
                               Requires: libbabeltrace.so.1()(64bit)
                    Error: Package: 2:ceph-common-13.2.4-0.el7.x86_64 (ceph)
                               Requires: liboath.so.0()(64bit)
                    Error: Package: 2:ceph-common-13.2.4-0.el7.x86_64 (ceph)
                               Requires: liboath.so.0(LIBOATH_1.2.0)(64bit)
                    Error: Package: 2:librbd1-13.2.4-0.el7.x86_64 (ceph)
                               Requires: liblttng-ust.so.0()(64bit)
                    Error: Package: 2:ceph-common-13.2.4-0.el7.x86_64 (ceph)
                               Requires: libleveldb.so.1()(64bit)
                    Error: Package: 2:libcephfs2-13.2.4-0.el7.x86_64 (ceph)
                               Requires: libibverbs.so.1()(64bit)
                    Error: Package: 2:ceph-common-13.2.4-0.el7.x86_64 (ceph)
                               Requires: libsnappy.so.1()(64bit)
                    Error: Package: 2:ceph-common-13.2.4-0.el7.x86_64 (ceph)
                               Requires: liboath.so.0(LIBOATH_1.10.0)(64bit)
                    Error: Package: 2:ceph-common-13.2.4-0.el7.x86_64 (ceph)
                               Requires: libfuse.so.2()(64bit)
                    Error: Package: 2:ceph-common-13.2.4-0.el7.x86_64 (ceph)
                               Requires: libtcmalloc.so.4()(64bit)
                    Error: Package: 2:librbd1-13.2.4-0.el7.x86_64 (ceph)
                               Requires: libibverbs.so.1()(64bit)
                    Error: Package: 2:libradosstriper1-13.2.4-0.el7.x86_64 (ceph)
                               Requires: libibverbs.so.1()(64bit)
                    Error: Package: 2:ceph-common-13.2.4-0.el7.x86_64 (ceph)
                               Requires: libbabeltrace-ctf.so.1()(64bit)
                    Error: Package: 2:librados2-13.2.4-0.el7.x86_64 (ceph)
                               Requires: libibverbs.so.1()(64bit)
                    Error: Package: 2:librados2-13.2.4-0.el7.x86_64 (ceph)
                               Requires: liblttng-ust.so.0()(64bit)
                    Error: Package: 2:librados2-13.2.4-0.el7.x86_64 (ceph)
                               Requires: libibverbs.so.1(IBVERBS_1.1)(64bit)
                    Error: Package: 2:librados2-13.2.4-0.el7.x86_64 (ceph)
                               Requires: libibverbs.so.1(IBVERBS_1.0)(64bit)
                     You could try using --skip-broken to work around the problem
                     You could try running: rpm -Va --nofiles --nodigest
     Started: 10:10:51.841866
    Duration: 4780.789 ms
     Changes:

Summary for local
------------
Succeeded: 3
Failed:    1
------------
Total states run:     4
Total run time:   6.008 s

Versions Report

Versions from the test case Vagrant box:

Salt Version:
           Salt: 2019.2.0

Dependency Versions:
           cffi: 1.6.0
       cherrypy: Not Installed
       dateutil: Not Installed
      docker-py: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
          ioflo: Not Installed
         Jinja2: 2.7.2
        libgit2: 0.26.3
        libnacl: Not Installed
       M2Crypto: Not Installed
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.5.6
   mysql-python: Not Installed
      pycparser: 2.14
       pycrypto: 2.6.1
   pycryptodome: Not Installed
         pygit2: 0.26.4
         Python: 2.7.5 (default, Aug  4 2017, 00:39:18)
   python-gnupg: Not Installed
         PyYAML: 3.11
          PyZMQ: 15.3.0
           RAET: Not Installed
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.2.1
            ZMQ: 4.1.4

System Versions:
           dist: centos 7.6.1810 Core
         locale: UTF-8
        machine: x86_64
        release: 3.10.0-693.21.1.el7.x86_64
         system: Linux
        version: CentOS Linux 7.6.1810 Core
garethgreenaway commented 5 years ago

@xkisu Thanks for the report. I wonder this is related to the fact that we've dropped support for virtual packages in the Fluorine release. Do you know if the celph-common package is a virtual package? /cc @saltstack/team-core

xkisu commented 5 years ago

@garethgreenaway You may be onto something there since this problem is only with certain packages, I'll check the ceph packages when I get a chance. I'm also having the same problem with Openstack packages which I believe are virtual packages so that would make sense.

xkisu commented 5 years ago

I did a bunch of checking and the packages I'm having problems with do not appear to be virtual packages.

It seems like it's might just be a problem with packages that are managed with the pkgrepo.managed state. I'm able to install packages from other repositories perfectly fine in my formulas, only the pkg.installed states for packages that are in a managed repo fail.

xkisu commented 5 years ago

I just noticed in the error output that pkg.installed seems to think the package name is literally u'ceph-common', I'm not sure where it's getting that since the package name is correctly formatted.

Reiner030 commented 5 years ago

Hi @Ch3LL and @garethgreenaway ... again,

this could be related:

I setup states to replace Oracle Java with OpenJDK for new developer/production instances because of Oracle license / removed archives of old java packages.

But the new packages weren't installed because saltstack is sure that it's already setup:

Here the partial output of generated state file and command calls:

[PROFILE ] Time (in seconds) to render '/var/cache/salt/minion/files/base/java/openjdk.sls' using 'jinja' renderer: 0.0140619277954
[DEBUG   ] Rendered data from file: /var/cache/salt/minion/files/base/java/openjdk.sls:
#
# Install Java Runtime Environment - OpenJDK version 8
#

openjdk-8-jre-headless:
  pkg.installed:
    - name: openjdk-8-jre-headless
    - retry:
        attempts: 20    # default: 2
        until: True     # default: True
        interval: 10    # default: 30
        splay: 10       # default: 0
  # path to binary is automatically set so not need to define:
  # # update-alternatives --list java
  # /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
  # path of JAVA_HOME is then:
  # # update-alternatives --query java | sed -ne 's#^Value: \(.\+\)/jre/bin/java#\1#p'
  # /usr/lib/jvm/java-8-openjdk-amd64
  #alternatives.set:
  #  - name: java
  #  - path: /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
  #  - require:
  #    - pkg: openjdk-8-jre-headless

java-package:
  test.nop:
    - require:
      - pkg: openjdk-8-jre-headless

[DEBUG   ] Results of YAML rendering:
OrderedDict([(u'openjdk-8-jre-headless', OrderedDict([(u'pkg.installed', [OrderedDict([(u'name', u'openjdk-8-jre-headless')]), OrderedDict([(u'retry', OrderedDict([(u'attempts', 20), (u'until', True), (u'interval', 10), (u'splay', 10)]))])])])), (u'java-package', OrderedDict([(u'test.nop', [OrderedDict([(u'require', [OrderedDict([(u'pkg', u'openjdk-8-jre-headless')])])])])]))])
[PROFILE ] Time (in seconds) to render '/var/cache/salt/minion/files/base/java/openjdk.sls' using 'yaml' renderer: 0.00391411781311
[DEBUG   ] LazyLoaded config.option
[DEBUG   ] LazyLoaded pkg.install
[DEBUG   ] LazyLoaded pkg.installed
[DEBUG   ] LazyLoaded systemd.booted
[DEBUG   ] DSC: Only available on Windows systems
[DEBUG   ] Module PSGet: Only available on Windows systems
[DEBUG   ] LazyLoaded platform.is_windows
[DEBUG   ] Could not LazyLoad pkg.ex_mod_init: 'pkg.ex_mod_init' is not available.
[INFO    ] Running state [openjdk-8-jre-headless] at time 18:47:51.835993
[INFO    ] Executing state pkg.installed for [openjdk-8-jre-headless]
[DEBUG   ] Could not LazyLoad pkg.resolve_capabilities: 'pkg.resolve_capabilities' is not available.
[INFO    ] Executing command [u'dpkg-query', u'--showformat', u'${Status} ${Package} ${Version} ${Architecture}', u'-W'] in directory '/root'
[DEBUG   ] Could not LazyLoad pkg.normalize_name: 'pkg.normalize_name' is not available.
[INFO    ] All specified packages are already installed
[INFO    ] Completed state [openjdk-8-jre-headless] at time 18:47:52.610427 (duration_in_ms=774.436)
[DEBUG   ] LazyLoaded test.nop
[INFO    ] Running state [java-package] at time 18:47:52.612283
[INFO    ] Executing state test.nop for [java-package]
[INFO    ] Success!
[INFO    ] Completed state [java-package] at time 18:47:52.613060 (duration_in_ms=0.777)

BTW:

It's like in https://github.com/saltstack/salt/issues/52165#issuecomment-484955181 where I forgot to mentioned it: Even after years of Saltstack development there isn't a correct testing procedure setup by the company so even basic modules/states breaks in updates even they are available since beginning! Perhaps there is a test system partly build up because I see testing states updates and from time to time a "Go go jenkins" comment but they are still too few to name it as good working QA check.

Happy Easter and also Kind Regards to all developers.

Developers

Reiner030 commented 5 years ago

Only possible workaround for my problem: Manually purging old packages:

root@ci-nb1dc03-01 ~ # aptitude purge oracle-java8-installer oracle-java8-unlimited-jce-policy
The following packages will be REMOVED:
  java-common{u} oracle-java8-installer{p} oracle-java8-unlimited-jce-policy{p}
0 packages upgraded, 0 newly installed, 3 to remove and 2 not upgraded.
Need to get 0 B of archives. After unpacking 179 kB will be freed.
The following packages have unmet dependencies:
 oracle-java8-set-default : PreDepends: oracle-java8-installer but it is not going to be installed
The following actions will resolve these dependencies:

     Remove the following packages:
1)     oracle-java8-set-default [8u201-1~webupd8~1 (now)]

Accept this solution? [Y/n/q/?]
The following packages will be REMOVED:
  java-common{u} oracle-java8-installer{p} oracle-java8-set-default{a} oracle-java8-unlimited-jce-policy{p}
0 packages upgraded, 0 newly installed, 4 to remove and 2 not upgraded.
Need to get 0 B of archives. After unpacking 200 kB will be freed.
Do you want to continue? [Y/n/?]
(Reading database ... 87935 files and directories currently installed.)
Removing oracle-java8-unlimited-jce-policy (8u201-1~webupd8~1) ...
Removing oracle-java8-set-default (8u201-1~webupd8~1) ...
Removing oracle-java8-installer (8u201-1~webupd8~1) ...
update-alternatives: removing manually selected alternative - switching appletviewer to auto mode
update-alternatives: removing manually selected alternative - switching extcheck to auto mode
update-alternatives: removing manually selected alternative - switching idlj to auto mode
update-alternatives: removing manually selected alternative - switching jar to auto mode
update-alternatives: removing manually selected alternative - switching jarsigner to auto mode
update-alternatives: removing manually selected alternative - switching javac to auto mode
update-alternatives: removing manually selected alternative - switching javadoc to auto mode
update-alternatives: removing manually selected alternative - switching javafxpackager to auto mode
update-alternatives: removing manually selected alternative - switching javah to auto mode
update-alternatives: removing manually selected alternative - switching javap to auto mode
update-alternatives: removing manually selected alternative - switching javapackager to auto mode
update-alternatives: removing manually selected alternative - switching jcmd to auto mode
update-alternatives: removing manually selected alternative - switching jconsole to auto mode
update-alternatives: removing manually selected alternative - switching jdb to auto mode
update-alternatives: removing manually selected alternative - switching jdeps to auto mode
update-alternatives: removing manually selected alternative - switching jhat to auto mode
update-alternatives: removing manually selected alternative - switching jinfo to auto mode
update-alternatives: removing manually selected alternative - switching jmap to auto mode
update-alternatives: removing manually selected alternative - switching jmc to auto mode
update-alternatives: removing manually selected alternative - switching jps to auto mode
update-alternatives: removing manually selected alternative - switching jrunscript to auto mode
update-alternatives: removing manually selected alternative - switching jsadebugd to auto mode
update-alternatives: removing manually selected alternative - switching jstack to auto mode
update-alternatives: removing manually selected alternative - switching jstat to auto mode
update-alternatives: removing manually selected alternative - switching jstatd to auto mode
update-alternatives: removing manually selected alternative - switching jvisualvm to auto mode
update-alternatives: removing manually selected alternative - switching native2ascii to auto mode
update-alternatives: removing manually selected alternative - switching rmic to auto mode
update-alternatives: removing manually selected alternative - switching schemagen to auto mode
update-alternatives: removing manually selected alternative - switching serialver to auto mode
update-alternatives: removing manually selected alternative - switching wsgen to auto mode
update-alternatives: removing manually selected alternative - switching wsimport to auto mode
update-alternatives: removing manually selected alternative - switching xjc to auto mode
update-alternatives: removing manually selected alternative - switching jexec to auto mode
update-alternatives: removing manually selected alternative - switching java to auto mode
update-alternatives: removing manually selected alternative - switching mozilla-javaplugin.so to auto mode
Removing java-common (0.58) ...
Processing triggers for mime-support (3.60) ...
Processing triggers for man-db (2.7.6.1-2) ...
Processing triggers for shared-mime-info (1.8-1+deb9u1) ...
(Reading database ... 87884 files and directories currently installed.)
Purging configuration files for oracle-java8-installer (8u201-1~webupd8~1) ...
Purging configuration files for oracle-java8-unlimited-jce-policy (8u201-1~webupd8~1) ...

Then the state runs fine:

root@ci-nb1dc03-01 ~ # salt-call state.apply java
local:
----------
          ID: openjdk-8-jre-headless
    Function: pkg.installed
      Result: True
     Comment: 1 targeted package was installed/updated.
     Started: 15:24:42.595589
    Duration: 15203.377 ms
     Changes:
              ----------
              ca-certificates-java:
                  ----------
                  new:
                      20170929~deb9u1
                  old:
              java-common:
                  ----------
                  new:
                      0.58
                  old:
              java2-runtime-headless:
                  ----------
                  new:
                      1
                  old:
              java5-runtime-headless:
                  ----------
                  new:
                      1
                  old:
              java6-runtime-headless:
                  ----------
                  new:
                      1
                  old:
              java7-runtime-headless:
                  ----------
                  new:
                      1
                  old:
              java8-runtime-headless:
                  ----------
                  new:
                      1
                  old:
              libpcsclite1:
                  ----------
                  new:
                      1.8.20-1
                  old:
              libxtst6:
                  ----------
                  new:
                      2:1.2.3-1
                  old:
              openjdk-8-jre-headless:
                  ----------
                  new:
                      8u212-b01-1~deb9u1
                  old:

Summary for local
------------
Succeeded: 2 (changed=1)
Failed:    0
------------
Total states run:     2
Total run time:  15.204 s
stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

If this issue is closed prematurely, please leave a comment and we will gladly reopen the issue.