Cannot customize configuration templates when affected options are already in default configuration templates

Dear community,

When one customize a default configuration template they are replaced with the pristine values defined by NethServer after a package update. This may provoke lost of service in some cases where it is not possible to create customized configuration templates (because affected options are already defined with a different value in the pristine versions of them).

For example, consider an infrastructure of two NethServer systems where one of them is configured to be a local time server and the other one a client of it. To configure the local time server the configuration template (/etc/e-smith/templates/chrony.conf/20options) was modified to lower the stratum value from 10 to 8 so the client system configured with stratum 10 can contact the server. This works fine until a new package update for the package involved (nethserver-chronyd in this case) is performed. In this case all the related configuration templates are replaced and the configuration files rebuilt with default values leaving both server and client in stratum 10 (in which case the time client doesn’t connect to the time server because they both are at the same stratum).

Since default configuration includes definitions to values we need to use in the customization (stratum in this case), it is difficult to achieve the goal of using a customized template file to solve this issue (e.g., /etc/e-smith/templates/chrony.conf/30options). We would end up duplicating option definitions in the final configuration file when the configuration templates are expanded.

I guess this could be solved if nethserver rpms could consider default configuration template files as configuration files (e.g., they are replaced only when they haven’t been modified … and, if they have, … an .rpmnew file would be created for them.). To implement this, it would be necessary to mark such files as config in the rpm spec.

I also have to say that I am running two servers (and installing a third one) with NethServer 7 Final release without any further issue so far. It’s a titanium box :muscle: with a promising future. Great work :slight_smile:



to customize a fragment, you’ve got to copy it into /etc/e-smith/templates-custom/ and replicate there the path (or example /etc/e-smith/templates-custom/chronyd.conf/30options)


@Stefano_Zamboni thank you for the help. It seems to be not a bug. I found more information about this on Local site overrides: templates-custom and templates-user-custom



I can’t wait to see your achievements :slight_smile: Thanks for your trust :pray:

1 Like