CiscoCloud / marathon-consul

bridge Marathon information to Consul KV
Apache License 2.0
85 stars 18 forks source link

Another resync oddity #9

Open hellertime opened 9 years ago

hellertime commented 9 years ago

So I was testing out the new code and noticed something interesting.

To test, I cleared the consul kv tree of marathon data. Then restarted marathon-consul, the kv tree got repopulated, except there were no 'taskStatus' values, as these only are provided by marathon on Status Update events.

Unfortunately I had been using the taskStatus to determine if I would add a record to my service config or not, and since the taskStatus field was empty, nothing was added (well it was, but commented out).

So it appears that resync works, the apps were repopulated in consul, but the taskStatus will not change until restarting the app.

BrianHicks commented 9 years ago

Thanks for reporting. We're gonna have to do something creative here, as the task struct fetched through the API is a different shape than the task struct received from the event stream.

scalp42 commented 8 years ago

@hellertime are you using consul-template ? If yes, do you mind sharing an example ?