Master restart how avoid server is SERVICE_UNAVAILABLE?

2.1.1 version. i modify config, need restart master node, when i restart primary master, the data node has many SERVICE_UNAVAILABLE/2/no master error log. and need time out to elect new primary master, this mean es cluster is that time is not available.

how avoid this status, is es provide step_down() command like mongo?

No, there is no such API.