OpenNebula / one-apps

Toolchain to build OpenNebula appliances
Apache License 2.0
12 stars 9 forks source link

Network contextualization sets depreacated NETWORKING variable on RHEL9 based OS #75

Closed mlturk closed 3 months ago

mlturk commented 3 months ago

On Alma Linux 9 contextualization sets variable NETWORKING=no in /etc/sysconfig/networking, use of ifcfg scripts is deprecated and setting this variable is not necessary. Moreover, in our use case, this variable misleads other software, that checks this (deprecated) variable to determine if system has networking configured.

I would suggest to change following line of code, which checks for existance of directory/etc/sysconfig/network-scripts/ https://github.com/OpenNebula/one-apps/blob/ccbf6be391a3e58667ce53f5172e33d4ed226b00/context-linux/src/etc/one-context.d/loc-10-network.d/functions#L100

to use same method as in netcfg-scripts https://github.com/OpenNebula/one-apps/blob/ccbf6be391a3e58667ce53f5172e33d4ed226b00/context-linux/src/etc/one-context.d/loc-10-network.d/netcfg-scripts#L25

This directory still exists, because it contains file describing depreciation of scripts configuration method /etc/sysconfig/network-scripts/readme-ifcfg-rh.txt.

This change in the one-context.d/loc-10-network.d/functions would skip setting this variable.

rsmontero commented 3 months ago

Merged! thanks for your feedback!