use of org.ovirt.engine.core.common.action.gluster.GlusterVolumeGeoRepSessionConfigParameters in project ovirt-engine by oVirt.
the class GlusterStorageGeoRepSyncInternalCommand method executeCommand.
@Override
protected void executeCommand() {
if (getSession().getStatus() != GeoRepSessionStatus.ACTIVE) {
// Start geo-replication
Future<ActionReturnValue> geoRepCmd = commandCoordinatorUtil.executeAsyncCommand(ActionType.StartGlusterVolumeGeoRep, new GlusterVolumeGeoRepSessionParameters(getSession().getMasterVolumeId(), getSession().getId()), cloneContext());
ActionReturnValue result;
try {
result = geoRepCmd.get();
if (!result.getSucceeded()) {
propagateFailure(result);
return;
}
} catch (InterruptedException | ExecutionException e) {
log.error("Exception", e);
return;
}
}
// checkpoint the replication session
GlusterVolumeGeoRepSessionConfigParameters configParams = new GlusterVolumeGeoRepSessionConfigParameters(getSession().getMasterVolumeId(), getSession().getId(), GlusterConstants.GEOREP_CHECKPOINT_OPTION, GlusterConstants.GEOREP_CHECKPOINT_VALUE);
ActionReturnValue result = runInternalAction(ActionType.SetGeoRepConfig, configParams);
if (!result.getSucceeded()) {
propagateFailure(result);
return;
}
setSucceeded(true);
}
Aggregations