Skip to content

Commit 8e970b7

Browse files
Set DeviceIndex to 0 in cluster validator
Signed-off-by: Francesco Giordano <[email protected]>
1 parent 95c9708 commit 8e970b7

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

cli/src/pcluster/validators/cluster_validators.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -941,16 +941,17 @@ def _get_queues_security_group_overwrite_status(self, queues):
941941
class _LaunchTemplateValidator(Validator):
942942
"""Abstract class to contain utility functions used by head node and queue LaunchTemplate validators."""
943943

944+
@staticmethod
944945
def _build_launch_network_interfaces(
945-
self, network_interfaces_count, use_efa, security_group_ids, subnet, use_public_ips=False
946+
network_interfaces_count, use_efa, security_group_ids, subnet, use_public_ips=False
946947
):
947948
"""Build the needed NetworkInterfaces to launch an instance."""
948949
network_interfaces = []
949-
for device_index in range(network_interfaces_count):
950+
for network_interface_index in range(network_interfaces_count):
950951
network_interfaces.append(
951952
{
952-
"DeviceIndex": device_index,
953-
"NetworkCardIndex": device_index,
953+
"DeviceIndex": 0,
954+
"NetworkCardIndex": network_interface_index,
954955
"InterfaceType": "efa" if use_efa else "interface",
955956
"Groups": security_group_ids,
956957
"SubnetId": subnet,

0 commit comments

Comments
 (0)