Bug 1975340

Summary: netdata update overwrites configuration
Product: [Fedora] Fedora EPEL Reporter: Filippo Carletti <filippo.carletti>
Component: netdataAssignee: Didier Fabert (tartare) <didier.fabert>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: epel7CC: didier.fabert, fedora
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: netdata-1.39.1-1.fc37 netdata-1.39.1-1.el9 netdata-1.39.1-1.el8 netdata-1.39.1-1.el7 netdata-1.39.1-1.fc38 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-30 01:07:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Filippo Carletti 2021-06-23 13:02:43 UTC
Description of problem:

After the last update of netdata, my configuration has been overwritten.


Version-Release number of selected component (if applicable):

netdata-1.31.0-1.el7.x86_64

How reproducible:

Always, but not easy, because EPEL keeps only the last version of a package.


Steps to Reproduce:
1. Modify /etc/netdata/conf.d/python.d.conf
2. Update netdata


Actual results:

warning: /etc/netdata/conf.d/python.d.conf saved as /etc/netdata/conf.d/python.d.conf.rpmsave

Expected results:

warning: /etc/netdata/conf.d/python.d.conf created as /etc/netdata/conf.d/python.d.conf.rpmnew

Additional info:

noreplace has been removed in https://src.fedoraproject.org/rpms/netdata/c/5650caf47edcdc1fb29fb3ff63a0069835ad4bb0

Comment 1 Didier Fabert (tartare) 2021-06-23 13:28:06 UTC
Hi Filippo,

noreplace has been removed for good reason but not documented (my bad due to not enough time)

For netdata, conf.d is not a directory with secondary/partial conf files but just a stock of configuration. And yes the name is not appropriate (template will be a better name).

Each config file in /etc/netdata/conf.d must be edited with /usr/libexec/netdata/edit-config

In your case (whatever your current path), you must override the file by typing
sudo /usr/libexec/netdata/edit-config python.d.conf

The modified file will be saved as /etc/netdata/python.d.conf and because this file is not included in rpm package, it will never be replaced.

I apologize for the matter, I promise to found time to write doc asap.

Comment 2 Filippo Carletti 2021-06-23 16:03:06 UTC
Oops, I should have known how to configure netdata, but I obviously forgot the details when I modified python.d.conf. Noticing the removal of noreplace took me to the wrong path.

Comment 3 Georg Sauthoff 2022-04-27 21:27:03 UTC
To be fair, /etc/netdata/conf.d is a pretty surprising location for a stock configuration directory, where files shouldn't be modified and don't survive a package update.

Also, netdata has moved on and switched the default to /usr/lib/netdata/conf.d, which arguably is a much saner choice, and follows a common pattern used by other well known software.

Thus, when looking at the netdata online documentation one has to dig quite a bit to get what /etc/netdata/conf.d actually is about.

Hence, I suggest to switch the fedora package to the upstream default, i.e. also just install the stock configuration files under /usr/lib/netdata/conf.d!

As a positive side effect, this would eliminate the need to 'spam' the environment with a bunch of Netdata specific variables (because all defaults work).

I mean currently, my environment reads:

# cat /etc/fedora-release 
Fedora release 35 (Thirty Five)
# rpm -q netdata
netdata-1.33.1-2.fc35.x86_64
# export | grep NETDATA
NETDATA_CACHE_DIR=/var/cache/netdata
NETDATA_STOCK_CONFIG_DIR=/etc/netdata/conf.d
NETDATA_USER_CONFIG_DIR=/etc/netdata
NETDATA_VARLIB_DIR=/var/lib/netdata

Comment 4 Didier Fabert (tartare) 2022-04-29 08:27:16 UTC
IMO the location is not a surprising one because this is configuration files anyway and it's not surprising that conf files are located in /etc. But The dir name is surprising (name from upstream).
But I agree that is confusing and is not a good solution.

Without any change, conf.d will be located in %{_libdir}, which is /usr/lib for i386 but /usr/lib64 on x86_64 arch. This breaks packaging rules.

Currently I modify package to put stock configuration directory in /usr/lib/netdata/conf.d but a trigger must be set in case of update package.

This changes will be present in the next release (1.34.1)

Comment 5 Fedora Update System 2023-05-21 17:12:27 UTC
FEDORA-2023-0b483891c6 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2023-0b483891c6

Comment 6 Fedora Update System 2023-05-21 17:12:39 UTC
FEDORA-2023-88202e49cd has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-88202e49cd

Comment 7 Fedora Update System 2023-05-21 17:12:49 UTC
FEDORA-EPEL-2023-a0be4e1a3b has been submitted as an update to Fedora EPEL 8. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2023-a0be4e1a3b

Comment 8 Fedora Update System 2023-05-21 17:12:57 UTC
FEDORA-EPEL-2023-d2552e4817 has been submitted as an update to Fedora EPEL 7. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2023-d2552e4817

Comment 9 Fedora Update System 2023-05-21 17:13:04 UTC
FEDORA-EPEL-2023-df65ce1916 has been submitted as an update to Fedora EPEL 9. https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2023-df65ce1916

Comment 10 Fedora Update System 2023-05-22 00:48:10 UTC
FEDORA-EPEL-2023-df65ce1916 has been pushed to the Fedora EPEL 9 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2023-df65ce1916

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 11 Fedora Update System 2023-05-22 01:05:51 UTC
FEDORA-2023-0b483891c6 has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf install --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-0b483891c6 \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-0b483891c6

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 12 Fedora Update System 2023-05-22 01:11:19 UTC
FEDORA-EPEL-2023-a0be4e1a3b has been pushed to the Fedora EPEL 8 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2023-a0be4e1a3b

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 13 Fedora Update System 2023-05-22 01:16:47 UTC
FEDORA-EPEL-2023-d2552e4817 has been pushed to the Fedora EPEL 7 testing repository.

You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-EPEL-2023-d2552e4817

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 14 Fedora Update System 2023-05-22 02:04:41 UTC
FEDORA-2023-88202e49cd has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf install --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-88202e49cd \*`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-88202e49cd

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 15 Fedora Update System 2023-05-30 01:07:47 UTC
FEDORA-2023-0b483891c6 has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 16 Fedora Update System 2023-05-30 01:29:21 UTC
FEDORA-EPEL-2023-df65ce1916 has been pushed to the Fedora EPEL 9 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 17 Fedora Update System 2023-05-30 01:30:11 UTC
FEDORA-EPEL-2023-a0be4e1a3b has been pushed to the Fedora EPEL 8 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 18 Fedora Update System 2023-05-30 01:47:02 UTC
FEDORA-EPEL-2023-d2552e4817 has been pushed to the Fedora EPEL 7 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 19 Fedora Update System 2023-05-30 02:03:16 UTC
FEDORA-2023-88202e49cd has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.