cache of available pkgs not cleared when repos are changed #11001
Labels
Bug
broken, incorrect, or confusing behavior
Pending-Discussion
The issue or pull request needs more discussion before it can be closed or merged
severity-low
4th level, cosemtic problems, work around exists
Milestone
Hi,
This is possible a bug of release 2014.1. Refers to commit 56f01ea
The pkg.installed can't find the package properly sometimes. This is due to the salt['avail'] cache dict is not reloaded in some situations. In my test case, I have a private yum repository managed. I installed epel repository rpm package from my private repository and managed a new postgresql-9.2 repository. And then I'm trying to install something from the epel and postgresql9.2 repositories, and it failed. Here's my script and the error messages:
There are two failure states:
...
...
If I run the same script for another time, the failed states will work.
After dive into the code, I found you recently added a global cache dict for available packages
(__salt__['avail'])
, and it was not reloaded correctly in this situation (used the old cache). Currently I just removed the cache dict as a quick work around (removed line 391-393 from yumpkg.py). Please review this issue, thanks a lot.The text was updated successfully, but these errors were encountered: