provision/docker: Refactoring how to choose nodes in scheduler