Skip to content

Commit 421d58c

Browse files
pmkccopybara-github
authored andcommitted
Retry more exceptions in Azure network creation.
PiperOrigin-RevId: 716715456
1 parent d9f1335 commit 421d58c

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

perfkitbenchmarker/providers/azure/azure_network.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ def __init__(self, region, subnet, name):
540540
self.have_deny_all_rule = False
541541

542542
def _Create(self):
543-
vm_util.IssueCommand(
543+
vm_util.IssueRetryableCommand(
544544
[
545545
azure.AZURE_PATH,
546546
'network',
@@ -824,7 +824,14 @@ def __init__(self, spec):
824824
self.region, self.subnet, self.subnet.name + '-nsg'
825825
)
826826

827-
@vm_util.Retry(retryable_exceptions=(errors.Resource.RetryableCreationError,))
827+
@vm_util.Retry(
828+
retryable_exceptions=(
829+
errors.Resource.RetryableCreationError,
830+
# Many nested commands are not classified as retryable.
831+
# Most should have their own retry logica and raise a different error.
832+
errors.VmUtil.IssueCommandError,
833+
)
834+
)
828835
def Create(self):
829836
"""Creates the network."""
830837
# If the benchmark includes multiple zones,

0 commit comments

Comments
 (0)