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] The pkg.list_repo_pkgs method ignores repo arguments #58954

Open
golmaal opened this issue Nov 15, 2020 · 0 comments
Open

[BUG] The pkg.list_repo_pkgs method ignores repo arguments #58954

golmaal opened this issue Nov 15, 2020 · 0 comments
Labels
Bug broken, incorrect, or confusing behavior severity-high 2nd top severity, seen by most users, causes major problems

Comments

@golmaal
Copy link
Contributor

golmaal commented Nov 15, 2020

Description
On CentOS 7 or 8 machines, we configure 'excludes=kernel*' in /etc/yum.conf or /etc/dnf/dnf.conf to avoid unintentional upgrade of kernel related RPMs.
With such configuration when calling pkg.list_repo_pkgs with disableexcludes=main fails to list kernel RPMs.
E.g.

salt-call pkg.list_repo_pkgs kernel-modules-extra # fails correctly because kernel* is excluded
salt-call pkg.list_repo_pkgs kernel-modules-extra disableexcludes=main # fails incorrectly (due to unused repo_arg)
salt-call pkg.list_repo_pkgs kernel-modules-extra -- --disableexcludes=main # works however 2nd form above is used by pkg.installed and pkg.install state and execution methods, so those fail to install kernel-modules-extra until the bug is fixed.

repo_arg = _get_options(fromrepo=fromrepo, **kwargs)

Setup

# Start a CentOS:8.1.1911 container
curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com
./bootstrap-salt.sh -P -M git v3002.1
echo 'excludes=kernel*' >> /etc/dnf/dnf.conf

Steps to Reproduce the behavior

salt-call pkg.list_repo_pkgs kernel-modules-extra disableexcludes=main

Expected behavior
The command under steps to reproduce should list kernel-modules-extra RPMs, however it returns empty.
Due to this issue, pkg.install and pkg.installed also fail when trying to get this RPM installed with disableexcludes=main option

Versions Report

salt --versions-report ``` Salt Version: Salt: 3002.1

Dependency Versions:
cffi: 1.11.5
cherrypy: Not Installed
dateutil: 2.6.1
docker-py: Not Installed
gitdb: Not Installed
gitpython: Not Installed
Jinja2: 2.11.2
libgit2: Not Installed
M2Crypto: Not Installed
Mako: Not Installed
msgpack-pure: Not Installed
msgpack-python: 1.0.0
mysql-python: Not Installed
pycparser: 2.14
pycrypto: 2.6.1
pycryptodome: 3.9.9
pygit2: Not Installed
Python: 3.6.8 (default, Nov 21 2019, 19:31:34)
python-gnupg: Not Installed
PyYAML: 5.3.1
PyZMQ: 20.0.0
smmap: Not Installed
timelib: Not Installed
Tornado: 4.5.3
ZMQ: 4.3.3

System Versions:
dist: centos 8 Core
locale: UTF-8
machine: x86_64
release: 4.18.0-147.el8.x86_64
system: Linux
version: CentOS Linux 8 Core

</details>
@golmaal golmaal added the Bug broken, incorrect, or confusing behavior label Nov 15, 2020
@sagetherage sagetherage assigned garethgreenaway and unassigned dwoz Jan 26, 2021
@sagetherage sagetherage added severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around and removed needs-triage labels Feb 16, 2021
@sagetherage sagetherage added this to the Approved milestone Feb 16, 2021
@sagetherage sagetherage added severity-high 2nd top severity, seen by most users, causes major problems and removed severity-medium 3rd level, incorrect or bad functionality, confusing and lacks a work around labels Feb 16, 2021
@sagetherage sagetherage modified the milestones: Approved, Silicon Feb 16, 2021
@sagetherage sagetherage added the Silicon v3004.0 Release code name label Feb 16, 2021
@sagetherage sagetherage modified the milestones: Silicon, Approved Aug 9, 2021
@Ch3LL Ch3LL added Sulfur v3006.0 release code name and version and removed Silicon v3004.0 Release code name labels Oct 25, 2021
@Ch3LL Ch3LL modified the milestones: Approved, Sulphur v3006.0 Oct 25, 2021
@waynew waynew removed the Sulfur v3006.0 release code name and version label Dec 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior severity-high 2nd top severity, seen by most users, causes major problems
Projects
None yet
Development

No branches or pull requests

6 participants