Skip to content

Commit 33d17ce

Browse files
authored
Merge pull request #324 from andyzhangx/reduce-logs
fix: reduce driver logs
2 parents 43635b2 + 64126e3 commit 33d17ce

File tree

12 files changed

+57
-33
lines changed

12 files changed

+57
-33
lines changed

charts/latest/blob-csi-driver/templates/csi-blob-controller.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ spec:
3232
- name: csi-provisioner
3333
image: {{ .Values.image.csiProvisioner.repository }}:{{ .Values.image.csiProvisioner.tag }}
3434
args:
35-
- "-v=5"
35+
- "-v=2"
3636
- "--csi-address=$(ADDRESS)"
3737
- "--enable-leader-election"
3838
- "--leader-election-type=leases"
@@ -127,7 +127,7 @@ spec:
127127
image: "{{ .Values.image.csiResizer.repository }}:{{ .Values.image.csiResizer.tag }}"
128128
args:
129129
- "-csi-address=$(ADDRESS)"
130-
- "-v=5"
130+
- "-v=2"
131131
- "-leader-election"
132132
- '-handle-volume-inuse-error=false'
133133
env:

charts/latest/blob-csi-driver/templates/csi-blob-node.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ spec:
4242
- --csi-address=/csi/csi.sock
4343
- --probe-timeout=3s
4444
- --health-port=29633
45-
- --v=5
45+
- --v=2
4646
resources:
4747
limits:
4848
cpu: 100m
@@ -55,7 +55,7 @@ spec:
5555
args:
5656
- --csi-address=$(ADDRESS)
5757
- --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
58-
- --v=5
58+
- --v=2
5959
lifecycle:
6060
preStop:
6161
exec:

deploy/csi-blob-controller.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ spec:
2828
- name: csi-provisioner
2929
image: mcr.microsoft.com/oss/kubernetes-csi/csi-provisioner:v1.4.0
3030
args:
31-
- "-v=5"
31+
- "-v=2"
3232
- "--csi-address=$(ADDRESS)"
3333
- "--enable-leader-election"
3434
- "--leader-election-type=leases"
@@ -112,7 +112,7 @@ spec:
112112
image: mcr.microsoft.com/oss/kubernetes-csi/csi-resizer:v1.1.0
113113
args:
114114
- "-csi-address=$(ADDRESS)"
115-
- "-v=5"
115+
- "-v=2"
116116
- "-leader-election"
117117
- '-handle-volume-inuse-error=false'
118118
env:

deploy/csi-blob-node.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ spec:
4040
- --csi-address=/csi/csi.sock
4141
- --probe-timeout=3s
4242
- --health-port=29633
43-
- --v=5
43+
- --v=2
4444
resources:
4545
limits:
4646
cpu: 100m
@@ -53,7 +53,7 @@ spec:
5353
args:
5454
- --csi-address=$(ADDRESS)
5555
- --kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)
56-
- --v=5
56+
- --v=2
5757
lifecycle:
5858
preStop:
5959
exec:

pkg/blob/controllerserver.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,8 +310,6 @@ func (d *Driver) ValidateVolumeCapabilities(ctx context.Context, req *csi.Valida
310310

311311
// ControllerGetCapabilities returns the capabilities of the Controller plugin
312312
func (d *Driver) ControllerGetCapabilities(ctx context.Context, req *csi.ControllerGetCapabilitiesRequest) (*csi.ControllerGetCapabilitiesResponse, error) {
313-
klog.V(5).Infof("Using default ControllerGetCapabilities")
314-
315313
return &csi.ControllerGetCapabilitiesResponse{
316314
Capabilities: d.Cap,
317315
}, nil

pkg/csi-common/controllerserver-default.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ limitations under the License.
1717
package csicommon
1818

1919
import (
20-
"k8s.io/klog/v2"
21-
2220
"github.com/container-storage-interface/spec/lib/go/csi"
2321
"golang.org/x/net/context"
2422
"google.golang.org/grpc/codes"
@@ -46,8 +44,6 @@ func (cs *DefaultControllerServer) ControllerUnpublishVolume(ctx context.Context
4644
}
4745

4846
func (cs *DefaultControllerServer) ValidateVolumeCapabilities(ctx context.Context, req *csi.ValidateVolumeCapabilitiesRequest) (*csi.ValidateVolumeCapabilitiesResponse, error) {
49-
klog.V(5).Infof("Using default ValidateVolumeCapabilities")
50-
5147
for _, c := range req.GetVolumeCapabilities() {
5248
found := false
5349
for _, c1 := range cs.Driver.VC {
@@ -77,8 +73,6 @@ func (cs *DefaultControllerServer) GetCapacity(ctx context.Context, req *csi.Get
7773
// ControllerGetCapabilities implements the default GRPC callout.
7874
// Default supports all capabilities
7975
func (cs *DefaultControllerServer) ControllerGetCapabilities(ctx context.Context, req *csi.ControllerGetCapabilitiesRequest) (*csi.ControllerGetCapabilitiesResponse, error) {
80-
klog.V(5).Infof("Using default ControllerGetCapabilities")
81-
8276
return &csi.ControllerGetCapabilitiesResponse{
8377
Capabilities: cs.Driver.Cap,
8478
}, nil

pkg/csi-common/driver_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ func TestAddControllerServiceCapabilities(t *testing.T) {
7171
}
7272

7373
func TestGetVolumeCapabilityAccessModes(t *testing.T) {
74-
7574
d := NewFakeDriver()
7675

7776
// Test no volume access modes.

pkg/csi-common/identityserver-default.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,13 @@ import (
2121
"golang.org/x/net/context"
2222
"google.golang.org/grpc/codes"
2323
"google.golang.org/grpc/status"
24-
"k8s.io/klog/v2"
2524
)
2625

2726
type DefaultIdentityServer struct {
2827
Driver *CSIDriver
2928
}
3029

3130
func (ids *DefaultIdentityServer) GetPluginInfo(ctx context.Context, req *csi.GetPluginInfoRequest) (*csi.GetPluginInfoResponse, error) {
32-
klog.V(5).Infof("Using default GetPluginInfo")
33-
3431
if ids.Driver.Name == "" {
3532
return nil, status.Error(codes.Unavailable, "Driver name not configured")
3633
}
@@ -50,7 +47,6 @@ func (ids *DefaultIdentityServer) Probe(ctx context.Context, req *csi.ProbeReque
5047
}
5148

5249
func (ids *DefaultIdentityServer) GetPluginCapabilities(ctx context.Context, req *csi.GetPluginCapabilitiesRequest) (*csi.GetPluginCapabilitiesResponse, error) {
53-
klog.V(5).Infof("Using default capabilities")
5450
return &csi.GetPluginCapabilitiesResponse{
5551
Capabilities: []*csi.PluginCapability{
5652
{

pkg/csi-common/nodeserver-default.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,24 +19,19 @@ package csicommon
1919
import (
2020
"github.com/container-storage-interface/spec/lib/go/csi"
2121
"golang.org/x/net/context"
22-
"k8s.io/klog/v2"
2322
)
2423

2524
type DefaultNodeServer struct {
2625
Driver *CSIDriver
2726
}
2827

2928
func (ns *DefaultNodeServer) NodeGetInfo(ctx context.Context, req *csi.NodeGetInfoRequest) (*csi.NodeGetInfoResponse, error) {
30-
klog.V(5).Infof("Using default NodeGetInfo")
31-
3229
return &csi.NodeGetInfoResponse{
3330
NodeId: ns.Driver.NodeID,
3431
}, nil
3532
}
3633

3734
func (ns *DefaultNodeServer) NodeGetCapabilities(ctx context.Context, req *csi.NodeGetCapabilitiesRequest) (*csi.NodeGetCapabilitiesResponse, error) {
38-
klog.V(2).Infof("Using default NodeGetCapabilities")
39-
4035
return &csi.NodeGetCapabilitiesResponse{
4136
Capabilities: ns.Driver.NSCap,
4237
}, nil

pkg/csi-common/server.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,6 @@ func (s *nonBlockingGRPCServer) ForceStop() {
6868
}
6969

7070
func (s *nonBlockingGRPCServer) serve(endpoint string, ids csi.IdentityServer, cs csi.ControllerServer, ns csi.NodeServer, testMode bool) {
71-
7271
proto, addr, err := ParseEndpoint(endpoint)
7372
if err != nil {
7473
klog.Fatal(err.Error())

0 commit comments

Comments
 (0)