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

Implement timeouts for all exec command runners #1125

Merged
merged 1 commit into from
Apr 29, 2016
Merged

Implement timeouts for all exec command runners #1125

merged 1 commit into from
Apr 29, 2016

Conversation

sparrc
Copy link
Contributor

@sparrc sparrc commented Apr 29, 2016

First is to write an internal CombinedOutput and Run function with a
timeout.

Second, the following instances of command runners need to have timeouts:

plugins/inputs/ping/ping.go
125:    out, err := c.CombinedOutput()

plugins/inputs/exec/exec.go
91: if err := cmd.Run(); err != nil {

plugins/inputs/ipmi_sensor/command.go
31: err := cmd.Run()

plugins/inputs/sysstat/sysstat.go
194:    out, err := cmd.CombinedOutput()

plugins/inputs/leofs/leofs.go
185:    defer cmd.Wait()

plugins/inputs/sysstat/sysstat.go
282:    if err := cmd.Wait(); err != nil {

closes #1067

@sparrc sparrc force-pushed the cs1067 branch 7 times, most recently from 5662507 to 3f3a6a0 Compare April 29, 2016 17:54
@sparrc sparrc changed the title [WIP] Implement timeouts for all exec command runners Implement timeouts for all exec command runners Apr 29, 2016
First is to write an internal CombinedOutput and Run function with a
timeout.

Second, the following instances of command runners need to have timeouts:

    plugins/inputs/ping/ping.go
    125:	out, err := c.CombinedOutput()

    plugins/inputs/exec/exec.go
    91:	if err := cmd.Run(); err != nil {

    plugins/inputs/ipmi_sensor/command.go
    31:	err := cmd.Run()

    plugins/inputs/sysstat/sysstat.go
    194:	out, err := cmd.CombinedOutput()

    plugins/inputs/leofs/leofs.go
    185:	defer cmd.Wait()

    plugins/inputs/sysstat/sysstat.go
    282:	if err := cmd.Wait(); err != nil {

closes #1067
@sparrc sparrc merged commit 3f807a9 into master Apr 29, 2016
@sparrc sparrc deleted the cs1067 branch April 29, 2016 18:42
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.

Telegraf 0.11.1 (Influx Backend) - Stops Gathering Metrics
1 participant