Skip to content

Commit c218661

Browse files
authored
Merge pull request #1624 from seokho-son/master
fix(azure): Remove forced Zone override to respect user config (for GPU provisioning)
2 parents a59f33b + e68cd51 commit c218661

File tree

1 file changed

+2
-31
lines changed

1 file changed

+2
-31
lines changed

cloud-control-manager/cloud-driver/drivers/azure/AzureDriver.go

Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ package azure
1212

1313
import (
1414
"context"
15-
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dns/armdns"
16-
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage"
1715
"os"
1816
"time"
1917

18+
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/dns/armdns"
19+
"github.com/Azure/azure-sdk-for-go/sdk/resourcemanager/storage/armstorage"
2020
"github.com/Azure/azure-sdk-for-go/sdk/azcore"
2121
"github.com/Azure/azure-sdk-for-go/sdk/azcore/arm"
2222
"github.com/Azure/azure-sdk-for-go/sdk/azcore/policy"
@@ -305,35 +305,6 @@ func (driver *AzureDriver) ConnectCloud(connectionInfo idrv.ConnectionInfo) (ico
305305
AccountsClient: accountsClient,
306306
}
307307

308-
regionZoneHandler, err := iConn.CreateRegionZoneHandler()
309-
if err != nil {
310-
return nil, err
311-
}
312-
regionZoneInfo, err := regionZoneHandler.GetRegionZone(connectionInfo.RegionInfo.Region)
313-
if err != nil {
314-
return nil, err
315-
}
316-
317-
if len(regionZoneInfo.ZoneList) == 0 {
318-
cblog.Warn("Zone is not available for this region. (" + connectionInfo.RegionInfo.Region + ")")
319-
iConn.Region.Zone = ""
320-
} else {
321-
var zoneFound bool
322-
for _, zone := range regionZoneInfo.ZoneList {
323-
if zone.Name == connectionInfo.RegionInfo.Zone {
324-
zoneFound = true
325-
break
326-
}
327-
}
328-
329-
if !zoneFound {
330-
cblog.Warn("Configured zone is not found in the selected region." +
331-
" (Region: " + connectionInfo.RegionInfo.Region + ", Zone: " + connectionInfo.RegionInfo.Zone + ")")
332-
cblog.Warn("1 will be used as the default zone.")
333-
iConn.Region.Zone = "1"
334-
}
335-
}
336-
337308
return &iConn, nil
338309
}
339310

0 commit comments

Comments
 (0)