This job view page is being replaced by Spyglass soon. Check out the new job view.
PRandyzhangx: feat: support private endpoint for smb protocol
ResultFAILURE
Tests 0 failed / 0 succeeded
Started2021-07-22 09:21
Elapsed4m37s
Revisionb0e30081008dc788633c3a25dca11723b7ce5dfe
Refs 738

No Test Failures!


Error lines from build-log.txt

Activated service account credentials for: [pr-kubekins@kubernetes-jenkins-pull.iam.gserviceaccount.com]
+ WRAPPED_COMMAND_PID=30
+ wait 30
+ make verify
go test -v -race ./pkg/... ./test/utils/credentials
=== RUN   TestGetCloudProvider
E0722 09:22:35.924242   11327 azure_config.go:45] Failed to get cloud-config from secret: failed to get secret /: resource name may not be empty
--- PASS: TestGetCloudProvider (0.01s)
=== RUN   TestUpdateSubnetServiceEndpoints
=== RUN   TestUpdateSubnetServiceEndpoints/[fail]_no_subnet
=== RUN   TestUpdateSubnetServiceEndpoints/[success]_subnetPropertiesFormat_is_nil
=== RUN   TestUpdateSubnetServiceEndpoints/[success]_ServiceEndpoints_is_nil
=== RUN   TestUpdateSubnetServiceEndpoints/[success]_storageService_does_not_exists
=== RUN   TestUpdateSubnetServiceEndpoints/[success]_storageService_already_exists
=== RUN   TestUpdateSubnetServiceEndpoints/[fail]_SubnetsClient_is_nil
--- PASS: TestUpdateSubnetServiceEndpoints (0.00s)
    --- PASS: TestUpdateSubnetServiceEndpoints/[fail]_no_subnet (0.00s)
    --- PASS: TestUpdateSubnetServiceEndpoints/[success]_subnetPropertiesFormat_is_nil (0.00s)
    --- PASS: TestUpdateSubnetServiceEndpoints/[success]_ServiceEndpoints_is_nil (0.00s)
    --- PASS: TestUpdateSubnetServiceEndpoints/[success]_storageService_does_not_exists (0.00s)
    --- PASS: TestUpdateSubnetServiceEndpoints/[success]_storageService_already_exists (0.00s)
    --- PASS: TestUpdateSubnetServiceEndpoints/[fail]_SubnetsClient_is_nil (0.00s)
=== RUN   TestGetFileSvcClient
--- PASS: TestGetFileSvcClient (0.00s)
=== RUN   TestCreateFileShare
=== RUN   TestCreateFileShare/ShareOptions_empty
=== RUN   TestCreateFileShare/AccountName_invalid
--- PASS: TestCreateFileShare (0.00s)
... skipping 23 lines ...
--- PASS: TestIsCorruptedDir (0.00s)
=== RUN   TestNewDriver
--- PASS: TestNewDriver (0.00s)
=== RUN   TestGetFileURL
--- PASS: TestGetFileURL (0.00s)
=== RUN   TestGetAccountInfo
W0722 09:22:35.931923   11327 azurefile.go:492] parsing volumeID(uniqe-volumeid-nfs) return with error: error parsing volume id: "uniqe-volumeid-nfs", should at least contain two #
--- PASS: TestGetAccountInfo (0.00s)
=== RUN   TestCreateDisk
--- PASS: TestCreateDisk (4.48s)
=== RUN   TestGetFileShareQuota
--- PASS: TestGetFileShareQuota (0.00s)
=== RUN   TestRun
... skipping 120 lines ...
    --- PASS: TestCreateVolume/Valid_request (0.00s)
    --- PASS: TestCreateVolume/invalid_parameter (0.00s)
=== RUN   TestDeleteVolume
=== RUN   TestDeleteVolume/Volume_ID_missing
=== RUN   TestDeleteVolume/Controller_capability_missing
=== RUN   TestDeleteVolume/Invalid_volume_ID
E0722 09:22:40.436661   11327 controllerserver.go:453] GetFileShareInfo(vol_1) in DeleteVolume failed with error: error parsing volume id: "vol_1", should at least contain two #
=== RUN   TestDeleteVolume/Delete_file_share_returns_error
=== RUN   TestDeleteVolume/Valid_request
I0722 09:22:40.437243   11327 azurefile.go:674] remove tag(skip-matching) on account(f5713de20cde511e8ba4900) resourceGroup(vol_1)
W0722 09:22:40.437345   11327 controllerserver.go:484] RemoveStorageAccountTag(skip-matching) under rg(vol_1) account(f5713de20cde511e8ba4900) failed with Retriable: false, RetryAfter: 0s, HTTPStatusCode: 0, RawError: StorageAccountClient is nil
--- PASS: TestDeleteVolume (0.00s)
    --- PASS: TestDeleteVolume/Volume_ID_missing (0.00s)
    --- PASS: TestDeleteVolume/Controller_capability_missing (0.00s)
    --- PASS: TestDeleteVolume/Invalid_volume_ID (0.00s)
    --- PASS: TestDeleteVolume/Delete_file_share_returns_error (0.00s)
    --- PASS: TestDeleteVolume/Valid_request (0.00s)
=== RUN   TestControllerGetVolume
--- PASS: TestControllerGetVolume (0.00s)
=== RUN   TestControllerGetCapabilities
--- PASS: TestControllerGetCapabilities (0.00s)
=== RUN   TestValidateVolumeCapabilities
W0722 09:22:40.438023   11327 azurefile.go:492] parsing volumeID(vol_1) return with error: error parsing volume id: "vol_1", should at least contain two #
--- PASS: TestValidateVolumeCapabilities (0.00s)
=== RUN   TestControllerPublishVolume
W0722 09:22:40.439309   11327 azurefile.go:492] parsing volumeID(vol_1) return with error: error parsing volume id: "vol_1", should at least contain two #
--- PASS: TestControllerPublishVolume (0.00s)
=== RUN   TestControllerUnpublishVolume
--- PASS: TestControllerUnpublishVolume (0.00s)
=== RUN   TestCreateSnapshot
W0722 09:22:40.441049   11327 azurefile.go:492] parsing volumeID(vol_1) return with error: error parsing volume id: "vol_1", should at least contain two #
--- PASS: TestCreateSnapshot (0.00s)
=== RUN   TestDeleteSnapshot
W0722 09:22:40.441471   11327 azurefile.go:492] parsing volumeID(vol_1#) return with error: error parsing volume id: "vol_1#", should at least contain two #
--- PASS: TestDeleteSnapshot (0.00s)
=== RUN   TestControllerExpandVolume
=== RUN   TestControllerExpandVolume/Volume_ID_missing
=== RUN   TestControllerExpandVolume/Volume_Capacity_range_missing
=== RUN   TestControllerExpandVolume/Volume_capabilities_missing
=== RUN   TestControllerExpandVolume/Invalid_Volume_ID
... skipping 10 lines ...
    --- PASS: TestControllerExpandVolume/Volume_capabilities_missing (0.00s)
    --- PASS: TestControllerExpandVolume/Invalid_Volume_ID (0.00s)
    --- PASS: TestControllerExpandVolume/Disk_name_not_empty (0.00s)
    --- PASS: TestControllerExpandVolume/Resize_file_share_returns_error (0.00s)
    --- PASS: TestControllerExpandVolume/Valid_request (0.00s)
=== RUN   TestGetShareURL
W0722 09:22:40.444575   11327 azurefile.go:492] parsing volumeID(vol_1) return with error: error parsing volume id: "vol_1", should at least contain two #
--- PASS: TestGetShareURL (0.00s)
=== RUN   TestGetServiceURL
W0722 09:22:40.445075   11327 azurefile.go:492] parsing volumeID(vol_1) return with error: error parsing volume id: "vol_1", should at least contain two #
E0722 09:22:40.445278   11327 controllerserver.go:866] parse serviceURLTemplate error: parse "https://^f5713de20cde511e8ba4900.file.abc": invalid character "^" in host name
--- PASS: TestGetServiceURL (0.00s)
=== RUN   TestSnapshotExists
W0722 09:22:40.445574   11327 azurefile.go:492] parsing volumeID(vol_1) return with error: error parsing volume id: "vol_1", should at least contain two #
--- PASS: TestSnapshotExists (0.00s)
=== RUN   TestGetCapacity
--- PASS: TestGetCapacity (0.00s)
=== RUN   TestListVolumes
--- PASS: TestListVolumes (0.00s)
=== RUN   TestListSnapshots
... skipping 15 lines ...
--- PASS: TestGetPluginCapabilities (0.00s)
=== RUN   TestNodeGetInfo
--- PASS: TestNodeGetInfo (0.00s)
=== RUN   TestNodeGetCapabilities
--- PASS: TestNodeGetCapabilities (0.00s)
=== RUN   TestNodePublishVolume
E0722 09:22:40.448146   11327 nodeserver.go:432] MakeDir failed on target: /home/prow/go/src/sigs.k8s.io/azurefile-csi-driver/pkg/azurefile/azure.go (mkdir /home/prow/go/src/sigs.k8s.io/azurefile-csi-driver/pkg/azurefile/azure.go: not a directory)
--- PASS: TestNodePublishVolume (0.00s)
=== RUN   TestNodeUnpublishVolume
W0722 09:22:40.449078   11327 mount_helper_common.go:34] Warning: Unmount skipped because path does not exist: /home/prow/go/src/sigs.k8s.io/azurefile-csi-driver/pkg/azurefile/abc.go
--- PASS: TestNodeUnpublishVolume (0.00s)
=== RUN   TestNodeStageVolume
W0722 09:22:40.449825   11327 azurefile.go:492] parsing volumeID(vol_1) return with error: error parsing volume id: "vol_1", should at least contain two #
I0722 09:22:40.450368   11327 mount_linux.go:408] Disk "/home/prow/go/src/sigs.k8s.io/azurefile-csi-driver/pkg/azurefile/proxy-mount/test_disk" appears to be unformatted, attempting to format as type: "ext4" with options: [-F -m0 /home/prow/go/src/sigs.k8s.io/azurefile-csi-driver/pkg/azurefile/proxy-mount/test_disk]
E0722 09:22:40.450533   11327 mount_linux.go:414] format of disk "/home/prow/go/src/sigs.k8s.io/azurefile-csi-driver/pkg/azurefile/proxy-mount/test_disk" failed: type:("ext4") target:("/home/prow/go/src/sigs.k8s.io/azurefile-csi-driver/pkg/azurefile/source_test") options:("barrier=1,errors=remount-ro,loop,noatime,defaults") errcode:(formatting failed) output:() 
I0722 09:22:40.450931   11327 mount_linux.go:408] Disk "/home/prow/go/src/sigs.k8s.io/azurefile-csi-driver/pkg/azurefile/proxy-mount/test_disk" appears to be unformatted, attempting to format as type: "ext4" with options: [-F -m0 /home/prow/go/src/sigs.k8s.io/azurefile-csi-driver/pkg/azurefile/proxy-mount/test_disk]
I0722 09:22:40.450999   11327 mount_linux.go:418] Disk successfully formatted (mkfs): ext4 - /home/prow/go/src/sigs.k8s.io/azurefile-csi-driver/pkg/azurefile/proxy-mount/test_disk /home/prow/go/src/sigs.k8s.io/azurefile-csi-driver/pkg/azurefile/source_test
--- PASS: TestNodeStageVolume (0.00s)
=== RUN   TestNodeUnstageVolume
W0722 09:22:40.451711   11327 mount_helper_common.go:34] Warning: Unmount skipped because path does not exist: /home/prow/go/src/sigs.k8s.io/azurefile-csi-driver/pkg/azurefile/abc.go
W0722 09:22:40.451787   11327 mount_helper_common.go:34] Warning: Unmount skipped because path does not exist: /home/prow/go/src/sigs.k8s.io/azurefile-csi-driver/pkg/azurefile/proxy-mount
--- PASS: TestNodeUnstageVolume (0.00s)
=== RUN   TestNodeGetVolumeStats
--- PASS: TestNodeGetVolumeStats (0.00s)
=== RUN   TestEnsureMountPoint
W0722 09:22:40.452700   11327 nodeserver.go:423] ReadDir ./false_is_likely_target failed with open ./false_is_likely_target: no such file or directory, unmount this directory
E0722 09:22:40.452782   11327 nodeserver.go:432] MakeDir failed on target: ./azure.go (mkdir ./azure.go: not a directory)
--- PASS: TestEnsureMountPoint (0.00s)
=== RUN   TestMakeDir
--- PASS: TestMakeDir (0.00s)
=== RUN   TestNodeExpandVolume
--- PASS: TestNodeExpandVolume (0.00s)
=== RUN   TestSimpleLockEntry
... skipping 277 lines ...
 				return "", "", fmt.Errorf("StorageAccountClient is nil")
 			}
+			ctx, cancel := getContextWithCancel()
+			defer cancel()
 			rerr := az.StorageAccountClient.Create(ctx, resourceGroup, accountName, cp)
 			if rerr != nil {
 				return "", "", fmt.Errorf("failed to create storage account %s, error: %v", accountName, rerr)
@@ -235,36 +233,36 @@ func (az *Cloud) EnsureStorageAccount(accountOptions *AccountOptions, genAccount
 					return "", "", err
 				}
 			}
-		}
 
-		if accountOptions.CreatePrivateEndpoint {
-			// Get properties of the storageAccount
-			storageAccount, err := az.StorageAccountClient.GetProperties(ctx, az.ResourceGroup, accountName)
-			if err != nil {
-				return "", "", fmt.Errorf("Failed to get the properties of storage account(%s), resourceGroup(%s), error: %v", accountName, az.ResourceGroup, err)
-			}
+			if accountOptions.CreatePrivateEndpoint {
+				// Get properties of the storageAccount
+				storageAccount, err := az.StorageAccountClient.GetProperties(ctx, az.ResourceGroup, accountName)
+				if err != nil {
+					return "", "", fmt.Errorf("Failed to get the properties of storage account(%s), resourceGroup(%s), error: %v", accountName, az.ResourceGroup, err)
+				}
 
-			// Create private endpoint
-			privateEndpointName := accountName + "-pvtendpoint"
-			if err := az.createPrivateEndpoint(ctx, accountName, storageAccount.ID, privateEndpointName); err != nil {
-				return "", "", fmt.Errorf("Failed to create private endpoint for storage account(%s), resourceGroup(%s), error: %v", accountName, az.ResourceGroup, err)
-			}
+				// Create private endpoint
+				privateEndpointName := accountName + "-pvtendpoint"
+				if err := az.createPrivateEndpoint(ctx, accountName, storageAccount.ID, privateEndpointName); err != nil {
+					return "", "", fmt.Errorf("Failed to create private endpoint for storage account(%s), resourceGroup(%s), error: %v", accountName, az.ResourceGroup, err)
+				}
 
-			// Create DNS zone
-			if err := az.createPrivateDNSZone(ctx); err != nil {
-				return "", "", fmt.Errorf("Failed to create private DNS zone(%s) in resourceGroup(%s), error: %v", PrivateDNSZoneName, az.ResourceGroup, err)
-			}
+				// Create DNS zone
+				if err := az.createPrivateDNSZone(ctx); err != nil {
+					return "", "", fmt.Errorf("Failed to create private DNS zone(%s) in resourceGroup(%s), error: %v", PrivateDNSZoneName, az.ResourceGroup, err)
+				}
 
-			// Create virtual link to the zone private DNS zone
-			vNetLinkName := accountName + "-vnetlink"
-			if err := az.createVNetLink(ctx, vNetLinkName); err != nil {
-				return "", "", fmt.Errorf("Failed to create virtual link for vnet(%s) and DNS Zone(%s) in resourceGroup(%s), error: %v", az.VnetName, PrivateDNSZoneName, az.ResourceGroup, err)
-			}
+				// Create virtual link to the zone private DNS zone
+				vNetLinkName := accountName + "-vnetlink"
+				if err := az.createVNetLink(ctx, vNetLinkName); err != nil {
+					return "", "", fmt.Errorf("Failed to create virtual link for vnet(%s) and DNS Zone(%s) in resourceGroup(%s), error: %v", az.VnetName, PrivateDNSZoneName, az.ResourceGroup, err)
+				}
 
-			// Create dns zone group
-			dnsZoneGroupName := accountName + "-dnszonegroup"
-			if err := az.createPrivateDNSZoneGroup(ctx, dnsZoneGroupName, privateEndpointName); err != nil {
-				return "", "", fmt.Errorf("Failed to create private DNS zone group - privateEndpoint(%s), vNetName(%s), resourceGroup(%s), error: %v", privateEndpointName, az.VnetName, az.ResourceGroup, err)
+				// Create dns zone group
+				dnsZoneGroupName := accountName + "-dnszonegroup"
+				if err := az.createPrivateDNSZoneGroup(ctx, dnsZoneGroupName, privateEndpointName); err != nil {
+					return "", "", fmt.Errorf("Failed to create private DNS zone group - privateEndpoint(%s), vNetName(%s), resourceGroup(%s), error: %v", privateEndpointName, az.VnetName, az.ResourceGroup, err)
+				}
 			}
 		}
 	}
@@ -317,10 +315,7 @@ func (az *Cloud) createPrivateDNSZone(ctx context.Context) error {
 	location := LocationGlobal
 	privateDNSZone := privatedns.PrivateZone{Location: &location}
 	if err := az.privatednsclient.CreateOrUpdate(ctx, az.ResourceGroup, PrivateDNSZoneName, privateDNSZone, true); err != nil {
-		if strings.Contains(err.Error(), "exists already") {
-			klog.V(2).Infof("private dns zone(%s) in resourceGroup (%s) already exists", PrivateDNSZoneName, az.ResourceGroup)
-			return nil
-		}
+		return err
 	}
 	return nil
 }
@@ -329,13 +324,17 @@ func (az *Cloud) createVNetLink(ctx context.Context, vNetLinkName string) error
 	klog.V(2).Infof("Creating virtual link for vnet(%s) and DNS Zone(%s) in resourceGroup(%s)", vNetLinkName, PrivateDNSZoneName, az.ResourceGroup)
 	location := LocationGlobal
 	vnetID := fmt.Sprintf("/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/virtualNetworks/%s", az.SubscriptionID, az.ResourceGroup, az.VnetName)
+	registrationEnabled := false
 	parameters := privatedns.VirtualNetworkLink{
 		Location: &location,
... skipping 6 lines ...
+	if err := az.virtualNetworkLinksClient.CreateOrUpdate(ctx, az.ResourceGroup, PrivateDNSZoneName, vNetLinkName, parameters, false); err != nil {
+		return err
+	}
+	return nil
 }
 
 func (az *Cloud) createPrivateDNSZoneGroup(ctx context.Context, dnsZoneGroupName string, privateEndpointName string) error {
@@ -481,11 +480,8 @@ func isEnableNfsV3PropertyEqual(account storage.Account, accountOptions *Account
 }
 
 func isPrivateEndpointAsExpected(account storage.Account, accountOptions *AccountOptions) bool {
-	if accountOptions.CreatePrivateEndpoint && account.PrivateEndpointConnections != nil && len(*account.PrivateEndpointConnections) > 0 {
-		return true
... skipping 4 lines ...
+		return false
 	}
-	return false
+	return true
 }

error
make: *** [Makefile:69: verify] Error 1
+ EXIT_VALUE=2
+ set +o xtrace