Skip to content

Conversation

@adityagesh
Copy link
Collaborator

@adityagesh adityagesh commented Oct 3, 2025

  1. Split use_ipv6 to use_ipv6_internal and use_ipv6_public
  2. Remove dead code for use_ipv6
  3. Add test case for ipv6 basic test
  4. Add support for ipv6 for tools like ntttcp, lagscope, Ip

Rewrite code based on #3957

@squirrelsc
Copy link
Member

Even though things change a lot, if it still uses the original PR, it’s easier for me to refer back to my earlier comments.

param ip_service_tags object

@description('whether to use ipv6')
@description('whether to use ipv6 (legacy parameter for backward compatibility)')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you find any usages internally? If so, create a PR to main-ci branch to fix them.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could only find one reference in lisa/microsoft/runbook/azure.yml

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, please remove it.

@adityagesh
Copy link
Collaborator Author

Even though things change a lot, if it still uses the original PR, it’s easier for me to refer back to my earlier comments.

my apologies, for this PR, do you want me to force push/ manually make these changes into the other PR?

# Check for IPv6 network interface requirements and set deployment flags
if (
node.capability.network_interface
and hasattr(node.capability.network_interface, 'ip_version')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why bother checking if the attribute exists? It’s supposed to be there by default.

base_type=IpProtocol,
default_values=[IpProtocol.ipv4, IpProtocol.ipv6],
),
required=False,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can it be set to empty? And if so, what happens when it is?

):
# Handle both single value and SetSpace cases
ip_version = node.capability.network_interface.ip_version
if hasattr(ip_version, 'items'):
Copy link
Member

@squirrelsc squirrelsc Oct 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of inspecting attributes, just verify the type directly. It'll keep things cleaner and more straightforward. Use def generate_min_capability_setspace_by_priority with ipv6 to check if ipv6 exists or not.


if ipv6_required:
log.info("IPv6 network interface requirement detected, enabling IPv6 internal")
arm_parameters.use_ipv6_internal = True
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

how about use_ipv6_public? Does it needs to be set to true?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, currently I am not checking for public.
Let me recheck this logic

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I'll need to add the below to class NetworkInterfaceOptionSettings(FeatureSettings):

ipv6_addressing_type: Optional[
    Union[search_space.SetSpace[IPv6AddressingType], IPv6AddressingType]
] = field(
    default=None,  # Default to None when IPv4 is used
    metadata=field_metadata(
        decoder=partial(
            search_space.decode_nullable_set_space,
            base_type=IPv6AddressingType,
            default_values=[
                IPv6AddressingType.internal_only,
                IPv6AddressingType.public_and_internal,
                IPv6AddressingType.public_only,
            ],  # Capabilities can support all types
        ),
        required=False,
        allow_none=True,
    ),
)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the purpose of this setting?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking of replacing ip_version: Optional[Union[search_space.SetSpace[IpProtocol], IpProtocol]] with ipv6_addressing_type.
ipv6_addressing_type if none = ipv6 disabled

Otherwise, there is no way to determine if ipv6 is required for internal, public or both

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like we need to follow the design for use_ipv6_public and use_ipv6_internal at the feature level. But in the Bicep code, they should be named enable_ipv6_public and enable_ipv6_internal instead. The Bicep layer doesn’t really know how to use those feature flags directly.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ack

ip_version = node.capability.network_interface.ip_version
if hasattr(ip_version, 'items'):
# SetSpace case - check if IPv6 is in the set
ipv6_required = schema.IpProtocol.ipv6 in ip_version.items
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why ipv6 is here, and so it would be required?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants