flant / shell-operator

Shell-operator is a tool for running event-driven scripts in a Kubernetes cluster
https://flant.github.io/shell-operator/
Apache License 2.0
2.44k stars 213 forks source link

Duplicate log lines with hook output on v1.4.15 #675

Open vladimirfx opened 5 days ago

vladimirfx commented 5 days ago

Expected behavior (what you expected to happen):

Each hook stdout/stderr output should be logged once.

Actual behavior (what actually happened):

There are many full and partial duplicates on hook output in logs.

Steps to reproduce:

  1. Print something (maybe multiline or stderr) from a hook script
  2. See pod logs

Environment:

Anything else we should know?:

controller.log

Additional information for debugging (if necessary):

https://github.com/cit-consulting/hetzner-failoverip-controller/blob/v0.8/docker/hooks/sync-fip.sh

miklezzzz commented 4 days ago

Hello, could you please try adding -s flag to the curl calls in your script and give it a try?

vladimirfx commented 4 days ago

Do so already: controller.log

https://github.com/cit-consulting/hetzner-failoverip-controller/blob/v0.8.1/docker/hooks/lib/process-resource.sh

miklezzzz commented 9 hours ago

Fixed in the linked PR. Thanks for the report!