Bug fixes

This commit is contained in:
robbiezhang
2018-09-07 22:57:42 +00:00
committed by Robbie Zhang
parent 8d883dcecd
commit 0f54e1ed9c
2 changed files with 8 additions and 2 deletions

View File

@@ -325,9 +325,15 @@ func (p *ACIProvider) setupNetworkProfile(auth *client.Authentication) error {
if err != nil && !network.IsNotFound(err) {
return fmt.Errorf("error while looking up subnet: %v", err)
}
if network.IsNotFound(err) && p.subnetCIDR == "" {
return fmt.Errorf("subnet '%s' is not found in vnet '%s' in resource group '%s' and subnet CIDR is not specified", p.subnetName, p.vnetName, p.vnetResourceGroup)
}
if err == nil {
if p.subnetCIDR == "" {
p.subnetCIDR = subnet.Properties.AddressPrefix
}
if p.subnetCIDR != subnet.Properties.AddressPrefix {
return fmt.Errorf("found existing subnet with different CIDR")
return fmt.Errorf("found subnet '%s' using different CIDR: '%s'. desired: '%s'", p.subnetName, subnet.Properties.AddressPrefix, p.subnetCIDR)
}
for _, d := range subnet.Properties.Delegations {
if d.Properties.ServiceName == subnetDelegationService {

View File

@@ -183,7 +183,7 @@ func (s *Server) registerNode(ctx context.Context) error {
NodeInfo: corev1.NodeSystemInfo{
OperatingSystem: s.provider.OperatingSystem(),
Architecture: "amd64",
KubeletVersion: "v1.8.3",
KubeletVersion: "v1.11.2",
},
Capacity: s.provider.Capacity(),
Allocatable: s.provider.Capacity(),