weixin_39710288 2020-11-30 12:14
浏览 1

tasks sort order changing, causing unnecessary restarts

We've been running bamboo 0.2.12 against marathon 0.7.5 happily for months, but today our haproxies have been reloading every minute or so - although the state of marathon is not changing.

Did some investigation (diffing haproxy.cfg, marathon and bamboo state URLs) it seems the order of tasks returned by http://our-marathon:8080/v2/tasks is changing - for reasons I can't understand.

This causes the generated haproxy.cfg to differ enough for bamboo to reload configuration.

our haproxy template is here: https://gist.github.com/rasputnik/3c4a846b5aedcef6ea02

Is there any way for me to sort the tasks (in the ' {{ range $page, $task := .Tasks }}' block) using bamboos templating?

Or am I going to have to patch our bamboo to ensure these tasks remain in order?

该提问来源于开源项目:QubitProducts/bamboo

  • 写回答

5条回答 默认 最新

  • weixin_39710288 2020-11-30 12:14
    关注

    Odd, it looks like we already sort the taskList we get from marathon here:

    https://github.com/QubitProducts/bamboo/blob/v0.2.12/services/marathon/marathon.go#L140

    but for some reason it gets jumbled up again by the time it's merged into the main bamboo state.

    Can anyone give me a clue what's going on here?

    评论

报告相同问题?