This job view page is being replaced by Spyglass soon. Check out the new job view.
PRandyzhangx: fix: multi accounts creation issue when private endpoint creation failed
ResultFAILURE
Tests 0 failed / 0 succeeded
Started2021-10-27 03:16
Elapsed4m56s
Revisiond6b7a50f07b734f1463019c7dcd9d92b477e4f18
Refs 824

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=31
+ wait 31
+ make verify
go test -v -race ./pkg/... ./test/utils/credentials
=== RUN   TestGetCloudProvider
W1027 03:18:13.858824    9679 azure.go:58] get kubeconfig() failed with error: open /var/run/secrets/kubernetes.io/serviceaccount/token: no such file or directory
W1027 03:18:13.859032    9679 azure.go:97] load azure config from file(/etc/kubernetes/azure.json) failed with open /etc/kubernetes/azure.json: no such file or directory
W1027 03:18:13.859115    9679 azure.go:58] get kubeconfig(/home/prow/go/src/sigs.k8s.io/azurefile-csi-driver/pkg/azurefile/non-exist.json) failed with error: stat /home/prow/go/src/sigs.k8s.io/azurefile-csi-driver/pkg/azurefile/non-exist.json: no such file or directory
W1027 03:18:13.859169    9679 azure.go:97] load azure config from file(/etc/kubernetes/azure.json) failed with open /etc/kubernetes/azure.json: no such file or directory
W1027 03:18:13.859756    9679 azure.go:58] get kubeconfig(/home/prow/go/src/sigs.k8s.io/azurefile-csi-driver/pkg/azurefile/empty-kube-config) failed with error: invalid configuration: no configuration has been provided, try setting KUBERNETES_MASTER environment variable
W1027 03:18:13.870599    9679 azure.go:77] InitializeCloudFromSecret: failed to get cloud config from secret /: failed to get secret /: resource name may not be empty
W1027 03:18:13.870684    9679 azure.go:97] load azure config from file(/etc/kubernetes/azure.json) failed with open /etc/kubernetes/azure.json: no such file or directory
W1027 03:18:13.870879    9679 azure.go:58] get kubeconfig() failed with error: open /var/run/secrets/kubernetes.io/serviceaccount/token: no such file or directory
--- 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
W1027 03:18:13.879078    9679 azurefile.go:511] 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.41s)
=== RUN   TestGetFileShareQuota
--- PASS: TestGetFileShareQuota (0.00s)
=== RUN   TestRun
... skipping 7 lines ...
Driver Version: N/A
Git Commit: N/A
Go Version: go1.17.2
Platform: linux/amd64

Streaming logs below:
W1027 03:18:18.293351    9679 azure.go:58] get kubeconfig() failed with error: open /var/run/secrets/kubernetes.io/serviceaccount/token: no such file or directory
I1027 03:18:18.296490    9679 driver.go:93] Enabling controller service capability: CREATE_DELETE_VOLUME
I1027 03:18:18.296541    9679 driver.go:93] Enabling controller service capability: PUBLISH_UNPUBLISH_VOLUME
I1027 03:18:18.296676    9679 driver.go:93] Enabling controller service capability: CREATE_DELETE_SNAPSHOT
I1027 03:18:18.296742    9679 driver.go:93] Enabling controller service capability: EXPAND_VOLUME
I1027 03:18:18.296799    9679 driver.go:93] Enabling controller service capability: SINGLE_NODE_MULTI_WRITER
I1027 03:18:18.296843    9679 driver.go:112] Enabling volume access mode: SINGLE_NODE_WRITER
... skipping 14 lines ...
Driver Version: N/A
Git Commit: N/A
Go Version: go1.17.2
Platform: linux/amd64

Streaming logs below:
W1027 03:18:18.299582    9679 azure.go:58] get kubeconfig() failed with error: open /var/run/secrets/kubernetes.io/serviceaccount/token: no such file or directory
I1027 03:18:18.300681    9679 driver.go:93] Enabling controller service capability: CREATE_DELETE_VOLUME
I1027 03:18:18.300760    9679 driver.go:93] Enabling controller service capability: PUBLISH_UNPUBLISH_VOLUME
I1027 03:18:18.300800    9679 driver.go:93] Enabling controller service capability: CREATE_DELETE_SNAPSHOT
I1027 03:18:18.300882    9679 driver.go:93] Enabling controller service capability: EXPAND_VOLUME
I1027 03:18:18.300920    9679 driver.go:93] Enabling controller service capability: SINGLE_NODE_MULTI_WRITER
I1027 03:18:18.300965    9679 driver.go:112] Enabling volume access mode: SINGLE_NODE_WRITER
... skipping 64 lines ...
=== RUN   TestCreateVolume/invalid_parameter
I1027 03:18:18.322922    9679 driver.go:93] Enabling controller service capability: CREATE_DELETE_VOLUME
W1027 03:18:18.323047    9679 controllerserver.go:97] no quota specified, set as default value(100 GiB)
=== RUN   TestCreateVolume/Account_limit_exceeded
I1027 03:18:18.323727    9679 driver.go:93] Enabling controller service capability: CREATE_DELETE_VOLUME
W1027 03:18:18.323803    9679 controllerserver.go:97] no quota specified, set as default value(100 GiB)
W1027 03:18:18.323939    9679 controllerserver.go:365] create file share(random-vol-name-valid-request) on account(stoacc) type(stoacctype) rg(rg) location(loc) size(100), error: TotalSharesProvisionedCapacityExceedsAccountLimit, skip matching current account
W1027 03:18:18.324086    9679 controllerserver.go:97] no quota specified, set as default value(100 GiB)
--- PASS: TestCreateVolume (0.02s)
    --- PASS: TestCreateVolume/Controller_Capability_missing (0.01s)
    --- PASS: TestCreateVolume/Volume_name_missing (0.00s)
    --- PASS: TestCreateVolume/Volume_capabilities_missing (0.00s)
    --- PASS: TestCreateVolume/Invalid_volume_capabilities (0.00s)
