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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data are not correctly returned when script is too fast #11

Closed
pouicr opened this issue Dec 13, 2018 · 2 comments
Closed

Data are not correctly returned when script is too fast #11

pouicr opened this issue Dec 13, 2018 · 2 comments

Comments

@pouicr
Copy link
Contributor

pouicr commented Dec 13, 2018

Hi,

I tried the webhookd with a small script.

#! /usr/bin/env bash

echo "Script parameters: $1"
echo "FOo parameters: $foo"
echo "FOo parameters: $service"
echo "FOo parameters: $version"

This give me a random result 馃槩

Sometimes:

curl --data @test.json "http://localhost:8080/reload?service=saphir-traefik&version=1"
data: Script parameters: {"tata":"toto"}

data: FOo parameters: 

data: FOo parameters: saphir-traefik

data: FOo parameters: 1

data: done

But sometimes:

curl --data @test.json "http://localhost:8080/reload?service=saphir-traefik&version=1"
data: Script parameters: {"tata":"toto"}

data: FOo parameters: 

data: done

And I've got some error in the logs:

NFO: 2018/12/13 12:53:01 work_runner.go:36: Work reload#15 started...
ERROR: 2018/12/13 12:53:01 work_runner.go:82: Work reload#15 is over. Unable to write more data into the channel: FOo parameters: 1
ERROR: 2018/12/13 12:53:01 work_runner.go:95: Error while flushing the log file: /tmp/reload_15_20181213_1253.txt write /tmp/reload_15_20181213_1253.txt: file already closed
INFO: 2018/12/13 12:53:01 work_runner.go:110: Work reload#15 done [SUCCESS]

Any idea?

@ncarlier
Copy link
Owner

Hi,
I just fixed a concurrency issue related to command termination and log reading.
Can you check if the new release (1.3.2) fix that?

@pouicr
Copy link
Contributor Author

pouicr commented Dec 17, 2018

Hi,

I confirm is working as expected with the latest docker image! thx for that

However I cannot confirm the version since the version is not displayed:

bash-4.4# webhookd --version
webhookd ()

Thx a lot for the quick fix
BR

@pouicr pouicr closed this as completed Dec 17, 2018
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

No branches or pull requests

2 participants