mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-11-30 02:38:17 +08:00
Merge branch 'V5.0' of https://github.com/goodrain/rainbond into V5.0
This commit is contained in:
commit
e0342e73ad
@ -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
|
@ -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
|
||||
|
||||
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user