Ubuntu: add base repos to Kolla container image earlier #733
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.
Previously when building Kolla container images for Ubuntu it was common to get a dependency error during apt package installation, such as:
The following packages have unmet dependencies:
libc6-dev : Depends: libc6 (= 2.35-0ubuntu3.1) but 2.35-0ubuntu3.4 is to be installed
This is caused by the packages in the Ubuntu base image being newer than those in the release train repository snapshot.
This change fixes the issue by switching to the release train repositories earlier in the build process, before the first apt command runs.
It's possible that we may also need to pin the Ubuntu base container image, but that would be another thing to maintain, so let's try without for now since this approach is necessary and may be sufficient.