mirror of
https://github.com/TECHNOFAB11/zfs-localpv.git
synced 2025-12-12 06:20:11 +01:00
fix(crash): reuse the err variable (#353)
The error variable is being redeclared, so this is not accessible outside of the loop and the provisioner is crashing while return in case of error as it tries to access err.Error and err is nil outside of the loop. Signed-off-by: Pawan <pawan@mayadata.io>
This commit is contained in:
parent
273bf148d4
commit
9b907fa884
1 changed files with 2 additions and 1 deletions
|
|
@ -290,7 +290,8 @@ func CreateZFSVolume(ctx context.Context, req *csi.CreateVolumeRequest) (string,
|
||||||
|
|
||||||
// try volume creation sequentially on all nodes
|
// try volume creation sequentially on all nodes
|
||||||
for _, node := range prfList {
|
for _, node := range prfList {
|
||||||
nodeid, err := zfs.GetNodeID(node)
|
var nodeid string
|
||||||
|
nodeid, err = zfs.GetNodeID(node)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue