Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

Commit d7db702

Browse files
committed
Support new GPU SKUs
- Move transitional SR-IOV RDMA instances to normal - Add Standard_Ncas_T4_v3 and Standard_NdasrA100_v4 support - Fix CentOS 7.8+ support along with LIS - Resolves #370
1 parent 005bb77 commit d7db702

File tree

3 files changed

+16
-30
lines changed

3 files changed

+16
-30
lines changed

convoy/fleet.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -480,8 +480,8 @@ def _setup_intel_mpi_rt_package(config, pool_settings):
480480
:rtype: pathlib.Path
481481
:return: package path
482482
"""
483-
# only for native ubuntu rdma
484-
if (not settings.is_rdma_pool(pool_settings.vm_size) or
483+
# only for native ubuntu networkdirect rdma
484+
if (not settings.is_networkdirect_rdma_pool(pool_settings.vm_size) or
485485
not pool_settings.vm_configuration.offer ==
486486
'ubuntu-server-container-rdma'):
487487
return None

convoy/settings.py

Lines changed: 13 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@
4747
6006
4848
)
4949
_GPU_COMPUTE_INSTANCES = re.compile(
50-
# standard nc, ncv2, ncv3, nd, ndv2
51-
r'^standard_n[cd][\d]+r?s?(_v[\d])?(_promo)?$',
50+
# standard nc, ncv2, ncv3, nd, ndv2, ncas_t4_v3, ndasr_v4
51+
r'^standard_n[cd][\d]+(as_t4)?(as)?r?s?(_v[\d])?(_promo)?$',
5252
re.IGNORECASE
5353
)
5454
_GPU_VISUALIZATION_INSTANCES = re.compile(
@@ -57,13 +57,9 @@
5757
re.IGNORECASE
5858
)
5959
_SRIOV_RDMA_INSTANCES = re.compile(
60-
# standard hb/hc, nc+r_v3, ndv2
61-
r'^standard_(((hb|hc)[\d]+m?rs?(_v[\d])?)|(nc[\d]+rs_v3)|(nd[\d]+rs_v2))$',
62-
re.IGNORECASE
63-
)
64-
_SRIOV_RDMA_TRANSITION_INSTANCES = re.compile(
65-
# standard nc+r_v2
66-
r'^standard_(nc[\d]+rs_v2)$',
60+
# standard hb, hbv2, hbv3, hc, nc+r_v2, nc+r_v3, ndv1, ndv2, ndasr_v4
61+
(r'^standard_(((hb|hc)[\d]+m?rs?(_v[\d])?)|'
62+
r'(nc[\d]+rs_v[2-4])|(nd[\d]+(rs|rs_v2|asr_v4)))$'),
6763
re.IGNORECASE
6864
)
6965
_NETWORKDIRECT_RDMA_INSTANCES = re.compile(
@@ -72,7 +68,7 @@
7268
re.IGNORECASE
7369
)
7470
_PREMIUM_STORAGE_INSTANCES = re.compile(
75-
r'^standard_(([a-z]+[\d]+.*s(_v[\d])?)|([dg]s[\d]+(_v2)?))$',
71+
r'^standard_(([a-z]+[\d]+.*s(_v[\d])?)|([dg]s[\d]+(_v[\d]+)?))$',
7672
re.IGNORECASE
7773
)
7874
_NESTED_VIRTUALIZATION_INSTANCES = re.compile(
@@ -846,9 +842,9 @@ def is_lis_install_required(config, vm_size=None):
846842
publisher = pool_publisher(config, lower=True)
847843
offer = pool_offer(config, lower=True)
848844
sku = pool_sku(config, lower=True)
849-
# current lis (4.3.5) does not support 7.8+
845+
# lis (4.3.5) is not needed for 7.8+
850846
if (publisher == 'openlogic' and offer == 'centos' and
851-
sku > '7.3' and sku <= '7.7'):
847+
sku >= '7.4' and sku <= '7.7'):
852848
return True
853849
return False
854850

@@ -889,10 +885,7 @@ def is_sriov_rdma_pool(vm_size):
889885
:rtype: bool
890886
:return: if sriov rdma is present
891887
"""
892-
return (
893-
_SRIOV_RDMA_INSTANCES.match(vm_size) is not None or
894-
_SRIOV_RDMA_TRANSITION_INSTANCES.match(vm_size) is not None
895-
)
888+
return _SRIOV_RDMA_INSTANCES.match(vm_size) is not None
896889

897890

898891
def is_networkdirect_rdma_pool(vm_size):
@@ -902,10 +895,7 @@ def is_networkdirect_rdma_pool(vm_size):
902895
:rtype: bool
903896
:return: if network direct rdma is present
904897
"""
905-
return (
906-
_NETWORKDIRECT_RDMA_INSTANCES.match(vm_size) is not None and
907-
_SRIOV_RDMA_TRANSITION_INSTANCES.match(vm_size) is None
908-
)
898+
return _NETWORKDIRECT_RDMA_INSTANCES.match(vm_size) is not None
909899

910900

911901
def is_rdma_pool(vm_size):
@@ -1148,14 +1138,13 @@ def _populate_pool_vm_configuration(config):
11481138
)
11491139
elif (vm_config.publisher == 'openlogic' and
11501140
vm_config.offer.startswith('centos') and
1151-
(vm_config.sku == '7.4' or vm_config.sku == '7.5' or
1152-
vm_config.sku == '7.6' or vm_config.sku == '7.7' or
1153-
vm_config.sku == '7_8')):
1141+
((vm_config.sku >= '7.4' and vm_config.sku <= '7.7') or
1142+
(vm_config.sku >= '7_8' and vm_config.sku < '8_'))):
11541143
vm_config = PoolVmPlatformImageSettings(
11551144
publisher='microsoft-azure-batch',
11561145
offer='centos-container{}'.format(
11571146
'-rdma' if is_rdma_pool(vm_size) else ''),
1158-
sku=vm_config.sku.replace('.', '-'),
1147+
sku=vm_config.sku.replace('.', '-').replace('_', '-'),
11591148
version='latest',
11601149
native=True,
11611150
license_type=None,

scripts/shipyard_nodeprep.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -402,12 +402,9 @@ get_vm_size_from_imds() {
402402
fi
403403
curl -fSsL -H Metadata:true --noproxy "*" "http://169.254.169.254/metadata/instance?api-version=${IMDS_VERSION}" > imd.json
404404
vm_size=$(${PYTHON} -c "import json;f=open('imd.json','r');a=json.load(f);print(a['compute']['vmSize'].lower())")
405-
if [[ "$vm_size" =~ ^standard_(((hb|hc)[0-9]+m?rs?(_v[1-9])?)|(nc[0-9]+rs_v3)|(nd[0-9]+rs_v2))$ ]]; then
405+
if [[ "$vm_size" =~ ^standard_(((hb|hc)[0-9]+m?rs?(_v[1-9])?)|(nc[0-9]+rs_v[2-4])|(nd[0-9]+(rs|rs_v2|asr_v4)))$ ]]; then
406406
# SR-IOV RDMA
407407
vm_rdma_type=1
408-
elif [[ "$vm_size" =~ ^standard_(nc[0-9]+rs_v2)$ ]]; then
409-
# SR-IOV RDMA (transition)
410-
vm_rdma_type=1
411408
elif [[ "$vm_size" =~ ^standard_((a8|a9)|((h|nc|nd)[0-9]+m?rs?))$ ]]; then
412409
# network direct RDMA
413410
vm_rdma_type=2

0 commit comments

Comments
 (0)