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

Create discovered subnet in correct fabric #20

Conversation

jjqq2013
Copy link

There is a use case:

  • MAAS's DHCP is disabled, and an external DHCP sever is used for PXE boot.
  • MAAS has 2 nics, named nic1, nic2. The nic2 is actually the one used for provisioning.
  • MAAS based on the nic name order, created fabric-0, fabric-1 for them respectively. The fabric-1 is actually the one used for provisioning, while default fabric is fabric-0 which is almost usless.
  • Commission a node, the node get an ip, the node UI shows its IP as "Auto assigned".
  • MAAS detected the ip is bound coming from nic2 so it set the node's fabric=1 (more precisely, set vlan_id = id of untagged vlan of fabric-1)
  • MAAS found the ip is not belonging to any existing subnets, so it automatically create a subnet, but it always create the subnet on fabric-0. This is the begining of all wrong things later.
  • Deploy the node, also succeeded, when finished, it is node UI shows ip correctly
  • Release the node, then the node status shows "Node must be attached to a network", this is because it could not find a proper subnet in fabric-1.
  • The node become unavailable for Deploying unless Commission again.

So this PR create such discovered subnet in correct fabric.

There is a use case:
- MAAS's DHCP is disabled, and an external DHCP sever is used for PXE boot.
- MAAS has 2 nics, named nic1, nic2. The nic2 is actually the one used for provisioning.
- MAAS based on the nic name order, created fabric-0, fabric-1 for them respectively. The fabric-1 is actually the one used for provisioning, while default fabric is fabric-0 which is almost usless.
- Commission a node, the node get an ip, the node UI shows its IP as "Auto assigned". 
- MAAS detected the ip is bound coming from nic2 so it set the node's fabric=1 (more precisely, set vlan_id = id of untagged vlan of fabric-1)
- MAAS found the ip is not belonging to any existing subnets, so it automatically create a subnet, but it always create the subnet on fabric-0.  This is the begining of all wrong things later.
- Deploy the node, also succeeded, when finished, it is node UI shows ip correctly
- Release the node, then the node status shows "Node must be attached to a network", this is because it could not find a proper subnet in fabric-1.
- The node become unavailable for Deploying unless Commission again.

So this PR create such discovered subnet in correct fabric.
@github-actions
Copy link

Thank you for your PR! The code on GitHub is a mirror only and we don't merge PRs here.
Please create an MP on Launchpad: https://launchpad.net/maas

@github-actions github-actions bot closed this Mar 16, 2023
@jjqq2013 jjqq2013 changed the title Create subnet in correct fabric Create discovered subnet in correct fabric Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant