@@ -421,6 +421,7 @@ func (cloud *CloudProvider) insertRegionalDisk(
421
421
insertOp , err = cloud .service .RegionDisks .Insert (project , volKey .Region , diskToCreate ).Context (ctx ).Do ()
422
422
if insertOp != nil {
423
423
opName = insertOp .Name
424
+ klog .V (5 ).Infof ("InsertDisk operation %s" , opName )
424
425
}
425
426
}
426
427
if err != nil {
@@ -515,6 +516,7 @@ func (cloud *CloudProvider) insertZonalDisk(
515
516
insertOp , err = cloud .service .Disks .Insert (project , volKey .Zone , diskToCreate ).Context (ctx ).Do ()
516
517
if insertOp != nil {
517
518
opName = insertOp .Name
519
+ klog .V (5 ).Infof ("InsertDisk operation %s" , opName )
518
520
}
519
521
}
520
522
@@ -574,6 +576,9 @@ func (cloud *CloudProvider) DeleteDisk(ctx context.Context, project string, volK
574
576
575
577
func (cloud * CloudProvider ) deleteZonalDisk (ctx context.Context , project , zone , name string ) error {
576
578
op , err := cloud .service .Disks .Delete (project , zone , name ).Context (ctx ).Do ()
579
+ if op != nil {
580
+ klog .V (5 ).Infof ("DeleteDisk operation %s" , op .Name )
581
+ }
577
582
if err != nil {
578
583
if IsGCEError (err , "notFound" ) {
579
584
// Already deleted
@@ -590,6 +595,9 @@ func (cloud *CloudProvider) deleteZonalDisk(ctx context.Context, project, zone,
590
595
591
596
func (cloud * CloudProvider ) deleteRegionalDisk (ctx context.Context , project , region , name string ) error {
592
597
op , err := cloud .service .RegionDisks .Delete (project , region , name ).Context (ctx ).Do ()
598
+ if op != nil {
599
+ klog .V (5 ).Infof ("DeleteDisk operation %s" , op .Name )
600
+ }
593
601
if err != nil {
594
602
if IsGCEError (err , "notFound" ) {
595
603
// Already deleted
@@ -621,6 +629,9 @@ func (cloud *CloudProvider) AttachDisk(ctx context.Context, project string, volK
621
629
}
622
630
623
631
op , err := cloud .service .Instances .AttachDisk (project , instanceZone , instanceName , attachedDiskV1 ).Context (ctx ).Do ()
632
+ if op != nil {
633
+ klog .V (5 ).Infof ("AttachDisk operation %s" , op .Name )
634
+ }
624
635
if err != nil {
625
636
return fmt .Errorf ("failed cloud service attach disk call: %v" , err )
626
637
}
@@ -634,6 +645,9 @@ func (cloud *CloudProvider) AttachDisk(ctx context.Context, project string, volK
634
645
func (cloud * CloudProvider ) DetachDisk (ctx context.Context , project , deviceName , instanceZone , instanceName string ) error {
635
646
klog .V (5 ).Infof ("Detaching disk %v from %v" , deviceName , instanceName )
636
647
op , err := cloud .service .Instances .DetachDisk (project , instanceZone , instanceName , deviceName ).Context (ctx ).Do ()
648
+ if op != nil {
649
+ klog .V (5 ).Infof ("DetachDisk operation %s" , op .Name )
650
+ }
637
651
if err != nil {
638
652
return err
639
653
}
@@ -846,6 +860,9 @@ func (cloud *CloudProvider) resizeZonalDisk(ctx context.Context, project string,
846
860
SizeGb : requestGb ,
847
861
}
848
862
op , err := cloud .service .Disks .Resize (project , volKey .Zone , volKey .Name , resizeReq ).Context (ctx ).Do ()
863
+ if op != nil {
864
+ klog .V (5 ).Infof ("ResizeDisk operation %s" , op .Name )
865
+ }
849
866
if err != nil {
850
867
return - 1 , fmt .Errorf ("failed to resize zonal volume %v: %v" , volKey .String (), err )
851
868
}
@@ -864,6 +881,9 @@ func (cloud *CloudProvider) resizeRegionalDisk(ctx context.Context, project stri
864
881
}
865
882
866
883
op , err := cloud .service .RegionDisks .Resize (project , volKey .Region , volKey .Name , resizeReq ).Context (ctx ).Do ()
884
+ if op != nil {
885
+ klog .V (5 ).Infof ("ResizeDisk operation %s" , op .Name )
886
+ }
867
887
if err != nil {
868
888
return - 1 , fmt .Errorf ("failed to resize regional volume %v: %v" , volKey .String (), err )
869
889
}
0 commit comments