Open neighbour-oldhuang opened 6 years ago
down, backup这两个参数跟其他参数不一样,不需要赋值。
down, backup这两个参数跟其他参数不一样,不需要赋值。
不给值的话 ,upsync会提示 upsync_parse_json: parse '{"weight": 1, "max_fails": 3, "fail_timeout":10, "down":0, "backup"}' failed
backup 或者"backup" 都不行, "down":1 这个是没问题的
I this below in the source:
//if (server->backup) {
// continue;
//}
//
// FIXME: until backup is fully implemented this causes crashes
// on startup with nodes set backup=1. Let them in for now
It looks like "backup" is not supported yet. @xiaokai-wang do you know the history about this?
I actually do, I commented those lines out :). The main nginx code has/had some code to handle them but it was not implemented in upsync properly and it kept crashing the nginx. The easiest and quickest fix was to comment it out until a proper implementation happens.
Are there any plans on implementing backup properly/fully?
consul配置了127.0.0.1:83的参数:
{"backup":1,"weight":2, "max_fails":2, "fail_timeout":10}
状态显示:
backup没生效