Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NAS-125472 / 24.04 / Validate cached bootstrap directory based off on the reference group/passwd files #546

Merged
merged 6 commits into from
Dec 29, 2023

Conversation

sonicaj
Copy link
Member

@sonicaj sonicaj commented Dec 27, 2023

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.

@sonicaj sonicaj requested a review from a team December 27, 2023 14:50
@sonicaj sonicaj self-assigned this Dec 27, 2023
@bugclerk bugclerk changed the title Validate cached bootstrap directory based off on the reference group/passwd files NAS-125472 / 24.04 / Validate cached bootstrap directory based off on the reference group/passwd files Dec 27, 2023
@bugclerk
Copy link
Contributor

scale_build/bootstrap/cache.py Outdated Show resolved Hide resolved
@sonicaj sonicaj requested a review from themylogin December 29, 2023 18:58
Copy link
Contributor

@themylogin themylogin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@sonicaj sonicaj merged commit bc744e4 into master Dec 29, 2023
3 of 4 checks passed
@sonicaj sonicaj deleted the NAS-125472 branch December 29, 2023 19:37
@bugclerk
Copy link
Contributor

This PR has been merged and conversations have been locked.
If you would like to discuss more about this issue please use our forums or raise a Jira ticket.

@truenas truenas locked as resolved and limited conversation to collaborators Dec 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants