I've used Hashicorps' example docker-compose to start a 3-server / 3-client cluster of Consul.
I just wanted to see how consul exec works:
consul members
Node Address Status Type Build Protocol DC Segment
b9e4dbaa35ac 172.18.0.7:8301 alive server 1.3.0 2 dc1 <all>
dac0d326a3c2 172.18.0.4:8301 alive server 1.3.0 2 dc1 <all>
efd58b702d4c 172.18.0.5:8301 alive server 1.3.0 2 dc1 <all>
30303321aefc 172.18.0.3:8301 alive client 1.3.0 2 dc1 <default>
a91e25b36145 172.18.0.6:8301 alive client 1.3.0 2 dc1 <default>
b0f7559d3bea 172.18.0.2:8301 alive client 1.3.0 2 dc1 <default>
Then, I tried calling in all kinds of combinations:
consul exec -node {hash} ip a
consul exec 'ip a'
consul exec -shell 'ip a'
etc.
No errors, but no output either, always:
0 / 0 node(s) completed / acknowledged
I couldn't find any examples on the internet. The documentation is less than unhelpful.
Found this: https://groups.google.com/forum/#!topic/consul-tool/zE4G9ixWq60
Which basically says that consul exec is an un-feature...