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
Bug 1899565: support raw block devices #57
Bug 1899565: support raw block devices #57
Conversation
@bennyz: This pull request references Bugzilla bug 1898509, which is invalid:
Comment In 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. |
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.
overall looks good, small question inside
pkg/service/node.go
Outdated
@@ -79,6 +86,10 @@ func (n *NodeService) NodeUnstageVolume(ctx context.Context, req *csi.NodeUnstag | |||
} | |||
|
|||
func (n *NodeService) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error) { | |||
if req.VolumeCapability == nil { | |||
return nil, status.Errorf(codes.InvalidArgument, "Missing volume capability") |
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.
when does this happen (the VolumeCapability == nil)?
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.
probably never, I'll remove
pkg/service/node.go
Outdated
if req.VolumeCapability.GetBlock() != nil { | ||
return n.publishBlockVolume(req, device) | ||
} | ||
|
||
targetPath := req.GetTargetPath() | ||
err = os.MkdirAll(targetPath, 0750) |
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.
we should probably change this to 640 as well
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.
ack
/bugzilla refresh |
@bennyz: This pull request references Bugzilla bug 1899565, which is valid. 3 validation(s) were run on this bug
In 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. |
@bennyz: This pull request references Bugzilla bug 1899565, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
In 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. |
pkg/service/node.go
Outdated
err = mounter.Mount(device, req.TargetPath, "", []string{"bind"}) | ||
if err != nil { | ||
if removeErr := os.Remove(req.TargetPath); removeErr != nil { | ||
return nil, status.Errorf(codes.Internal, "Failed to remove mount target %v, err: %v", req.TargetPath, 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.
here the removeErr is lost. Maybe wrap both of them?
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.
ack
pkg/service/node.go
Outdated
err = mounter.Mount(device, req.TargetPath, "", []string{"bind"}) | ||
if err != nil { | ||
if removeErr := os.Remove(req.TargetPath); removeErr != nil { | ||
return nil, status.Errorf(codes.Internal, "Failed to remove mount target %v, err: %v", req.TargetPath, removeErr) |
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 the failing mount error is lost
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.
right, sorry, I didn't get that at first
pkg/service/node.go
Outdated
err = mounter.Mount(device, req.TargetPath, "", []string{"bind"}) | ||
if err != nil { | ||
if removeErr := os.Remove(req.TargetPath); removeErr != nil { | ||
return nil, status.Errorf(codes.Internal, "Failed to remove mount target %v, err: %v, mount error: %v", req.TargetPath, removeErr,) |
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 there a nicer way?
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.
your missing the err
for the ErrorF, that's it I think:
return nil, status.Errorf(
codes.Internal,
"Failed to remove mount target %v, err: %v, mount error: %v",
req.TargetPath,
removeErr,
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.
return nil, status.Errorf(codes.Internal, "Failed to remove mount target %v, err: %v, mount error: %v", req.TargetPath, removeErr,) | |
return nil, status.Errorf(codes.Internal, "Failed to remove mount target %v, err: %v, mount error: %v", req.TargetPath, removeErr, 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.
🤦
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.
apparently trailing commas are allowed
This patch introduces support for block devices via CSI Signed-off-by: Benny Zlotnik <bzlotnik@redhat.com>
@bennyz: The following test failed, say
Full PR test history. Your PR dashboard. 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. I understand the commands that are listed here. |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bennyz, rgolangh The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
/retest Please review the full test history for this PR and help us cut down flakes. |
@bennyz: All pull requests linked via external trackers have merged: Bugzilla bug 1899565 has been moved to the MODIFIED state. In 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. |
/cherry-pick release-4.6 |
@Gal-Zaidman: failed to push cherry-picked changes in GitHub: pushing failed, output: "remote: Repository not found.\nfatal: repository 'https://github.com/openshift-cherrypick-robot/ovirt-csi-driver/' not found\n", error: exit status 128 In 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. |
/cherry-pick release-4.6 |
@Gal-Zaidman: failed to push cherry-picked changes in GitHub: pushing failed, output: "remote: Repository not found.\nfatal: repository 'https://github.com/openshift-cherrypick-robot/ovirt-csi-driver/' not found\n", error: exit status 128 In 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. |
/cherry-pick release-4.6 |
@Gal-Zaidman: failed to push cherry-picked changes in GitHub: pushing failed, output: "remote: Repository not found.\nfatal: repository 'https://github.com/openshift-cherrypick-robot/ovirt-csi-driver/' not found\n", error: exit status 128 In 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. |
/cherry-pick release-4.6 |
@stevekuznetsov: new pull request created: #68 In 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. |
Add support for raw block PVCs