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

[BUG] pkg.installed version matching fails on CentOS 7 #58039

Closed
rossengeorgiev opened this issue Jul 28, 2020 · 6 comments
Closed

[BUG] pkg.installed version matching fails on CentOS 7 #58039

rossengeorgiev opened this issue Jul 28, 2020 · 6 comments
Assignees
Labels
Aluminium Release Post Mg and Pre Si Bug broken, incorrect, or confusing behavior Confirmed Salt engineer has confirmed bug/feature - often including a MCVE fixed-pls-verify fix is linked, bug author to confirm fix Packaging Related to packaging of Salt, not Salt's support for package management. severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around
Milestone

Comments

@rossengeorgiev
Copy link
Contributor

rossengeorgiev commented Jul 28, 2020

Description
It appears version matching considers the release as part of version, and fails to match the specified version in the state

Relevant log:

[INFO    ] Running state [kibana] at time 12:55:28.675700
[DEBUG   ] Could not LazyLoad pkg.resolve_capabilities: 'pkg.resolve_capabilities' is not available.
[WARNING ] Please install a package that provides rpm.labelCompare for more accurate version comparisons.
[WARNING ] Falling back on salt.utils.versions.version_cmp() for version comparisons
[DEBUG   ] Could not LazyLoad pkg.check_db: 'pkg.check_db' is not available.
[DEBUG   ] Could not LazyLoad pkg.check_extra_requirements: 'pkg.check_extra_requirements' is not available.
[DEBUG   ] Could not LazyLoad pkg.version_clean: 'pkg.version_clean' is not available.
[WARNING ] Please install a package that provides rpm.labelCompare for more accurate version comparisons.
[WARNING ] Falling back on salt.utils.versions.version_cmp() for version comparisons
[DEBUG   ] Current version (['6.5.4-1']) did not match desired version specification (6.5.4), adding to installation targets

Setup

# rpm -q kibana
kibana-6.5.4-1.x86_64

Steps to Reproduce the behavior

  1. Run following state, with kibana package already installed.
kibana:
  pkg.installed:
    - version: 6.5.4
  1. We get the fallowing result when we run with test=true:
----------
          ID: kibana
    Function: pkg.installed
      Result: None
     Comment: The following packages would be installed/updated: kibana=6.5.4
     Started: 12:55:29.215411
    Duration: 474.698 ms
     Changes:

Summary for local

If ran without test, it fails:

----------
          ID: kibana
    Function: pkg.installed
      Result: False
     Comment: The following packages failed to install/update: kibana=6.5.4
     Started: 13:03:17.561401
    Duration: 32915.894 ms
     Changes:
----------

Expected behavior
Report that the package is already installed

Versions Report

salt --versions-report (Provided by running salt --versions-report. Please also mention any differences in master/minion versions.)
Salt Version:
           Salt: 3001

Dependency Versions:
           cffi: 1.14.1
       cherrypy: Not Installed
       dateutil: Not Installed
      docker-py: Not Installed
          gitdb: Not Installed
      gitpython: Not Installed
         Jinja2: 2.11.1
        libgit2: 1.0.0
       M2Crypto: 0.35.2
           Mako: Not Installed
   msgpack-pure: Not Installed
 msgpack-python: 0.6.2
   mysql-python: Not Installed
      pycparser: 2.20
       pycrypto: Not Installed
   pycryptodome: Not Installed
         pygit2: 1.2.1
         Python: 3.6.8 (default, Apr  2 2020, 13:34:55)
   python-gnupg: Not Installed
         PyYAML: 3.13
          PyZMQ: 17.0.0
          smmap: Not Installed
        timelib: Not Installed
        Tornado: 4.5.3
            ZMQ: 4.1.4

System Versions:
           dist: centos 7 Core
         locale: UTF-8
        machine: x86_64
        release: 3.10.0-1127.el7.x86_64
         system: Linux
        version: CentOS Linux 7 Core
@rossengeorgiev rossengeorgiev added the Bug broken, incorrect, or confusing behavior label Jul 28, 2020
@cmcmarrow cmcmarrow added the Confirmed Salt engineer has confirmed bug/feature - often including a MCVE label Jul 28, 2020
@cmcmarrow cmcmarrow added this to the Approved milestone Jul 28, 2020
@cmcmarrow
Copy link
Contributor

Thanks for the report @rossengeorgiev. I also confirmed this to be a bug

@cmcmarrow cmcmarrow added P4 Priority 4 severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around labels Jul 28, 2020
@rossengeorgiev
Copy link
Contributor Author

rossengeorgiev commented Jul 28, 2020

I think it works correctly if python36-rpm from EPEL is installed, which is not by default.

@rossengeorgiev
Copy link
Contributor Author

Yep, installing python36-rpm makes the issue go away. #57972 seems related

@sagetherage sagetherage modified the milestones: Approved, Aluminium Jul 29, 2020
@sagetherage sagetherage added the Aluminium Release Post Mg and Pre Si label Jul 29, 2020
TeddyAndrieux added a commit to scality/metalk8s that referenced this issue Oct 9, 2020
Change salt-master image to use Python3 salt-master package and also
install Python3 dependencies, embed Python3 salt-minion version instead
of Python2.

In order to install Python3 salt-minion we need:
- to install python3
- to install python36-rpm as by default version comparaison for package
  installation is wrong
- to install python3 on nodes for being able to use `salt-ssh`

Sees: saltstack/salt#58039
Sees: saltstack/salt#57972
Fixes: #2203
TeddyAndrieux added a commit to scality/metalk8s that referenced this issue Oct 12, 2020
Change salt-master image to use Python3 salt-master package and also
install Python3 dependencies, embed Python3 salt-minion version instead
of Python2.

In order to install Python3 salt-minion we need:
- to install python3
- to install python36-rpm as by default version comparaison for package
  installation is wrong
- to install python3 on nodes for being able to use `salt-ssh`

Sees: saltstack/salt#58039
Sees: saltstack/salt#57972
Fixes: #2203
TeddyAndrieux added a commit to scality/metalk8s that referenced this issue Oct 12, 2020
Change salt-master image to use Python3 salt-master package and also
install Python3 dependencies, embed Python3 salt-minion version instead
of Python2.

In order to install Python3 salt-minion we need:
- to install python3
- to install python36-rpm as by default version comparaison for package
  installation is wrong
- to install python3 on nodes for being able to use `salt-ssh`

Sees: saltstack/salt#58039
Sees: saltstack/salt#57972
Fixes: #2203
TeddyAndrieux added a commit to scality/metalk8s that referenced this issue Oct 12, 2020
Change salt-master image to use Python3 salt-master package and also
install Python3 dependencies, embed Python3 salt-minion version instead
of Python2.

In order to install Python3 salt-minion we need:
- to install python3
- to install python36-rpm as by default version comparaison for package
  installation is wrong
- to install python3 on nodes for being able to use `salt-ssh`

Sees: saltstack/salt#58039
Sees: saltstack/salt#57972
Fixes: #2203
TeddyAndrieux added a commit to scality/metalk8s that referenced this issue Oct 13, 2020
Change salt-master image to use Python3 salt-master package and also
install Python3 dependencies, embed Python3 salt-minion version instead
of Python2.

In order to install Python3 salt-minion we need:
- to install python3
- to install python36-rpm as by default version comparaison for package
  installation is wrong
- to install python3 on nodes for being able to use `salt-ssh`

Sees: saltstack/salt#58039
Sees: saltstack/salt#57972
Fixes: #2203
TeddyAndrieux added a commit to scality/metalk8s that referenced this issue Oct 30, 2020
Change salt-master image to use Python3 salt-master package and also
install Python3 dependencies, embed Python3 salt-minion version instead
of Python2.

In order to install Python3 salt-minion we need:
- to install python3
- to install python36-rpm as by default version comparaison for package
  installation is wrong
- to install python3 on nodes for being able to use `salt-ssh`

Sees: saltstack/salt#58039
Sees: saltstack/salt#57972
Fixes: #2203
TeddyAndrieux added a commit to scality/metalk8s that referenced this issue Oct 30, 2020
Change salt-master image to use Python3 salt-master package and also
install Python3 dependencies, embed Python3 salt-minion version instead
of Python2.

In order to install Python3 salt-minion we need:
- to install python3
- to install python36-rpm as by default version comparaison for package
  installation is wrong
- to install python3 on nodes for being able to use `salt-ssh`

Sees: saltstack/salt#58039
Sees: saltstack/salt#57972
Fixes: #2203
TeddyAndrieux added a commit to scality/metalk8s that referenced this issue Oct 30, 2020
Change salt-master image to use Python3 salt-master package and also
install Python3 dependencies, embed Python3 salt-minion version instead
of Python2.

In order to install Python3 salt-minion we need:
- to install python3
- to install python36-rpm as by default version comparaison for package
  installation is wrong
- to install python3 on nodes for being able to use `salt-ssh`

Sees: saltstack/salt#58039
Sees: saltstack/salt#57972
Fixes: #2203
TeddyAndrieux added a commit to scality/metalk8s that referenced this issue Nov 2, 2020
Change salt-master image to use Python3 salt-master package and also
install Python3 dependencies, embed Python3 salt-minion version instead
of Python2.

In order to install Python3 salt-minion we need:
- to install python3
- to install python36-rpm as by default version comparaison for package
  installation is wrong
- to install python3 on nodes for being able to use `salt-ssh`

Sees: saltstack/salt#58039
Sees: saltstack/salt#57972
Fixes: #2203
TeddyAndrieux added a commit to scality/metalk8s that referenced this issue Nov 3, 2020
Change salt-master image to use Python3 salt-master package and also
install Python3 dependencies, embed Python3 salt-minion version instead
of Python2.

In order to install Python3 salt-minion we need:
- to install python3
- to install python36-rpm as by default version comparaison for package
  installation is wrong
- to install python3 on nodes for being able to use `salt-ssh`

Sees: saltstack/salt#58039
Sees: saltstack/salt#57972
Fixes: #2203
TeddyAndrieux added a commit to scality/metalk8s that referenced this issue Nov 3, 2020
Change salt-master image to use Python3 salt-master package and also
install Python3 dependencies, embed Python3 salt-minion version instead
of Python2.

In order to install Python3 salt-minion we need:
- to install python3
- to install python36-rpm as by default version comparaison for package
  installation is wrong
- to install python3 on nodes for being able to use `salt-ssh`

Sees: saltstack/salt#58039
Sees: saltstack/salt#57972
Fixes: #2203
TeddyAndrieux added a commit to scality/metalk8s that referenced this issue Nov 3, 2020
Change salt-master image to use Python3 salt-master package and also
install Python3 dependencies, embed Python3 salt-minion version instead
of Python2.

In order to install Python3 salt-minion we need:
- to install python3
- to install python36-rpm as by default version comparaison for package
  installation is wrong
- to install python3 on nodes for being able to use `salt-ssh`

Sees: saltstack/salt#58039
Sees: saltstack/salt#57972
Fixes: #2203
TeddyAndrieux added a commit to scality/metalk8s that referenced this issue Nov 5, 2020
Change salt-master image to use Python3 salt-master package and also
install Python3 dependencies, embed Python3 salt-minion version instead
of Python2.

In order to install Python3 salt-minion we need:
- to install python3
- to install python36-rpm as by default version comparaison for package
  installation is wrong
- to install python3 on nodes for being able to use `salt-ssh`

Sees: saltstack/salt#58039
Sees: saltstack/salt#57972
Fixes: #2203
TeddyAndrieux added a commit to scality/metalk8s that referenced this issue Nov 5, 2020
Change salt-master image to use Python3 salt-master package and also
install Python3 dependencies, embed Python3 salt-minion version instead
of Python2.

In order to install Python3 salt-minion we need:
- to install python3
- to install python36-rpm as by default version comparaison for package
  installation is wrong
- to install python3 on nodes for being able to use `salt-ssh`

Sees: saltstack/salt#58039
Sees: saltstack/salt#57972
Fixes: #2203
TeddyAndrieux added a commit to scality/metalk8s that referenced this issue Nov 16, 2020
Change salt-master image to use Python3 salt-master package and also
install Python3 dependencies, embed Python3 salt-minion version instead
of Python2.

In order to install Python3 salt-minion we need:
- to install python3
- to install python36-rpm as by default version comparaison for package
  installation is wrong
- to install python3 on nodes for being able to use `salt-ssh`

Sees: saltstack/salt#58039
Sees: saltstack/salt#57972
Fixes: #2203
TeddyAndrieux added a commit to scality/metalk8s that referenced this issue Nov 16, 2020
Change salt-master image to use Python3 salt-master package and also
install Python3 dependencies, embed Python3 salt-minion version instead
of Python2.

In order to install Python3 salt-minion we need:
- to install python3
- to install python36-rpm as by default version comparaison for package
  installation is wrong
- to install python3 on nodes for being able to use `salt-ssh`

Sees: saltstack/salt#58039
Sees: saltstack/salt#57972
Fixes: #2203
TeddyAndrieux added a commit to scality/metalk8s that referenced this issue Nov 16, 2020
Change salt-master image to use Python3 salt-master package and also
install Python3 dependencies, embed Python3 salt-minion version instead
of Python2.

In order to install Python3 salt-minion we need:
- to install python3
- to install python36-rpm as by default version comparaison for package
  installation is wrong
- to install python3 on nodes for being able to use `salt-ssh`

Sees: saltstack/salt#58039
Sees: saltstack/salt#57972
Fixes: #2203
TeddyAndrieux added a commit to scality/metalk8s that referenced this issue Nov 18, 2020
Change salt-master image to use Python3 salt-master package and also
install Python3 dependencies, embed Python3 salt-minion version instead
of Python2.

In order to install Python3 salt-minion we need:
- to install python3
- to install python36-rpm as by default version comparaison for package
  installation is wrong
- to install python3 on nodes for being able to use `salt-ssh`

Sees: saltstack/salt#58039
Sees: saltstack/salt#57972
Fixes: #2203
TeddyAndrieux added a commit to scality/metalk8s that referenced this issue Nov 19, 2020
Change salt-master image to use Python3 salt-master package and also
install Python3 dependencies, embed Python3 salt-minion version instead
of Python2.

