Skip to content

RackNetworkConfig: Use stronger types than String? #3397

@jgallagher

Description

@jgallagher

When @jmpesp was testing #3387 in the Canada region, we tried running with a RackNetworkConfig of:

[rack_network_config]
gateway_ip = ""
infra_ip_first = ""
infra_ip_last = ""
uplink_port = ""
uplink_port_speed = "speed_10g"
uplink_port_fec = "none"
uplink_ip = ""

This is "valid" as far as type type system is concerned: the two enum values (uplink_port_{speed,fec}) have valid values, and the remaining values are all Strings; however, attempting to run RSS with these values eventually failed with

Bad configuration for setting up rack: unable to parse rack_network_config.uplink_up as IpAddr: invalid IP address syntax

If we're trying to parse values as IpAddr, I think we should be able to make the fields IpAddr from the top.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions