Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
yum_package: RPMdb read lock not released when there is wildcard in disablerepo defined in option #8515
In Chef 14, when we have such a yum_package resource to run:
The wildcard is not processed well in yum_helper.py. However, the worst thing is, it will cause yum_helper.py exit not in a right way (not killed by any of SIGINT/SIGHUP/SIGPIPI/SIGQUIT) and no exception raised. So the exit_handler is not tiggered. That way, rpmdb got locked after running chef-client for several times.
Chef-client will not raise any exception, but once RPM db locked, the next chef-client run will raise:
Today I got another case related to the same issue. When we have a broken yum repository defined in "/etc/yum.repos.d" (we can't guarantee all repository from internet are 100% healthy), we got same rpmdb lock issue.
To make it simple, we'd better catch all exceptions in the code block in yum_helper.py (the bottom lines):
and release rpmdb lock, and then raise the error messages.