Closed cbr46 closed 4 months ago
Furthermore there's a syntax error in https://github.com/OpenNebula/one-apps/blob/master/context-linux/src/etc/one-context.d/loc-10-network.d/netcfg-nm#L268 The if-statement has to be in double brackets.
Furthermore there's a syntax error in https://github.com/OpenNebula/one-apps/blob/master/context-linux/src/etc/one-context.d/loc-10-network.d/netcfg-nm#L268 The if-statement has to be in double brackets.
In the meantime this has been fixed 61542444c2a74d0e604f17e7a3851d4c1e5f2d79
Well, the whole Contextualization seems to not be made for the use without automatic IP Assignment. If you install the package, the install process will always generate this file, which turns the management of DNS (resolv.conf) through NetworkManager off: https://github.com/OpenNebula/one-apps/blob/master/context-linux/src/etc/NetworkManager/conf.d/one-context.conf%23%23linux.one. Thus the DNS servers in the NM Connection will be ignored.
If you were to remove this file (or line in the file), automatic IP assignment probably wouldn't work anymore, as the DNS servers are not managed through NetworkManager when using this feature.
We have been working on several aspects related to this issue, now setting the IP_METHOD=skip
should bypass the configuration. This setting can be done per vnet, address range or per VM NIC
Description When using Virtual Networks without IP Assignment, i.e. only a MAC Address is provided, the Contextualization deletes manually created NetworkManager Connections in EL9 at every reboot.
To Reproduce
Expected behavior When using a Virtual Network without automatic IP assignment and with manually created NetworkManager Connections, the Contextualization should not delete those Connections upon rebooting.
Cause The Bug is in this if-statement within the network functions: https://github.com/OpenNebula/one-apps/blob/master/context-linux/src/etc/one-context.d/loc-10-network.d/functions#L84
When using a Virtual Network without automatic IP assignment, ETH0_MAC will still be configured within the context:![image](https://github.com/OpenNebula/one-apps/assets/18323184/4826a25d-1629-47e9-9e88-b54b0a5fa5f2)
Contextualization thus thinks it has to manage the entire interface, which is not the case. The if-statement should also check if ETH0_IP is set: