openwisp / openwisp/openwisp-controller

[bug] Multiple SubnetDivisionRule of different sizes

Open
#864 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug subnet-division-rules
Dominant language
Python
Stars
773
Forks
315
Avg merge
2d 16h
Merged PRs (30d)
14

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the SubnetDivisionRule implementation and the provisioning path for subnets and IPs. Reproduce the two-rule sequence described in the issue, then look for existing tests around subnet division. Done means a second rule with a different subnet size provisions the expected subnets and IPs for the same device.

Written by the indexing model from the issue text.

Assessment

Tech stack
django, python
Domain
backend, networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.