mirror of https://gitee.com/bigwinds/arangodb
Merge branch 'sharding' of https://github.com/triAGENS/ArangoDB into sharding
This commit is contained in:
commit
c5eb7376e8
|
@ -338,7 +338,6 @@ actions.defineHttp({
|
|||
return;
|
||||
}
|
||||
var input;
|
||||
print(req.requestBody);
|
||||
try {
|
||||
input = JSON.parse(req.requestBody);
|
||||
}
|
||||
|
@ -347,7 +346,6 @@ actions.defineHttp({
|
|||
"Posted body was not valid JSON.");
|
||||
return;
|
||||
}
|
||||
print(input);
|
||||
if (!input.hasOwnProperty("clusterPlan")) {
|
||||
actions.resultError(req, res, actions.HTTP_BAD,
|
||||
'Posted body needs a "clusterPlan" property.');
|
||||
|
@ -394,10 +392,8 @@ actions.defineHttp({
|
|||
}
|
||||
Kickstarter = require("org/arangodb/cluster/kickstarter").Kickstarter;
|
||||
try {
|
||||
print("hallo");
|
||||
k = new Kickstarter(input.clusterPlan, input.myname);
|
||||
k.runInfo = input.runInfo;
|
||||
print(input.runInfo);
|
||||
r = k.shutdown();
|
||||
res.responseCode = actions.HTTP_OK;
|
||||
res.contentType = "application/json; charset=utf-8";
|
||||
|
|
|
@ -96,11 +96,9 @@ function sendToAgency (agencyURL, path, obj) {
|
|||
var count = 0;
|
||||
while (count++ <= 2) {
|
||||
body = "value="+encodeURIComponent(obj);
|
||||
//print("sending:",agencyURL+path,"\nwith body",body);
|
||||
res = download(agencyURL+path,body,
|
||||
{"method":"PUT", "followRedirects": true,
|
||||
"headers": { "Content-Type": "application/x-www-form-urlencoded"}});
|
||||
//print("Code ", res.code);
|
||||
if (res.code === 201) {
|
||||
return true;
|
||||
}
|
||||
|
@ -178,6 +176,8 @@ launchActions.startAgent = function (dispatchers, cmd, isRelaunch) {
|
|||
launchActions.sendConfiguration = function (dispatchers, cmd, isRelaunch) {
|
||||
if (isRelaunch) {
|
||||
// nothing to do here
|
||||
print("Waiting 10 seconds for agency to come alive...");
|
||||
wait(10);
|
||||
return {"error":false, "isSendConfiguration": true};
|
||||
}
|
||||
var url = "http://"+getAddrPort(cmd.agency.endpoints[0])+"/v2/keys";
|
||||
|
@ -203,7 +203,6 @@ launchActions.startServers = function (dispatchers, cmd, isRelaunch) {
|
|||
|
||||
print("Starting servers...");
|
||||
var i;
|
||||
print(info);
|
||||
var servers = info.DBservers.concat(info.Coordinators);
|
||||
pids = [];
|
||||
for (i = 0; i < servers.length; i++) {
|
||||
|
|
Loading…
Reference in New Issue