mirror of
https://github.com/kubernetes-csi/csi-driver-nvmf.git
synced 2025-09-12 02:19:12 +00:00
fix: update go mod
1. upgrade go version from v1.14 to v.1.19 2. upgrade csi_spec from v1.5.0 to v1.7.0 3. upgrade golang.org/x/net from v0.4.0 to v0.5.0 4. upgrade google.golang.org/grpc from v1.49.0 to v1.51.0 5. upgrade klog from v1.0 to v2.80.1 6. upgrade k8s.io/utils from 2022 to 2023 7. remove logrus Signed-off-by: Meinhard Zhou <zhouenhua@bytedance.com>
This commit is contained in:
@@ -5,7 +5,7 @@ Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
|
@@ -21,7 +21,7 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
"k8s.io/klog"
|
||||
"k8s.io/klog/v2"
|
||||
)
|
||||
|
||||
type ControllerServer struct {
|
||||
@@ -35,8 +35,8 @@ func NewControllerServer(d *driver) *ControllerServer {
|
||||
}
|
||||
}
|
||||
|
||||
// You should realize your volume provider here, such as requesting the Cloud to create an NVMf block and
|
||||
// returning specific information to you
|
||||
// You should realize your volume provider here, such as requesting the Cloud to create an NVMf block and
|
||||
// returning specific information to you
|
||||
func (c *ControllerServer) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error) {
|
||||
return nil, status.Errorf(codes.Unimplemented, "CreateVolume should implement by yourself. ")
|
||||
}
|
||||
|
@@ -20,7 +20,7 @@ import (
|
||||
"github.com/container-storage-interface/spec/lib/go/csi"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
"k8s.io/klog"
|
||||
"k8s.io/klog/v2"
|
||||
)
|
||||
|
||||
type driver struct {
|
||||
|
@@ -26,7 +26,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/kubernetes-csi/csi-driver-nvmf/pkg/utils"
|
||||
"k8s.io/klog"
|
||||
"k8s.io/klog/v2"
|
||||
)
|
||||
|
||||
type Connector struct {
|
||||
|
@@ -21,7 +21,7 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
"k8s.io/klog"
|
||||
"k8s.io/klog/v2"
|
||||
)
|
||||
|
||||
type IdentityServer struct {
|
||||
|
@@ -24,7 +24,7 @@ import (
|
||||
"golang.org/x/net/context"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
"k8s.io/klog"
|
||||
"k8s.io/klog/v2"
|
||||
)
|
||||
|
||||
type NodeServer struct {
|
||||
|
@@ -21,7 +21,7 @@ import (
|
||||
"os"
|
||||
|
||||
"github.com/container-storage-interface/spec/lib/go/csi"
|
||||
"k8s.io/klog"
|
||||
"k8s.io/klog/v2"
|
||||
"k8s.io/utils/exec"
|
||||
"k8s.io/utils/mount"
|
||||
)
|
||||
|
@@ -26,9 +26,8 @@ import (
|
||||
|
||||
"github.com/kubernetes-csi/csi-driver-nvmf/pkg/utils"
|
||||
"github.com/kubernetes-csi/csi-lib-utils/protosanitizer"
|
||||
log "github.com/sirupsen/logrus"
|
||||
"google.golang.org/grpc"
|
||||
"k8s.io/klog"
|
||||
"k8s.io/klog/v2"
|
||||
)
|
||||
|
||||
func waitForPathToExist(devicePath string, maxRetries, intervalSeconds int, deviceTransport string) (bool, error) {
|
||||
@@ -73,7 +72,7 @@ func GetDeviceNameByVolumeID(volumeID string) (deviceName string, err error) {
|
||||
if !strings.HasPrefix(resolved, "/dev") {
|
||||
return "", fmt.Errorf("resolved symlink for %q was unexpected: %q", volumeLinkPath, resolved)
|
||||
}
|
||||
log.Infof("Device Link Info: %s link to %s", volumeLinkPath, resolved)
|
||||
klog.Infof("Device Link Info: %s link to %s", volumeLinkPath, resolved)
|
||||
tmp := strings.Split(resolved, "/")
|
||||
return tmp[len(tmp)-1], nil
|
||||
}
|
||||
|
@@ -24,7 +24,7 @@ import (
|
||||
"github.com/container-storage-interface/spec/lib/go/csi"
|
||||
"github.com/kubernetes-csi/csi-driver-nvmf/pkg/utils"
|
||||
"google.golang.org/grpc"
|
||||
"k8s.io/klog"
|
||||
"k8s.io/klog/v2"
|
||||
)
|
||||
|
||||
// Defines Non blocking GRPC server interfaces
|
||||
|
Reference in New Issue
Block a user