1
0
Fork 0

fix cluster upgrade

This commit is contained in:
Jan Steemann 2015-12-07 11:57:13 +01:00
parent fd18efa94e
commit 9dd164eadc
2 changed files with 13 additions and 0 deletions

View File

@ -143,6 +143,13 @@ bool ApplicationCluster::prepare () {
ServerState::instance()->setDisableDispatcherFrontend(_disableDispatcherFrontend);
ServerState::instance()->setDisableDispatcherKickstarter(_disableDispatcherKickstarter);
if (_disabled) {
// if ApplicationFeature is disabled
_enableCluster = false;
ServerState::instance()->setRole(ServerState::ROLE_SINGLE);
return true;
}
// check the cluster state
_enableCluster = ! _agencyEndpoints.empty();

View File

@ -838,6 +838,9 @@ int ArangoServer::startupServer () {
checkVersion = true;
// --check-version disables all replication appliers
_disableReplicationApplier = true;
if (_applicationCluster != nullptr) {
_applicationCluster->disable();
}
}
// run upgrade script
@ -847,6 +850,9 @@ int ArangoServer::startupServer () {
performUpgrade = true;
// --upgrade disables all replication appliers
_disableReplicationApplier = true;
if (_applicationCluster != nullptr) {
_applicationCluster->disable();
}
}
// skip an upgrade even if VERSION is missing