... skipping 12 lines ...
    --- PASS: TestCreateVolume/invalid_parameter (0.00s)
    --- PASS: TestCreateVolume/Account_limit_exceeded (0.00s)
=== RUN   TestDeleteVolume
=== RUN   TestDeleteVolume/Volume_ID_missing
=== RUN   TestDeleteVolume/Controller_capability_missing
=== RUN   TestDeleteVolume/Invalid_volume_ID
E1027 03:18:18.326048    9679 controllerserver.go:473] 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
I1027 03:18:18.327074    9679 azurefile.go:709] remove tag(skip-matching) on account(f5713de20cde511e8ba4900) resourceGroup(vol_1)
W1027 03:18:18.327227    9679 controllerserver.go:504] 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
W1027 03:18:18.328810    9679 azurefile.go:511] parsing volumeID(vol_1) return with error: error parsing volume id: "vol_1", should at least contain two #
--- PASS: TestValidateVolumeCapabilities (0.00s)
=== RUN   TestControllerPublishVolume
W1027 03:18:18.331094    9679 azurefile.go:511] 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
W1027 03:18:18.333526    9679 azurefile.go:511] parsing volumeID(vol_1) return with error: error parsing volume id: "vol_1", should at least contain two #
--- PASS: TestCreateSnapshot (0.00s)
=== RUN   TestDeleteSnapshot
W1027 03:18:18.334015    9679 azurefile.go:511] 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
W1027 03:18:18.337537    9679 azurefile.go:511] parsing volumeID(vol_1) return with error: error parsing volume id: "vol_1", should at least contain two #
--- PASS: TestGetShareURL (0.00s)
=== RUN   TestGetServiceURL
W1027 03:18:18.338200    9679 azurefile.go:511] parsing volumeID(vol_1) return with error: error parsing volume id: "vol_1", should at least contain two #
E1027 03:18:18.338448    9679 controllerserver.go:886] parse serviceURLTemplate error: parse "https://^f5713de20cde511e8ba4900.file.abc": invalid character "^" in host name
--- PASS: TestGetServiceURL (0.00s)
=== RUN   TestSnapshotExists
W1027 03:18:18.338837    9679 azurefile.go:511] 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
E1027 03:18:18.342056    9679 nodeserver.go:448] 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
W1027 03:18:18.343285    9679 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
W1027 03:18:18.344297    9679 azurefile.go:511] parsing volumeID(vol_1) return with error: error parsing volume id: "vol_1", should at least contain two #
I1027 03:18:18.345056    9679 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]
E1027 03:18:18.345281    9679 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:() 
I1027 03:18:18.345751    9679 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]
I1027 03:18:18.345838    9679 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
W1027 03:18:18.346832    9679 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
W1027 03:18:18.346977    9679 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
W1027 03:18:18.348250    9679 nodeserver.go:439] ReadDir ./false_is_likely_target failed with open ./false_is_likely_target: no such file or directory, unmount this directory
E1027 03:18:18.348366    9679 nodeserver.go:448] 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   TestCheckGidPresentInMountFlags
... skipping 283 lines ...
-		vnetResourceGroup = az.VnetResourceGroup
-	}
-
-	if accountOptions.CreatePrivateEndpoint {
-		// Create DNS zone first, this could make sure driver has write permission on vnetResourceGroup
-		if err := az.createPrivateDNSZone(ctx, vnetResourceGroup); err != nil {
-			return "", "", fmt.Errorf("Failed to create private DNS zone(%s) in resourceGroup(%s), error: %v", PrivateDNSZoneName, vnetResourceGroup, err)
-		}
-	}
-
 	if createNewAccount {
 		// set network rules for storage account
 		var networkRuleSet *storage.NetworkRuleSet
... skipping 6 lines ...
+				vnetResourceGroup = az.VnetResourceGroup
+			}
 			// Get properties of the storageAccount
 			storageAccount, err := az.StorageAccountClient.GetProperties(ctx, resourceGroup, accountName)
 			if err != nil {
@@ -274,6 +266,11 @@ func (az *Cloud) EnsureStorageAccount(ctx context.Context, accountOptions *Accou
 				return "", "", fmt.Errorf("Failed to create private endpoint for storage account(%s), resourceGroup(%s), error: %v", accountName, vnetResourceGroup, err)
 			}
 
+			// Create DNS zone
+			if err := az.createPrivateDNSZone(ctx, vnetResourceGroup); err != nil {
+				return "", "", fmt.Errorf("Failed to create private DNS zone(%s) in resourceGroup(%s), error: %v", PrivateDNSZoneName, vnetResourceGroup, err)
+			}
+
 			// Create virtual link to the zone private DNS zone
 			vNetLinkName := accountName + "-vnetlink"
 			if err := az.createVNetLink(ctx, vNetLinkName, vnetResourceGroup); err != nil {

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