Skip to content

Commit

Permalink
Merge pull request #3 from silentred/bugfix
Browse files Browse the repository at this point in the history
bugfix: If a local volume is SpdkLVol type, connect the target
  • Loading branch information
silentred authored Nov 29, 2023
2 parents 290e8b6 + c49865b commit 3b75579
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion hack/deploy/base/500-disk-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ spec:
secretName: selfsigned-cert-tls
containers:
- name: node-disk-controller
image: silentred/node-disk-controller:7184e038-20231129171234
image: silentred/node-disk-controller:ba03b9e2-20231129185104
command:
- /node-disk-controller
args:
Expand Down
2 changes: 1 addition & 1 deletion hack/deploy/base/600-csi-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spec:
serviceAccount: obnvmf-admin
containers:
- name: csi-antstor
image: silentred/node-disk-controller:7184e038-20231129171234
image: silentred/node-disk-controller:ba03b9e2-20231129185104
command:
- /node-disk-controller
args:
Expand Down
2 changes: 1 addition & 1 deletion hack/deploy/base/700-disk-agent.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ spec:
capabilities:
add: ["ALL"]
allowPrivilegeEscalation: true
image: silentred/node-disk-controller:7184e038-20231129171234
image: silentred/node-disk-controller:ba03b9e2-20231129185104
#imagePullPolicy: Always
command:
- /node-disk-controller
Expand Down
2 changes: 1 addition & 1 deletion hack/deploy/base/800-csi-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ spec:
capabilities:
add: ["CAP_MKNOD", "CAP_SYS_ADMIN", "SYS_ADMIN", "SYS_RAWIO"]
allowPrivilegeEscalation: true
image: silentred/node-disk-controller:7184e038-20231129171234
image: silentred/node-disk-controller:ba03b9e2-20231129185104
command:
- /node-disk-controller
args:
Expand Down
9 changes: 5 additions & 4 deletions pkg/csi/rpcserver/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,12 @@ func (ns *NodeServer) NodeStageVolume(ctx context.Context, req *csi.NodeStageVol
return &csi.NodeStageVolumeResponse{}, nil
}

// runc 的逻辑
// 1. 如果是本地磁盘,跳过 nvme client connect的步骤,直接使用 DevPath 去 format and Mount
// 2. 如果是远程磁盘,则先 nvme client connect;
// for runc:
// 1. For local volume, skip doing `nvme connect`, use DevPath for formating and mounting.
// 2. For remote volume, do `nvme connect`, get the connected DevPath.
// 3. if the volume is local and type is SpdkLVol, do the same as remote volume.
devicePath = pv.GetDevPath()
if !isLocalDisk {
if !isLocalDisk || (!isLVM && pv.GetSpdkTarget() != nil) {
devicePath, err = connectSpdkTarget(pv.GetSpdkTarget())
if err != nil {
klog.Error(err)
Expand Down

0 comments on commit 3b75579

Please sign in to comment.