NAS-125472 / 24.04 / Validate cached bootstrap directory based off on the reference group/passwd files #546
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.
In the SCALE build process, when building the cache, it considers necessary cache files. If these files already exist, the SCALE build doesn't rebuild the cache, assuming the previous cache is sufficient. However, if the user or group information in the reference file has changed, the cache is declared as healthy, and the SCALE build doesn't rebuild the cache.
This PR effectively tackles that problems and ensures the cached bootstrapdir actually reflects the reference group/passwd files and if reference files have been changed, it invalidates the cache and initiates a clean build. Earlier what would happen is that during update phase usually the image won't build as we validate at that point if the users currently existing in the chroot env actually reference the reference group/passwd files.