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

Network configuration is wiped and replace under 3.23.12.0 #995

Closed
1 task done
hickey opened this issue Dec 7, 2023 · 4 comments
Closed
1 task done

Network configuration is wiped and replace under 3.23.12.0 #995

hickey opened this issue Dec 7, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@hickey
Copy link
Contributor

hickey commented Dec 7, 2023

Describe the bug

I have just brought up a new node running 3.23.12.0 (x86_64) on a Proxmox VM to be a supernode. After getting the initial configuration done to set the node name and the root password it was rebooted.

Upon the reboot I needed to update /etc/config/network to set the network interfaces. Because this is a VM I have added 2 ethernet interfaces (one for the WAN and one for the dtdlink). I have also created 2 bridges (br0 for WAN and br1 for dtdlink) and applied them appropriately to br-wan and br-dtdlink. I then configure br-wan for a static IP and set the gateway address. Save the file and reboot. The node comes up correctly and I can hit the node on the WAN address. I can then view the mesh status page and see the mesh nodes being populated through the dtdlink correctly.

Everything is fine up to this point. I then went and changed the node name and saved the configuration (through the GUI). The node rebooted and /etc/config/network was then reverted to the original state (just after the node name and password was set). All network configuration was lost.

In looking closer at this problem, I do see the basic template for /etc/config/network in /etc/config.mesh/network, but I am not sure how the template place holders are receiving their values. I would be happy to make updates to the locations where the original data for these templated sections originates from. That is probably the real solution for this, but there is not an obvious way to know how or where the configuration comes from. Maybe a few comments a the top of /etc/config.mesh/network (and the other templates in /etc/config.mesh) would be a good thing to lead people to where the real configuration is located.

  • Does this issue still occur on the latest version? (Required)

Expected behavior

Network configuration should not have been modified unless I was changing the network settings in the setup pages (i.e. mesh IP address/netmask, LAN configuration, or advanced networking).

Screenshots

Please include a screenshot of your system information (if possible) if the specific system environment is relevant to the bug.

If applicable, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here.

@hickey hickey added the bug Something isn't working label Dec 7, 2023
@aanon4
Copy link
Contributor

aanon4 commented Dec 7, 2023

Nothing in /etc/config will be preserved and will be replace when you run node-config (or the GUI does) or when you upgrade. Direct changes to /etc/config are unsupported and too much of the system relies on generating /etc/config from /etc/config.mesh for this to change anytime soon.

However, take a look at how node-setup generate the /etc/config/network file and you'll see there's override files in /etc/aredn_include/XXX.network.user (XXX can be dtdlink, wan, wifi, lan or bridge) which might provide you with a mechanism to get what you want.

@aanon4 aanon4 closed this as completed Dec 7, 2023
@aanon4 aanon4 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 7, 2023
@hickey
Copy link
Contributor Author

hickey commented Dec 7, 2023

That worked perfectly. Thank you.

I am going to create a PR to put some comments in the template so that others have a way of figuring out how to control the config for special circumstances.

@aanon4
Copy link
Contributor

aanon4 commented Dec 7, 2023

I'm glad it worked. And I'm happy to add additional hooks if needed (most people never touch this stuff).

I wanted to add that the next release will double down on /etc/config.mesh being the definitive configuration, and /etc/config just being the generated, ethereal version as I'm trying to get us to a place where less rebooting is required when stuff changes.

hickey added a commit to hickey/aredn that referenced this issue Dec 7, 2023
Added a comment at the top of /etc/config.mesh/network to inform node
admins how to override the network configuration for unusual and unique
network configurations. See issue aredn#995 for explanation of when overrides
may be needed.

Signed-off-by: Gerard Hickey <hickey@kinetic-compute.com>
Relates-to: aredn#995
hickey added a commit to hickey/aredn that referenced this issue Dec 7, 2023
Added a comment at the top of /etc/config.mesh/network to inform node
admins how to override the network configuration for unusual and unique
network configurations. See issue aredn#995 for explanation of when overrides
may be useful.

Signed-off-by: Gerard Hickey <hickey@kinetic-compute.com>
Relates-to: aredn#995
@hickey
Copy link
Contributor Author

hickey commented Dec 7, 2023

I think that the existing hooks are adequate -- at least I can not think of a situation where they could not cover a specific network configuration. Also agree that most people (except a few of us crazy ones) would never need to go to the extent of overriding the generated network configuration. I am glad that you had the hooks in there though.

aanon4 pushed a commit that referenced this issue Dec 7, 2023
Added a comment at the top of /etc/config.mesh/network to inform node
admins how to override the network configuration for unusual and unique
network configurations. See issue #995 for explanation of when overrides
may be useful.


Relates-to: #995

Signed-off-by: Gerard Hickey <hickey@kinetic-compute.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants