CentaurusInfra / mizar

Mizar – Experimental, High Scale and High Performance Cloud Network https://mizar.readthedocs.io
https://mizar.readthedocs.io
GNU General Public License v2.0
111 stars 50 forks source link

[Arktos-Mizar-Integration] Same IP is incorrectly used between different two vpcs and subnets #583

Closed q131172019 closed 2 years ago

q131172019 commented 2 years ago

What happened: Using the codes at https://github.com/CentaurusInfra/arktos/tree/poc-2022-01-30 to create one node scale-up cluster with mizar, after the ip '23.0.0.0' is used to create default vpc 'system-default-network' and default subnet 'system-default-network-subnet', the same ip '23.0.0.0' is still used to create another different vpc 'aaa-default-network' and subnet 'aaa-default-network-subnet'.

What you expected to happen: After the ip '23.0.0.0' is used to create default vpc 'system-default-network' and default subnet 'system-default-network-subnet', the same ip '23.0.0.0' should not be used to create another different vpc 'aaa-default-network' and subnet 'aaa-default-network-subnet'.

How to reproduce it (as minimally and precisely as possible):

  1. Create scale-up with mizar environment by running "CNIPLUGIN=mizar ./hack/arktos-up.sh"

  2. Creat default vpc 'system-default-network' and subnet 'system-default-network-subnet' using ip "23.0.0.0"

    cat ~/TMP/mizar/vpc.yaml
    apiVersion: mizar.com/v1
    kind: Vpc
    metadata:
    name: system-default-network
    spec:
    ip: "23.0.0.0"
    prefix: "16"
    dividers: 2
    status: "Init"
    cat ~/TMP/mizar/subnet.yaml
    apiVersion: mizar.com/v1
    kind: Subnet
    metadata:
    name: "system-default-network-subnet"
    spec:
    ip: "23.0.0.0"
    prefix: "24"
    bouncers: 1
    vpc: "system-default-network"
    status: "Init"
  3. Creat another vpc 'aaa-default-network' and subnet 'aaa-default-network-subnet' using ip "23.0.0.0"

    cat ~/TMP/mizar/vpc.aaa.yaml
    apiVersion: mizar.com/v1
    kind: Vpc
    metadata:
    name: aaa-default-network
    spec:
    ip: "23.0.0.0"
    prefix: "16"
    dividers: 1
    status: "Init"
    cat ~/TMP/mizar/subnet.aaa.yaml
    apiVersion: mizar.com/v1
    kind: Subnet
    metadata:
    name: "aaa-default-network-subnet"
    spec:
    ip: "23.0.0.0"
    prefix: "24"
    bouncers: 1
    vpc: "aaa-default-network"
    status: "Init"
  4. Verify two VPCs and two subnets are created successfully, Mizar team Hong thinks this looks a bug.

    ./cluster/kubectl.sh get vpcs
    NAME                     IP         PREFIX   VNI       DIVIDERS   STATUS        CREATETIME                   PROVISIONDELAY
    aaa-default-network      23.0.0.0   16       9147590   1          Provisioned
    system-default-network   23.0.0.0   16       875348    2          Provisioned
    vpc0                     20.0.0.0   8        1         1          Provisioned   2021-12-28T22:18:59.981801   42.494179
    ./cluster/kubectl.sh get subnets
    NAME                            IP         PREFIX   VNI   VPC                      STATUS        BOUNCERS   CREATETIME                   PROVISIONDELAY
    aaa-default-network-subnet      23.0.0.0   24             aaa-default-network      Provisioned   1
    net0                            20.0.0.0   8        1     vpc0                     Provisioned   1          2021-12-28T22:19:00.433420   62.239417
    system-default-network-subnet   23.0.0.0   24             system-default-network   Provisioned   2

Anything else we need to know?: The codes https://github.com/CentaurusInfra/arktos/tree/poc-2022-01-30 are used

Environment:

vinaykul commented 2 years ago

This is allowed. Not an issue.