-
Notifications
You must be signed in to change notification settings - Fork 1.1k
add absent_mount_sources_to_reject option #4844
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
add absent_mount_sources_to_reject option #4844
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4844 +/- ##
==========================================
- Coverage 42.98% 42.98% -0.01%
==========================================
Files 107 107
Lines 9792 9809 +17
==========================================
+ Hits 4209 4216 +7
- Misses 5132 5142 +10
Partials 451 451 |
|
/retest |
saschagrunert
left a comment
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.
LGTM
server/container_create_linux.go
Outdated
| } else if filepath.Clean(src) == "/etc/hostname" { | ||
| // special-case /etc/hostname, as we don't want it to be created as a directory | ||
| // This can cause issues with node reboot. | ||
| return nil, nil, errors.New("Cannot mount /etc/hostname: path does not exist and will cause issues as a directory. Consider mounting /proc/sys/kernel/hostname, or creating a static /etc/hostname") |
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.
nit:
| return nil, nil, errors.New("Cannot mount /etc/hostname: path does not exist and will cause issues as a directory. Consider mounting /proc/sys/kernel/hostname, or creating a static /etc/hostname") | |
| return nil, nil, errors.New("cannot mount /etc/hostname: path does not exist and will cause issues as a directory. Consider mounting /proc/sys/kernel/hostname, or creating a static /etc/hostname") |
|
LGTM |
b08278a to
af35974
Compare
af35974 to
43dc2b5
Compare
mrunalp
left a comment
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.
/lgtm
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: haircommander, mrunalp, saschagrunert The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
Signed-off-by: Peter Hunt <[email protected]>
To match docker behavior, a directory is created when the src of a mount does not exist. This causes issues when the src should not be a directory (/etc/hostname is a prime example). Instead of relying on correct user behavior, we should urge them to do the right thing by erroring in this case (if a configured mount source is added but does not exist) Signed-off-by: Peter Hunt <[email protected]>
Signed-off-by: Peter Hunt <[email protected]>
43dc2b5 to
8703525
Compare
|
/retest |
|
/lgtm |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
1 similar comment
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
11 similar comments
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
@haircommander: The following test failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
3 similar comments
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/retest Please review the full test history for this PR and help us cut down flakes. |
|
/cherry-pick release-1.21 |
|
@haircommander: new pull request created: #4857 DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
What type of PR is this?
/kind feature
What this PR does / why we need it:
To match docker behavior, a directory is created when the src of a mount does not exist.
This causes issues when the src should not be a directory (/etc/hostname is a prime example).
Instead of relying on correct user behavior, we should urge them to do the right thing by erroring in this case (if a configured mount source is added but does not exist)
Which issue(s) this PR fixes:
Special notes for your reviewer:
Does this PR introduce a user-facing change?