Closed javierbertoli closed 1 year ago
@javierbertoli There were quite a few changes and fixes that went into the 3005.1 release for the pkgrepo module, Are you able to upgrade and see if the issues you're seeing are resolved? Thanks!
Closing this one out due to lack of activity, if the issue persists please feel free to open a new issue. Thanks!
This bug still exists in 3005.1
.
remove_apt_sources_list_security_0:
module.run:
- pkg.del_repo:
- repo: "deb-src [signed-by=/etc/apt/trusted.gpg.d/debian-archive-bullseye-security-automatic.gpg] http://security.debian.org/debian-security bullseye-security main contrib non-free"
[ERROR ] An exception occurred in this state: Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/salt/state.py", line 2276, in call
ret = self.states[cdata["full"]](
File "/usr/lib/python3/dist-packages/salt/loader/lazy.py", line 149, in __call__
return self.loader.run(run_func, *args, **kwargs)
File "/usr/lib/python3/dist-packages/salt/loader/lazy.py", line 1228, in run
return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
File "/usr/lib/python3/dist-packages/salt/loader/lazy.py", line 1243, in _run_as
return _func_or_method(*args, **kwargs)
File "/usr/lib/python3/dist-packages/salt/loader/lazy.py", line 1276, in wrapper
return f(*args, **kwargs)
File "/usr/lib/python3/dist-packages/salt/states/module.py", line 394, in run
return _run(**kwargs)
File "/usr/lib/python3/dist-packages/salt/states/module.py", line 449, in _run
func_ret = _call_function(
File "/usr/lib/python3/dist-packages/salt/states/module.py", line 495, in _call_function
mret = salt.utils.functools.call_function(__salt__[name], *func_args, **func_kwargs)
File "/usr/lib/python3/dist-packages/salt/utils/functools.py", line 174, in call_function
return salt_function(*function_args, **function_kwargs)
File "/usr/lib/python3/dist-packages/salt/loader/lazy.py", line 149, in __call__
return self.loader.run(run_func, *args, **kwargs)
File "/usr/lib/python3/dist-packages/salt/loader/lazy.py", line 1228, in run
return self._last_context.run(self._run_as, _func_or_method, *args, **kwargs)
File "/usr/lib/python3/dist-packages/salt/loader/lazy.py", line 1243, in _run_as
return _func_or_method(*args, **kwargs)
File "/usr/lib/python3/dist-packages/salt/modules/aptpkg.py", line 2138, in del_repo
raise CommandExecutionError(
salt.exceptions.CommandExecutionError: Repo deb-src [signed-by=/etc/apt/trusted.gpg.d/debian-archive-bullseye-security-automatic.gpg] http://security.debian.org/debian-security bullseye-security main contrib non-free doesn't exist in the sources.list(s)
Description I think this is a follow-up of #51656.
I hit this is issue today while working on the docker-formula, using salt version 3004:
Setup
Steps to Reproduce the behavior
/etc/apt/sources.list.d/docker.list
will be created with the following contentAs I understand the state is a wrapper of
pkg.del_repo
, I tried it too, to confirm the issue:a.
pkg.get_repo
is able to find the repository correctly:b.
del_repo
is unable to find the entry and delete itExpected behavior Both the state
pkgrepo.absent
and the modulepkg.del_repo
should be able to delete a repository that exists.Screenshots If applicable, add screenshots to help explain your problem.
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.) ``` Salt Version: Salt: 3004 Dependency Versions: cffi: Not Installed cherrypy: Not Installed dateutil: 2.8.1 docker-py: 4.1.0 gitdb: Not Installed gitpython: Not Installed Jinja2: 2.11.3 libgit2: Not Installed M2Crypto: Not Installed Mako: Not Installed msgpack: 1.0.0 msgpack-pure: Not Installed mysql-python: Not Installed pycparser: Not Installed pycrypto: Not Installed pycryptodome: 3.9.7 pygit2: Not Installed Python: 3.9.2 (default, Feb 28 2021, 17:03:44) 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.4 System Versions: dist: debian 11 bullseye locale: utf-8 machine: x86_64 release: 5.10.0-10-amd64 system: Linux version: Debian GNU/Linux 11 bullseye ```