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

Layer3Error: IPs provided do not all belong to same network #13

Open
samiemostafavi opened this issue Dec 7, 2021 · 2 comments
Open
Assignees
Labels
invalid This doesn't seem right

Comments

@samiemostafavi
Copy link
Contributor

IPs assigned by the user may not belong to the same network e.g. multiple subnets.

From layer3 perspective, this is not an invalid configuration. Hence, raising an exception is not correct.

Layer3 module, knows nothing about the higher layer limits and whether it can handle multiple subnets or not.
Layer3 should deploy any valid IP assignment. Multiple subnets is a valid configuration from layer3 perspective.

The error should be raised in Swarm module and not here.

@samiemostafavi samiemostafavi added the invalid This doesn't seem right label Dec 7, 2021
@molguin92
Copy link
Contributor

No sure I agree.

IMHO, Layer3 needs to do two things: 1. assign IPs and 2. make sure these IPs can see and connect to each other (prerequisite for the Swarm). Since we don't implement any routing, 2. can only be ensured by having everything in the same subnetwork.

Note also that the Swarm already assumes that all IPs are valid and that they can connect to each other. If they can't, the swarm won't fail, it will just stay in an invalid state and workloads won't be able to talk to each other.

@samiemostafavi
Copy link
Contributor Author

Layer3 can easily make sure IPs can see and connect to each other "IF" they are in the same subnet. By imposing this, we limit the system unnecessarily and debug becomes much harder.

This layer is not about Swarm, what if we don't use Swarm on the higher layer? something that supports multiple subnets. What if we want to run bare metal?

Layer3 is not only about Swarm and Workload Hosts. When it comes to cellular PHYs, we need to assign IPs to RadioHosts' interfaces. They may need their own subnet and they belong to Layer2. Who should assign IPs to them?

This limits our ability to debug as well. We can discuss it more in person.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants