Check for metadata changes when building an image#479
Merged
bcl merged 4 commits intoweldr:rhel7-extrasfrom Oct 1, 2018
Merged
Check for metadata changes when building an image#479bcl merged 4 commits intoweldr:rhel7-extrasfrom
bcl merged 4 commits intoweldr:rhel7-extrasfrom
Conversation
Pull Request Test Coverage Report for Build 658
💛 - Coveralls |
97ee13f to
b7de690
Compare
Resolves: rhbz#1628114
Use a common _depsolve function for projects_depsolve and projects_depsolve_with_size so that it always uses the correct version glob support when depsolving blueprints and templates. Resolves: rhbz#1628114
The problem this solves is that yum really isn't designed to be part of\ a long running daemon. So when repodata changes upstream, even when you force it to download the new metadata, it doesn't change in memory so you end up with lorax-composer depsolving against old versions, and anaconda depsolving against new versions (because it sets up its own YumBase and cache) and then the kickstart is no longer valid. To solve this I have - Added a 6h timeout to the metadata check (because yum's doesn't work in this situation). - Added a metadata check to the YumLock .lock property, but only when the timeout expires. - Added a new .lock_check property to YumLock that always checks the metadata and resets the timeout. If it has changed it does its best to tear down the existing YumBase, deleting as much as it can in hopes it doesn't leak memory. And then it sets up a totally new YumBase with the new repodata. Resolves: rhbz#1632962
This tests to make sure that the metadata timer is working (by setting it to 10s and adding a new package to the repo), and that YumLock.lock_check immediately picks up a new package. This depends on rpmfluff which is available from Fedora or EPEL repos. Related: rhbz#1632962
b7de690 to
0f130dd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Keeping the metadata in sync is more tricky than you would expect. Add a
test that makes sure that changing the repo contents is picked up after
the short (10s) expiration timeout, and another to test that a new
package is picked up when starting a new build.
This depends on rpmfluff which is available from Fedora or EPEL repos.
Related: rhbz#1628114