Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

netdata: allow execution without a config file #19861

Merged
merged 2 commits into from
Nov 2, 2016

Conversation

womfoo
Copy link
Member

@womfoo womfoo commented Oct 25, 2016

Motivation for this change

netdata does not work when not passed a configuration file. I've also updated the web_access.patch for version 1.4 which was removed in the latest commit.

# netdata
16-10-25 15:13:28: ERROR: netdata: Cannot open file '/nix/store/8cgjg5isb8dp72ww9mbgkgifq9d33j8v-netdata-1.4.0/etc/netdata/netdata.conf' (errno 2, No such file or directory)
16-10-25 15:13:28: INFO: netdata: System has 8 processors.
16-10-25 15:13:28: INFO: netdata: System supports 32768 pids.
16-10-25 15:13:28: ERROR: netdata: Group 'nobody' is not present. Ignoring option.
16-10-25 15:13:28: ERROR: netdata: Cannot open file '/nix/store/8cgjg5isb8dp72ww9mbgkgifq9d33j8v-netdata-1.4.0/var/log/netdata/debug.log'. Leaving 1 to its default. (errno 30, Read-only file system)
16-10-25 15:13:28: ERROR: netdata: Cannot open file '/nix/store/8cgjg5isb8dp72ww9mbgkgifq9d33j8v-netdata-1.4.0/var/log/netdata/error.log'. Leaving 2 to its default. (errno 30, Read-only file system)
16-10-25 15:13:28: ERROR: netdata: Cannot open file '/nix/store/8cgjg5isb8dp72ww9mbgkgifq9d33j8v-netdata-1.4.0/var/log/netdata/access.log'. Leaving -1 to its default. (errno 30, Read-only file system)
16-10-25 15:13:28: INFO: netdata: Adjusted my Out-Of-Memory score to 1000.
16-10-25 15:13:28: INFO: netdata: Adjusted my scheduling priority to IDLE.
16-10-25 15:13:28: INFO: netdata: 
Successfully became user 'nobody'.
16-10-25 15:13:28: INFO: netdata: NetData started on pid 31914
16-10-25 15:13:28: FATAL: netdata: Cannot create unique machine id file '/nix/store/8cgjg5isb8dp72ww9mbgkgifq9d33j8v-netdata-1.4.0/var/lib/netdata/registry/netdata.public.unique.id'. Please fix this. # : Read-only file system

16-10-25 15:13:28: INFO: netdata: Called: netdata_cleanup_and_exit()
16-10-25 15:13:28: INFO: netdata: Saving database...
16-10-25 15:13:28: INFO: netdata: NetData exiting. Bye bye...

Also cleaned up the preConfigure section as the libraries appear to be linked OK.

$ ldd result/bin/netdata 
    linux-vdso.so.1 (0x00007ffdb91f1000)
    libm.so.6 => /nix/store/23vndix3mzcyw84kag06h8fh464g32nq-glibc-2.24/lib/libm.so.6 (0x00007efdf5d8d000)
    libz.so.1 => /nix/store/caz03y58cyrqn4i5ckdw4i21g9sdjb18-zlib-1.2.8/lib/libz.so.1 (0x00007efdf5b77000)
    libuuid.so.1 => /nix/store/1dyxjvsdnq15sc2ikfibfffvf4l6lq3c-util-linux-2.28.1/lib/libuuid.so.1 (0x00007efdf5972000)
    libpthread.so.0 => /nix/store/23vndix3mzcyw84kag06h8fh464g32nq-glibc-2.24/lib/libpthread.so.0 (0x00007efdf5755000)
    libc.so.6 => /nix/store/23vndix3mzcyw84kag06h8fh464g32nq-glibc-2.24/lib/libc.so.6 (0x00007efdf53b7000)
    /nix/store/23vndix3mzcyw84kag06h8fh464g32nq-glibc-2.24/lib/ld-linux-x86-64.so.2 (0x00007efdf6092000)
Things done
  • Tested using sandboxing
    (nix.useSandbox on NixOS,
    or option build-use-sandbox in nix.conf
    on non-NixOS)
  • Built on platform(s)
    • NixOS
    • OS X
    • Linux
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

@mention-bot
Copy link

@womfoo, thanks for your PR! By analyzing the history of the files in this pull request, we identified @derchrisuk and @lethalman to be potential reviewers.

@NeQuissimus NeQuissimus merged commit 29f679d into NixOS:master Nov 2, 2016
@womfoo womfoo deleted the fix/netdata branch April 30, 2017 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants