-
Notifications
You must be signed in to change notification settings - Fork 949
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
feature: extend cri apis for remove volume #2124
feature: extend cri apis for remove volume #2124
Conversation
22f8823
to
b33168b
Compare
Codecov Report
@@ Coverage Diff @@
## master #2124 +/- ##
==========================================
- Coverage 64.38% 64.27% -0.12%
==========================================
Files 209 209
Lines 16631 16655 +24
==========================================
- Hits 10708 10705 -3
- Misses 4595 4614 +19
- Partials 1328 1336 +8
|
@@ -181,6 +187,8 @@ message Mount { | |||
bool selinux_relabel = 4; | |||
// Requested propagation mode. | |||
MountPropagation propagation = 5; | |||
// Name of volume | |||
string name = 100; |
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.
do we need add more param in Mount?
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.
Yeah, that's enough for the moment. :)
cri/apis/v1alpha2/api.proto
Outdated
} | ||
|
||
message RemoveVolumeResponse {} |
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.
Is your Editor problem? :)
b33168b
to
b4c0678
Compare
@@ -39,7 +39,6 @@ generateproto(){ | |||
} | |||
|
|||
main(){ | |||
API_ROOT="${DIR}/cri/apis/v1alpha1" YEAR_TIME=" $(date '+%Y')" generateproto |
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.
Why delete it?
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.
Now we don't need to extend the API of CRI v1alpha1. :)
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.
If we do not the extensive CRI advanced feature, should we find somewhere to record this change? @starnop
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.
Can you add test for CRI remove volume? |
@rudyfly The test for function of |
LGTM |
cri/apis/v1alpha2/api.proto
Outdated
string volume_name = 1; | ||
} | ||
|
||
message RemoveVolumeResponse { | ||
} |
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.
Please add a blank line here to make it happy. @starnop
@@ -181,6 +187,8 @@ message Mount { | |||
bool selinux_relabel = 4; | |||
// Requested propagation mode. | |||
MountPropagation propagation = 5; | |||
// Name of volume |
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.
TODO:
classify the anonymous volume or not.
logrus.Infof("RemoveVolume %q", r.GetVolumeName()) | ||
defer func() { | ||
if err != nil { | ||
logrus.Errorf("RemoveVolume %q failed, error: %v", r.GetVolumeName(), err) |
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.
failed to do something
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'll submit a single PR to format logs.
b4c0678
to
5a7d173
Compare
912c373
to
d7bca5c
Compare
d7bca5c
to
32f5cc9
Compare
Signed-off-by: Starnop <[email protected]>
32f5cc9
to
845cff8
Compare
Signed-off-by: Starnop [email protected]
Ⅰ. Describe what this PR did
extend cri apis for remove volume
Ⅱ. Does this pull request fix one issue?
None.
Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)
Ⅳ. Describe how to verify it
use cri-tools that has been modified:starnop/cri-tools
Ⅴ. Special notes for reviews