mirror of https://github.com/kubernetes/kops.git
azure: Fix the error code for nonexistent VMSS resources
This commit is contained in:
parent
df97b95972
commit
3414a68c49
|
|
@ -154,7 +154,7 @@ func (s *VMScaleSet) CompareWithID() *string {
|
||||||
func (s *VMScaleSet) Find(c *fi.CloudupContext) (*VMScaleSet, error) {
|
func (s *VMScaleSet) Find(c *fi.CloudupContext) (*VMScaleSet, error) {
|
||||||
cloud := c.T.Cloud.(azure.AzureCloud)
|
cloud := c.T.Cloud.(azure.AzureCloud)
|
||||||
found, err := cloud.VMScaleSet().Get(context.TODO(), *s.ResourceGroup.Name, *s.Name)
|
found, err := cloud.VMScaleSet().Get(context.TODO(), *s.ResourceGroup.Name, *s.Name)
|
||||||
if err != nil && !strings.Contains(err.Error(), "ResourceNotFound") {
|
if err != nil && !strings.Contains(err.Error(), "NotFound") {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
if found == nil {
|
if found == nil {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue