-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Fix K3S_DATA_DIR when running as non-root user #11378
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #11378 +/- ##
==========================================
- Coverage 50.04% 47.81% -2.24%
==========================================
Files 185 185
Lines 19239 19239
==========================================
- Hits 9629 9199 -430
- Misses 8222 8717 +495
+ Partials 1388 1323 -65
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Thanks for the fix! Can you open an issue describing the problem this fixes, so our QA team can validate that the issue is resolved by this change? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer to pass through only this one necessary env var, instead of passing through ALL of them.
Any chance this get's merged soonish? Thanks. |
We are in code freeze for December releases. This will get in for January. |
Would you mind rebasing this? Thanks! |
843d504
329d73f
to
843d504
Compare
@brandond Done. |
When running the generated kill and uninstall scripts, the environment variable `K3S_DATA_DIR` got lost, because `sudo` by default doesn't preserve the environment. This is fixed by adding the `--preserve-env` flag. Signed-off-by: Reinhard Nägele <[email protected]>
843d504
to
749bf91
Compare
Proposed Changes
When running the generated kill and uninstall scripts as non-root user, the environment variable
K3S_DATA_DIR
got lost, becausesudo
by default doesn't preserve the environment. This is fixed by adding the--preserve-env
flag.Types of Changes
Bugfix
Verification
K3S_DATA_DIR
.k3s-uninstall.sh
script as non-root user and check the log output.$K3S_DATA_DIR
directory got cleaned.Fixes: #11386