Merge branch '16749-arvbox-users' refs #16749
[arvados.git] / lib / cloud / azure / azure.go
index c26309aca5a95fc7d35495295d33f79c72c74cdf..7f949d9bdb3e2fb83c539a0df5f15efec6ca2612 100644 (file)
@@ -419,7 +419,7 @@ func (az *azureInstanceSet) Create(
                Tags:     tags,
                InterfacePropertiesFormat: &network.InterfacePropertiesFormat{
                        IPConfigurations: &[]network.InterfaceIPConfiguration{
-                               network.InterfaceIPConfiguration{
+                               {
                                        Name: to.StringPtr("ip1"),
                                        InterfaceIPConfigurationPropertiesFormat: &network.InterfaceIPConfigurationPropertiesFormat{
                                                Subnet: &network.Subnet{
@@ -501,7 +501,7 @@ func (az *azureInstanceSet) Create(
                        StorageProfile: storageProfile,
                        NetworkProfile: &compute.NetworkProfile{
                                NetworkInterfaces: &[]compute.NetworkInterfaceReference{
-                                       compute.NetworkInterfaceReference{
+                                       {
                                                ID: nic.ID,
                                                NetworkInterfaceReferenceProperties: &compute.NetworkInterfaceReferenceProperties{
                                                        Primary: to.BoolPtr(true),
@@ -677,6 +677,10 @@ func (az *azureInstanceSet) manageDisks() {
        }
 
        for ; response.NotDone(); err = response.Next() {
+               if err != nil {
+                       az.logger.WithError(err).Warn("Error getting next page of disks")
+                       return
+               }
                for _, d := range response.Values() {
                        if d.DiskProperties.DiskState == compute.Unattached &&
                                d.Name != nil && re.MatchString(*d.Name) &&