Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 655930 - net-analyzer/netdata-1.10.0 - netdata: Cannot cd to directory '/var/lib/netdata'
Summary: net-analyzer/netdata-1.10.0 - netdata: Cannot cd to directory '/var/lib/netdata'
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Craig Andrews
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-05-17 03:18 UTC by Georgy Yakovlev
Modified: 2018-08-01 16:38 UTC (History)
0 users

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 Georgy Yakovlev archtester gentoo-dev 2018-05-17 03:18:02 UTC
Hi,

net-analyzer/netdata-1.10 is not functional after installation.

It seems that portage strips out /var/lib/netdata* empty dirs and netdata fails to start:

May 16 20:01:10 reaper netdata: Cannot cd to directory '/var/lib/netdata'
May 16 20:01:10 reaper netdata: EXIT: netdata prepares to exit with code 1...
May 16 20:01:10 reaper netdata: EXIT: cleaning up the database...
May 16 20:01:10 reaper netdata: Cleaning up database [0 hosts(s)]...
May 16 20:01:10 reaper netdata: EXIT: removing netdata PID file '/run/netdata.pid'...
May 16 20:01:10 reaper netdata: EXIT: all done - netdata is now exiting - bye bye...
...
May 16 20:13:22 reaper netdata: Cannot cd to directory '/var/log/netdata'

portage complains:
```
QA: other
One or more empty directories installed to /var:

  /var/cache
  /var/lib
  /var/lib/netdata
  /var/lib/netdata/registry
  /var/log
  /var/log/netdata

If those directories need to be preserved, please make sure to create
or mark them for keeping using 'keepdir'. Future versions of Portage
will strip empty directories from installation image.
```

I see init script takes care of /var/cache/netdata /run/netdata, but /var/lib/netdata/* and /var/log also needs runtime creation or keepdir treatment, otherwise it does not start.


Portage 2.3.37 (python 3.5.5-final-0, default/linux/amd64/17.0/desktop/plasma, gcc-7.3.0, glibc-2.26-r7, 4.16.9-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-4.16.9-gentoo-x86_64-AMD_Ryzen_Threadripper_1950X_16-Core_Processor-with-gentoo-2.4.1
KiB Mem:    64809232 total,  54117504 free
KiB Swap:   16777208 total,  16777208 free
Timestamp of repository gentoo: Thu, 17 May 2018 00:46:28 +0000
Head commit of repository gentoo: 1ec17c2051a494a94976322b32ee790fdf0fb373

Head commit of repository steam-overlay: 46d2624c5f248bf28e25c25e172e60c2eb988e5f

sh bash 4.4_p19
ld GNU ld (Gentoo 2.30 p2) 2.30.0
distcc[25252] (dcc_mkdir) ERROR: mkdir '/tmp/portage/.distcc/state' failed: No such file or directory [disabled]
app-shells/bash:          4.4_p19::gentoo
dev-java/java-config:     2.2.0-r4::gentoo
dev-lang/perl:            5.26.2::gentoo
dev-lang/python:          2.7.14-r2::gentoo, 3.5.5-r1::gentoo
dev-util/cmake:           3.11.1::gentoo
dev-util/pkgconfig:       0.29.2::gentoo
sys-apps/baselayout:      2.4.1-r2::gentoo
sys-apps/openrc:          0.35.5::gentoo
sys-apps/sandbox:         2.13::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69-r4::gentoo
sys-devel/automake:       1.16.1-r1::gentoo
sys-devel/binutils:       2.30-r2::gentoo
sys-devel/gcc:            7.3.0-r1::gentoo
sys-devel/gcc-config:     1.9.1::gentoo
sys-devel/libtool:        2.4.6-r5::gentoo
sys-devel/make:           4.2.1-r3::gentoo
sys-kernel/linux-headers: 4.16-r1::gentoo (virtual/os-headers)
sys-libs/glibc:           2.26-r7::gentoo
Repositories:

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo.git
    priority: -1000

gyakovlev
    location: /var/db/repos/gyakovlev
    masters: gentoo

steam-overlay
    location: /var/db/repos/steam
    sync-type: git
    sync-uri: https://github.com/anyc/steam-overlay.git
    masters: gentoo
    priority: 50

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/var/cache/portage/distfiles"
EMERGE_DEFAULT_OPTS="--ask-enter-invalid --jobs=32  --load-average 32"
ENV_UNSET="DBUS_SESSION_BUS_ADDRESS DISPLAY PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg cgroup collision-protect compressdebug config-protect-if-modified distlocks downgrade-backup ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch parallel-install preserve-libs protect-owned sandbox sfperms sign splitdebug strict strict-keepdir unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="https://gentoo.osuosl.org/ http://gentoo.mirrors.pair.com/ http://cosmos.illinois.edu/pub/gentoo/ http://lug.mtu.edu/gentoo/"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="en"
MAKEOPTS="-j32 -l32"
PKGDIR="/var/cache/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/tmp"
USE="X a52 aac acl acpi activities alsa amd64 bash-completion berkdb bluray branding bzip2 cairo cdda cdr cli crypt cups cxx dbus declarative djvu dri dts dvd dvdr elogind emboss encode epub exif fam fbcon flac fontconfig fortran gdbm gif glamor gpm gtk iconv ios ipv6 jit jpeg kde kipi kwallet lcms libnotify lm_sensors lz4 lzma lzo mad mng mobi module-sign modules mp3 mp4 mpeg multilib ncurses nls nptl numa ogg opengl openmp pam pango pcre pdf phonon plasma png policykit ppds qml qt5 readline seccomp semantic-desktop smp spell ssl startup-notification svg tiff truetype udev udisks unicode upower urandom usb vaapi vdpau vim-syntax vorbis wayland widgets x264 xattr xcb xcomposite xinerama xml xscreensaver xv xvid zlib" ABI_X86="32 64" ALSA_CARDS="hda-intel" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon plan sheets stage words" CAMERAS="ptp2 fuji" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput" KERNEL="linux" L10N="en" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-6 php7-0" POSTGRES_TARGETS="postgres9_5" PYTHON_SINGLE_TARGET="python3_5" PYTHON_TARGETS="python2_7 python3_5" RUBY_TARGETS="ruby22 ruby24 ruby25" USERLAND="GNU" VIDEO_CARDS="amdgpu radeon radeonsi" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

net-analyzer/netdata-1.10.0::gentoo was built with the following:
USE="compression filecaps nodejs python -caps -ipmi -mysql -nfacct -postgres" ABI_X86="(64)" CPU_FLAGS_X86="sse2" PYTHON_TARGETS="python2_7 python3_5 -python3_4 -python3_6"
Comment 1 Larry the Git Cow gentoo-dev 2018-08-01 16:38:11 UTC
The bug has been closed via the following commit(s):

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

commit ed8d384791a44541c68ffde982d93d6f656d45c7
Author:     Craig Andrews <candrews@gentoo.org>
AuthorDate: 2018-08-01 16:35:35 +0000
Commit:     Craig Andrews <candrews@gentoo.org>
CommitDate: 2018-08-01 16:37:56 +0000

    net-analyzer/netdata: keep /var/{log,lib}/netdata
    
    Closes: https://bugs.gentoo.org/655930
    Package-Manager: Portage-2.3.44, Repoman-2.3.10

 net-analyzer/netdata/netdata-1.10.0-r1.ebuild | 110 ++++++++++++++++++++++++++
 net-analyzer/netdata/netdata-9999.ebuild      |   7 +-
 2 files changed, 115 insertions(+), 2 deletions(-)