HeavyHorst / remco

remco is a lightweight configuration management tool

Home Page:https://heavyhorst.github.io/remco/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Template with [exec] seems to ignore check_cmd for templates

Argelbargel opened this issue · comments

Hi,

i have this resource-configuration in <include_dir>/my-server.toml:

name = "my-server"

[exec]
    command = "my-server -c '/config.conf'"
    kill_signal = "SIGTERM"
    reload_signal = "SIGUSR1"
    kill_timeout = 60
    splay = 30


[[template]]
  src = "/config.conf.tpl"
  dst = "/config.conf"
  mode = "0644"
  check_cmd = "my-server-config-check -c '{{.src}}'"
  reload_cmd = ""

While this starts, terminates and reloads the command defined in [exec] correctly when the values from the backend change and /config.conf is updated by using the configured signals, it seems to ignore the check_cmd. Is this by design or is it a bug (or am i simply missing a typo in the config)?

Could you run remco in debug mode and post the output here?

Did something else an simply wrote some debug messages to a file in check_cmd. Turns out check_cmd gets executed correctly but its output is not written to stdout so i could not find it in the logs of my container.

Great, thanks for the reply!