question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] pkgrepo.managed always reported as "changed" on Centos7

See original GitHub issue

Description We use several (15+) yum repositories, managed by saltstack. After upgrading to 3001, all repos are reported as changed on every salt-call.

Setup e.g. salt repo (salt/repo.sls):

saltstack_repo:
  pkgrepo.managed:
    - humanname: Artifactory Saltstack Repository
    - name: saltstack
    - baseurl: {{ pillar.common.arti_url }}/rpm-saltstack-py3/$releasever/$basearch/latest/
    - gpgkey: {{ pillar.common.arti_url }}/repo/gpg/RPM-GPG-KEY-SALTSTACK

Steps to Reproduce the behavior

[root@machine /]# salt-call state.sls salt/repo
local:
----------
          ID: saltstack_repo
    Function: pkgrepo.managed
        Name: saltstack
      Result: True
     Comment: Configured package repo 'saltstack'
     Started: 07:25:36.722061
    Duration: 1225.71 ms
     Changes:
              ----------
              repo:
                  saltstack

Summary for local
------------
Succeeded: 1 (changed=1)
Failed:    0
------------
Total states run:     1
Total run time:   1.226 s
[root@machine /]# salt-call state.sls salt/repo
local:
----------
          ID: saltstack_repo
    Function: pkgrepo.managed
        Name: saltstack
      Result: True
     Comment: Configured package repo 'saltstack'
     Started: 07:30:23.282547
    Duration: 1226.098 ms
     Changes:
              ----------
              repo:
                  saltstack

Summary for local
------------
Succeeded: 1 (changed=1)
Failed:    0
------------
Total states run:     1
Total run time:   1.226 s

Don’t know if it has something to do with issue, but on debug logs I’ve got: [DEBUG ] Could not LazyLoad pkg.expand_repo_def: 'pkg.expand_repo_def' is not available.

Expected behavior No changes should be reported: Succeeded: 1 (changed=0)

Versions Report

salt --versions-report Salt Version: Salt: 3001

Dependency Versions: cffi: Not Installed cherrypy: Not Installed dateutil: 2.8.1 docker-py: 4.2.1 gitdb: Not Installed gitpython: Not Installed Jinja2: 2.11.2 libgit2: Not Installed M2Crypto: 0.35.2 Mako: Not Installed msgpack-pure: Not Installed msgpack-python: 0.6.2 mysql-python: Not Installed pycparser: Not Installed pycrypto: 2.6.1 pycryptodome: Not Installed pygit2: Not Installed Python: 3.6.8 (default, Apr 2 2020, 13:34:55) python-gnupg: Not Installed PyYAML: 5.3.1 PyZMQ: 18.0.2 smmap: Not Installed timelib: Not Installed Tornado: 4.5.3 ZMQ: 4.3.1

System Versions: dist: centos 7 Core locale: UTF-8 machine: x86_64 release: 5.6.13-100.fc30.x86_64 system: Linux version: CentOS Linux 7 Core

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
sagetheragecommented, Aug 18, 2020

@meelmeal thank you for the update, @cmcmarrow is working on isolating the issue, I have this as in progress in the project board, but that view is terribly obscure, apologies. I am looking into something better to communicate the status, today this is what I’ve got. But yes! thank you for the update.

0reactions
sagetheragecommented, Sep 1, 2020

@redbaron4 I will get the team to review and look at the falling test.

Read more comments on GitHub >

github_iconTop Results From Across the Web

salt Changelog - pyup.io
This fixes 57778, a bug were every run of pkgrepo.managed state were marked as changed because the get_repo did fail to detect a...
Read more >
salt.states.pkgrepo - Salt Project Documentation
States for managing software package repositories on Linux distros. Supported package managers are APT, DNF, YUM and Zypper. Here is some example SLS:....
Read more >
Ubuntu Manpage: salt - Salt Documentation
I'm trying to manage packages/services but I get an error saying that the state is not available. Why? • Why aren't my custom...
Read more >
salt(7) — salt-common — Debian stretch
Install the Salt minion on each system that you want to manage. ... Please file a bug report on our GitHub repo if...
Read more >
Handle the situation when apt repo lines have or do not have trailing ...
[NOTICE] Bug fixes or features added to Salt require tests. Docs Changelog - https://docs.saltproject.io/en/master/topics/development/changelog.html Tests ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found