In order to install Python3 salt-minion we need:
- to install python3
- to install python36-rpm as by default version comparaison for package
  installation is wrong
- to install python3 on nodes for being able to use `salt-ssh`

Sees: saltstack/salt#58039
Sees: saltstack/salt#57972
Fixes: #2203
TeddyAndrieux added a commit to scality/metalk8s that referenced this issue Nov 19, 2020
Change salt-master image to use Python3 salt-master package and also
install Python3 dependencies, embed Python3 salt-minion version instead
of Python2.

In order to install Python3 salt-minion we need:
- to install python3
- to install python36-rpm as by default version comparaison for package
  installation is wrong
- to install python3 on nodes for being able to use `salt-ssh`

Sees: saltstack/salt#58039
Sees: saltstack/salt#57972
Fixes: #2203
TeddyAndrieux added a commit to scality/metalk8s that referenced this issue Nov 23, 2020
Change salt-master image to use Python3 salt-master package and also
install Python3 dependencies, embed Python3 salt-minion version instead
of Python2.

In order to install Python3 salt-minion we need:
- to install python3
- to install python36-rpm as by default version comparaison for package
  installation is wrong
- to install python3 on nodes for being able to use `salt-ssh`

Sees: saltstack/salt#58039
Sees: saltstack/salt#57972
Fixes: #2203
TeddyAndrieux added a commit to scality/metalk8s that referenced this issue Nov 26, 2020
Change salt-master image to use Python3 salt-master package and also
install Python3 dependencies, embed Python3 salt-minion version instead
of Python2.

In order to install Python3 salt-minion we need:
- to install python3
- to install python36-rpm as by default version comparaison for package
  installation is wrong
- to install python3 on nodes for being able to use `salt-ssh`

Sees: saltstack/salt#58039
Sees: saltstack/salt#57972
Fixes: #2203
TeddyAndrieux added a commit to scality/metalk8s that referenced this issue Nov 26, 2020
Change salt-master image to use Python3 salt-master package and also
install Python3 dependencies, embed Python3 salt-minion version instead
of Python2.

In order to install Python3 salt-minion we need:
- to install python3
- to install python36-rpm as by default version comparaison for package
  installation is wrong
- to install python3 on nodes for being able to use `salt-ssh`

Sees: saltstack/salt#58039
Sees: saltstack/salt#57972
Fixes: #2203
TeddyAndrieux added a commit to scality/metalk8s that referenced this issue Nov 27, 2020
Change salt-master image to use Python3 salt-master package and also
install Python3 dependencies, embed Python3 salt-minion version instead
of Python2.

In order to install Python3 salt-minion we need:
- to install python3
- to install python36-rpm as by default version comparaison for package
  installation is wrong
- to install python3 on nodes for being able to use `salt-ssh`

Sees: saltstack/salt#58039
Sees: saltstack/salt#57972
Fixes: #2203
TeddyAndrieux added a commit to scality/metalk8s that referenced this issue Nov 27, 2020
Change salt-master image to use Python3 salt-master package and also
install Python3 dependencies, embed Python3 salt-minion version instead
of Python2.

In order to install Python3 salt-minion we need:
- to install python3
- to install python36-rpm as by default version comparaison for package
  installation is wrong
- to install python3 on nodes for being able to use `salt-ssh`

Sees: saltstack/salt#58039
Sees: saltstack/salt#57972
Fixes: #2203
@sagetherage sagetherage removed the P4 Priority 4 label Jan 4, 2021
@sagetherage sagetherage assigned twangboy and unassigned Ch3LL Jan 4, 2021
@bryceml bryceml added Packaging Related to packaging of Salt, not Salt's support for package management. fixed-pls-verify fix is linked, bug author to confirm fix and removed phase-plan labels Feb 4, 2021
@bryceml
Copy link
Contributor

bryceml commented Feb 4, 2021

python36-rpm is in the repos for 3002 and newer, so this shouldn't be a problem with 3002 and newer.

Please let me know if that solves the problem and we can close this issue.

@sagetherage sagetherage assigned sagetherage and unassigned twangboy Feb 8, 2021
@sagetherage
Copy link
Contributor

@rossengeorgiev please let us know if that solves the problem and we can close this issue ^^

@rossengeorgiev
Copy link
Contributor Author

Installing python-rpm originally solved the issue, so if it is now included then, yes. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Aluminium Release Post Mg and Pre Si Bug broken, incorrect, or confusing behavior Confirmed Salt engineer has confirmed bug/feature - often including a MCVE fixed-pls-verify fix is linked, bug author to confirm fix Packaging Related to packaging of Salt, not Salt's support for package management. severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around
Projects
None yet
Development

No branches or pull requests

6 participants