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
Refactor syncuser to reduce walks of the container fs #1212
base: main
Are you sure you want to change the base?
Conversation
3b63a5d
to
b901c0a
Compare
b901c0a
to
473c92a
Compare
I don't see any comparison like |
- Closes warewulf#1209 Signed-off-by: Jonathon Anderson <janderson@ciq.com>
473c92a
to
8997c74
Compare
From @mslacken in Slack: In the syncuser code I saw following:
what does the access:"r,w" do? This looks like the #pragma oin C/C++ but I couldn't find documentation for this. Can you give me a hint? |
@mslacken I looked into the
So I don't know what it does; but it looks like you wrote it in the first place. ^_^ I removed them locally and it didn't break tests or vet. I generally avoid making unrelated changes in a PR; but I'll do so here without objection if you'd like. |
@anderbubble after fixing the changelog this ready to merge |
Description of the Pull Request (PR):
This PR refactors syncuser to only walk the container fs twice: once for user changes and once for group changes. The previous implementation of syncuser walked the container file system for every user and group being sync'd. This caused syncuser to take a very long time when large images were combined with large user/group counts.
This PR also changes the (internal) semantics of syncuser to consistently use a "write" boolean throughout, rather than "write" in some places and "showOnly" in others.
To reduce some frequently-observed confusion,
wwctl container import
has been adjusted to only run syncuser if--syncuser
is specified, rather than always running it in "showOnly" mode when--syncuser=false
. This eliminates a spurious "error" report for users who do not intend to use syncuser.This fixes or addresses the following GitHub issues:
Before submitting a PR, make sure you have done the following:
git commit --signoff
) in agreement to the DCO