-
Notifications
You must be signed in to change notification settings - Fork 2
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
Network issues in machines with two networks #7
Comments
@achetronic I have updated (locally) the terraform code to fix this using the latest commits. Do you want that I create a PR with the changes, or prefer to discuss first the solution? |
Hi @achetronic, I pushed all the modifications that I did to try to address this issue in case you want to look at it first before doing the PR, you can check it here: main...jrpedrianes:metal-cloud:main |
Hello @jrpedrianes let's discuss the topic. By the moment DHCP is automatically used on NAT networks and fixed IPs on macvtap. This was done because completely needed when I coded it long time ago. I don't like deleting features, and your initial proposal was fixing the IPs always. Honestly I think you can be right on that and may be we should fix them all WDYT about this? (sorry for the delay in advance, several meals in the ovel at this moment) |
I think that in this case, the use of DHCP does not add much since from the beginning you have to configure the machine IP, if you didn’t have to configure it we should use DHCP and I would try to find a way to fix it keeping it, but now not. Also, as you configure the external IP statically I think that is better do the same in both cases, easier to review and understand how the networking is configured. |
Well, I think it's a fair point and explanation Let's do this. Can you open a PR with the proposal? but please, don't execute Terraform fmt on this iteration, just the code changes to make the review easier, as they are not trivial changes and we don't wanna break this for the users. Let's execute the The idea is fixing the IPs for all the machines, and drop DHCP support. Let's implement DHCP in a better way somewhen in the future We would need to support IPv4 ips, and may be IPv6. but we need validation for them too |
Ok, let me remove all the fmt stuff and the I will open a PR |
Released here: https://github.com/achetronic/metal-cloud/releases/tag/v1.1.0 Thank you for all the effort put on this :) |
Reviewing the current network configuration I get some "warnings" when I want to apply it again:
Also if I check the current "IP routes" applied to the machine, I get that has configured more than one default route, in my case I have 3 :
Reviewing the applied configuration, which you can see next, I saw that you are using deprecated configurations and also you are not defining any default route:
Seems that these configurations:
dhcp4: true
,gateway4: 10.10.10.1
andgateway4: 192.168.1.1
are the culprits that appear more than one default route.Maybe is better don't use DHCP, pin the IP to the network and define a "default" route, as follows:
In this commit you can see all the modifications that I have applied to the metal-could project to get this network configuration:
jrpedrianes@b95b82d
In summary:
The text was updated successfully, but these errors were encountered: