Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Multiple SubnetDivisionRule of different sizes #864

Open
pandafy opened this issue May 30, 2024 · 1 comment
Open

[bug] Multiple SubnetDivisionRule of different sizes #864

pandafy opened this issue May 30, 2024 · 1 comment

Comments

@pandafy
Copy link
Member

pandafy commented May 30, 2024

Steps to replicate

  1. Ensure you have at least one device for the default organization in OpenWISP
  2. Create a subnet 10.0.0.0/16
  3. Add a SubnetDivisionRule as follows:
    Label: DEV1
    Type: Device
    Organization: Default
    Size of subnet: 31
    Number of subnet: 1
    Number of IPs: 1
  4. Ensure that subnets and IPs are created for the exsiting device
  5. Add another SubnetDivisionRule as follows:
    Label: DEV2
    Type: Device
    Organization: Default
    Size of subnet: 29
    Number of subnet: 1
    Number of IPs : 8

Expected Outcome

IPs and Subnets are provisioned for the device according to the DEV2 subnet divison rule.

Actual Outcome

Only IPs and Subnets are created for DEV1

Note: Both the subnet division rules are created for the same subnet

@pandafy
Copy link
Member Author

pandafy commented May 30, 2024

I suspect this occurs because of the Reserved Subnet. The size of the reserve subnet is dictating the size of the subsequent subnets.

If we change the order of created of subnet division rules, i.e. create DEV2 before DEV1, then the subnet created for DEV1 would be /29 instead of /31

@pandafy pandafy added the bug label May 30, 2024
@pandafy pandafy added this to To do (general) in OpenWISP Contributor's Board via automation May 30, 2024
@pandafy pandafy moved this from To do (general) to To do (Python & Django) in OpenWISP Contributor's Board May 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
OpenWISP Contributor's Board
  
To do (Python & Django)
Development

No branches or pull requests

2 participants