Merge branch 'V5.0' of https://github.com/goodrain/rainbond into V5.0

This commit is contained in:
GLYASAI 2018-12-24 12:22:18 +08:00
commit e0342e73ad
4 changed files with 5 additions and 2 deletions

View File

@ -133,6 +133,7 @@ function _M.balance()
if not ok then
ngx.log(ngx.ERR, string.format("error while setting current upstream peer %s: %s", peer, err))
end
ngx.log(ngx.INFO, string.format("successfully set current upstream peer %s: %s", peer, err))
end
return _M

View File

@ -48,8 +48,8 @@ end
function _M.call()
if ngx.var.request_method ~= "POST" and ngx.var.request_method ~= "GET" then
ngx.log(ngx.ERR, "Only POST and GET requests are allowed!")
ngx.status = ngx.HTTP_BAD_REQUEST
ngx.print("Only POST and GET requests are allowed!")
return
end
@ -79,6 +79,7 @@ function _M.call()
return
end
ngx.log(ngx.INFO, "successfully read or update backend data ")
ngx.status = ngx.HTTP_CREATED
end

View File

@ -101,6 +101,7 @@ http {
server 0.0.0.1; # placeholder
balancer_by_lua_block {
ngx.log(ngx.INFO, string.format("start balancer"))
balancer.balance()
}
}

View File

@ -131,7 +131,7 @@ func (n *NodeService) AsynchronousInstall(node *client.HostNode) {
}
// start add node script
logrus.Info("Begin add node, please don't exit")
line := fmt.Sprintf("cd /opt/rainbond/install/scripts; ./%s.sh %s %s %s %s %s %s", node.Role[0], node.HostName,
line := fmt.Sprintf("cd /opt/rainbond/rainbond-ansible/scripts; ./%s.sh %s %s %s %s %s %s", node.Role[0], node.HostName,
node.InternalIP, linkModel, node.RootPass, node.KeyPath, node.ID)
fileName := node.HostName + ".log"