Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 742896 - acct-user/netdata must not use /dev/null as home dir
Summary: acct-user/netdata must not use /dev/null as home dir
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Craig Andrews
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-16 07:45 UTC by Ortwin Glueck
Modified: 2020-09-16 16:19 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ortwin Glueck 2020-09-16 07:45:47 UTC
Since net-analyzer/netdata-1.25.0 netdata tries to cd into its home directory during startup. And that fails if it is set to /dev/null:

# /etc/init.d/netdata start
 * Starting netdata ...
2020-09-16 09:44:46: netdata INFO  : MAIN : CONFIG: cannot load cloud config '/var/lib/netdata/cloud.d/cloud.conf'. Running with internal defaults.
2020-09-16 09:44:46: netdata FATAL : netdata : Cannot cd to directory '/dev/null' # : Not a directory

2020-09-16 09:44:46: netdata INFO  : MAIN : EXIT: netdata prepares to exit with code 1...
2020-09-16 09:44:46: netdata INFO  : MAIN : EXIT: cleaning up the database...
2020-09-16 09:44:46: netdata INFO  : MAIN : Cleaning up database [0 hosts(s)]...
2020-09-16 09:44:46: netdata INFO  : MAIN : EXIT: removing netdata PID file '/var/run/netdata/netdata.pid'...
2020-09-16 09:44:46: netdata ERROR : MAIN : EXIT: cannot unlink pidfile '/var/run/netdata/netdata.pid'. (errno 2, No such file or directory)
2020-09-16 09:44:46: netdata INFO  : MAIN : EXIT: all done - netdata is now exiting - bye bye...


It works if you modify the home directory to /var/empty for example.

Reproducible: Always

Steps to Reproduce:
1. start net-analyzer/netdata-1.25.0
Actual Results:  
crash with error cd to /dev/null
Comment 1 Larry the Git Cow gentoo-dev 2020-09-16 16:19:54 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1ab87f3c98037caada46a90bb84eb1d7feaabded

commit 1ab87f3c98037caada46a90bb84eb1d7feaabded
Author:     Craig Andrews <candrews@gentoo.org>
AuthorDate: 2020-09-16 16:18:34 +0000
Commit:     Craig Andrews <candrews@gentoo.org>
CommitDate: 2020-09-16 16:19:49 +0000

    acct-user/netdata: Set home to /var/empty
    
    Closes: https://bugs.gentoo.org/742896
    Package-Manager: Portage-3.0.7, Repoman-3.0.1
    Signed-off-by: Craig Andrews <candrews@gentoo.org>

 acct-user/netdata/netdata-1.ebuild | 13 +++++++++++++
 1 file changed, 13 insertions(+)