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

timeout requires flag #5935

Closed
utdrmac opened this issue Apr 30, 2019 · 1 comment · Fixed by #5938
Closed

timeout requires flag #5935

utdrmac opened this issue Apr 30, 2019 · 1 comment · Fixed by #5938
Assignees
Labels
area/collectors Everything related to data collection area/packaging Packaging and operating systems support bug
Milestone

Comments

@utdrmac
Copy link

utdrmac commented Apr 30, 2019

Bug report summary

Running latest Docker image. Trying to use charts.plugin.

timeout ${t} "${@}" 2>"${TMP_DIR}/run.${pid}"

timeout requires -t to be passed as flag option

Seeing this error message when attempting to debug charts plugin:

timeout: can't execute '4': No such file or directory
# timeout
BusyBox v1.29.3 (2019-04-25 10:39:48 UTC) multi-call binary.

Usage: timeout [-t SECS] [-s SIG] PROG ARGS
OS / Environment

Docker 20190428 (latest)

Netdata version (ouput of netdata -V)

v1.14.0-11-ge91b9ca

Component Name

charts plugin

Steps To Reproduce

attempt to use nut (or any charts.d plugin)

Expected behavior

for the correct parameters to be passed to utilities so that things work as expected

@paulkatsoulakis paulkatsoulakis self-assigned this Apr 30, 2019
@paulkatsoulakis paulkatsoulakis added area/collectors Everything related to data collection area/packaging Packaging and operating systems support bug labels Apr 30, 2019
@paulkatsoulakis paulkatsoulakis added this to the v1.15 milestone Apr 30, 2019
@paulkatsoulakis
Copy link
Contributor

Good morning @utdrmac, thanks for reporting the issue!
We struggle a lot to provide an out of the box capability to our users, but as you will also see the variations are so many that things slip through.

On this specific issue It seems that timeout syntax differs between distros. More precisely, we have the following variations:

  1. FreeBSD - has a parameter duration, plus kill switches with flags
root@netdata-freebsd-test:~ # timeout --help
Usage: timeout [--signal sig | -s sig] [--preserve-status] [--kill-after time | -k time] [--foreground] <duration> <command> <arg ...>
  1. Alpine - has the option -t for seconds
bash-4.4# timeout --help
BusyBox v1.29.3 (2019-04-28 10:42:51 UTC) multi-call binary.

Usage: timeout [-t SECS] [-s SIG] PROG ARGS

Runs PROG. Sends SIG to it if it is not gone in SECS seconds.
Defaults: SECS: 10, SIG: TERM.
bash-4.4# 
  1. CentOS, Ubuntu (and i am guessing other linux distros too) have the DURATION as parameter, plus kill switch flags same like freeBSD
[root@d4a7c9920642 netdata]# timeout --help
Usage: timeout [OPTION] DURATION COMMAND [ARG]...
  or:  timeout [OPTION]
Start COMMAND, and kill it if still running after DURATION.
.
.
.
DURATION is a floating point number with an optional suffix:
's' for seconds (the default), 'm' for minutes, 'h' for hours or 'd' for days.
.
.

I 'll work around a solution for this, we should have seen that for sure in the first place.

Thanks!

paulkatsoulakis pushed a commit to paulkatsoulakis/netdata that referenced this issue Apr 30, 2019
@paulkatsoulakis paulkatsoulakis added this to In progress in Paul's backlog Apr 30, 2019
paulkatsoulakis pushed a commit to paulkatsoulakis/netdata that referenced this issue May 1, 2019
Paul's backlog automation moved this from In progress to Done May 2, 2019
paulkatsoulakis added a commit that referenced this issue May 2, 2019
…5938)

* netdata/packaging/ci: #5935 - Make timeout usage more cross-distro compliant

* netdata/collectors: use existing system info variable NETDATA_SYSTEM_OS_ID
jackyhuang85 pushed a commit to jackyhuang85/netdata that referenced this issue Jan 1, 2020
…etdata#5938)

* netdata/packaging/ci: netdata#5935 - Make timeout usage more cross-distro compliant

* netdata/collectors: use existing system info variable NETDATA_SYSTEM_OS_ID
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/collectors Everything related to data collection area/packaging Packaging and operating systems support bug
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants