Skip to content

Multiple servers with the same service address #8122

@AbdelrahmanElawady

Description

@AbdelrahmanElawady

This Bug Report affects these Traffic Control components:

  • Traffic Ops

What did you do?

When creating servers on the same profile with the same service address in range /32 for IPv4 or /128 for IPv6 (i.e. 1.1.1.1/32) it works fine. However, other ranges fail as servers with the same service address are not allowed
To reproduce:

  • Run Traffic Ops
  • Create server with service address ending in /32
  • Create another with the same address it won't fail
  • Try with /24 the same case and it will fail

This is because we are using inet Postgres type to represent IPs and it omits the mask part if it's a single host: https://www.postgresql.org/docs/current/datatype-net-types.html#DATATYPE-INET
So upon validation the IP stored in DB does not match what's in the request and it gets created with no errors.

What did you expect to happen?

Fail with error indicating that servers on the same profile can't share the same service address for subnet /32.

What actually happened?

Servers were created fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Traffic Opsrelated to Traffic Opsbugsomething isn't working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions