rewrite part of NewNode to handle all kinds of err
rewrite part of NewNode to handle all kinds of err

Signed-off-by: allencloud <36603fc76d0c5a59db517817381acc1be27b9499@daocloud.io>

deljuven/swarmkit,fate-grand-order/swarmkit,vasil-yordanov/swarmkit,AliyunContainerService/swarmkit,yongtang/swarmkit,sungwonh/swarmkit,allencloud/swarmkit,Noyan759/swarmkit,docker/swarmkit,AliyunContainerService/swarmkit,cezarsa/swarmkit,diogomonica/swarmkit,cheyang/swarmkit,elifa/swarmkit,alyyousuf7/swarmkit,Noyan759/swarmkit,RenaudWasTaken/swarmkit,vasil-yordanov/swarmkit,cheyang/swarmkit,RenaudWasTaken/swarmkit,dperny/swarmkit-1,jlhawn/swarmkit,fate-grand-order/swarmkit,alyyousuf7/swarmkit,deljuven/swarmkit,aaronlehmann/swarmkit,dperny/swarmkit-1,cezarsa/swarmkit,jlhawn/swarmkit,sungwonh/swarmkit,aaronlehmann/swarmkit,docker/swarmkit,diogomonica/swarmkit,allencloud/swarmkit,elifa/swarmkit,yongtang/swarmkit