mirror of
https://github.com/microsoft/onefuzz.git
synced 2025-06-17 04:18:07 +00:00
handle OperationNotAllowed errors when creating VMSS (#614)
This commit is contained in:
@ -322,9 +322,10 @@ def create_vmss(
|
|||||||
resource_group, name, params
|
resource_group, name, params
|
||||||
)
|
)
|
||||||
except ResourceExistsError as err:
|
except ResourceExistsError as err:
|
||||||
if "SkuNotAvailable" in repr(err):
|
err_str = str(err)
|
||||||
|
if "SkuNotAvailable" in err_str or "OperationNotAllowed" in err_str:
|
||||||
return Error(
|
return Error(
|
||||||
code=ErrorCode.VM_CREATE_FAILED, errors=["creating vmss: %s" % err]
|
code=ErrorCode.VM_CREATE_FAILED, errors=[f"creating vmss: {err_str}"]
|
||||||
)
|
)
|
||||||
raise err
|
raise err
|
||||||
except (ResourceNotFoundError, CloudError) as err:
|
except (ResourceNotFoundError, CloudError) as err:
|
||||||
|
Reference in New Issue
Block a user