consul icon indicating copy to clipboard operation
consul copied to clipboard

Watch event fires twice?

Open ssenaria opened this issue 11 years ago • 4 comments

I have a simple event that writes to a file. When I trigger the event I see the file created.

{
    "watches": [
        {
            "name": "runme",
            "type": "event",
            "handler": "echo 'blah' > /tmp/samwashere"
        }
     ]
}

If I run a curl to see a list of events, I see the event waiting in queue (is this correct?)

curl http://172.20.10.103:8500/v1/event/list

If I restart consul, the event fires again (I confirmed by the timestamp of the file) and the event is now gone from the event list upon running another curl.

Is this correct?

ssenaria avatar Sep 23 '15 20:09 ssenaria

Hi @ssenaria this seems like a possible bug. When you say "restart consul" do you mean a config reload via https://www.consul.io/docs/commands/reload.html/SIGHUP?

slackpad avatar Sep 25 '15 19:09 slackpad

service consul restart on a RH 6 system.

ssenaria avatar Sep 25 '15 19:09 ssenaria

Looks similar to https://github.com/hashicorp/consul/issues/571.

slackpad avatar Nov 16 '15 21:11 slackpad

Closing as a dup of #571.

slackpad avatar Mar 11 '16 07:03 slackpad