Skip to content

Commit

Permalink
Fix: include N1 custom machines into supported VM types for vm-perfor…
Browse files Browse the repository at this point in the history
…mance runbook

bug: 381179565
Change-Id: I47951d4a5d668ebf1aaa043dd3ad85f97b47a95b
GitOrigin-RevId: 877e8f65595de3250dc1f521803238735ff6f074
  • Loading branch information
vinay-vgs authored and copybara-github committed Dec 3, 2024
1 parent 5bfb17a commit 55d076a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions gcpdiag/runbook/gce/vm_performance.py
Original file line number Diff line number Diff line change
Expand Up @@ -524,6 +524,8 @@ def execute(self):
file.close()

vm_family = vm.machine_type()[0]
if vm.machine_type().split('-')[0] == 'custom':
vm_family = 'n'

# Load instance level iops/throughput limits from json file
vm_family_file = f'{dirname(__file__)}/disk_performance_benchmark/{vm_family}-family.json'
Expand Down Expand Up @@ -1065,9 +1067,14 @@ def execute(self):
' H3, N1, N2, N2D, M1, M2, M3, T2D, T2A, Z3')

elif vm_family == 'n':
if vm.machine_type().split('-')[0].upper() in ['N1', 'N2', 'N2D']:
if vm.machine_type().split('-')[0].upper() in [
'N1', 'N2', 'N2D', 'CUSTOM'
]:
next_hop = 'VM vCPU count'
search_str = vm.machine_type().split('-')[0].upper() + ' VMs'
if vm.machine_type().split('-')[0] == 'custom':
search_str = 'N1 VMs'
else:
search_str = vm.machine_type().split('-')[0].upper() + ' VMs'
if disktype in ['pd-balanced', 'pd-ssd']:
if cpu_count == 1:
next_hop_val = '1'
Expand Down

0 comments on commit 55d076a

Please sign in to comment.