use of org.ovirt.engine.core.common.action.GlusterStorageSyncCommandParameters in project ovirt-engine by oVirt.
the class GlusterStorageDomainDRSyncJob method syncData.
@OnTimerMethodAnnotation("syncData")
public void syncData(String storageDomainId, String geoRepSessionId) {
try {
// Get storage domain and georep session
StorageDomain storageDomain = storageDomainDao.get(new Guid(storageDomainId));
if (storageDomain == null) {
log.error("No storage domain found for id '{}'", storageDomainId);
return;
}
GlusterGeoRepSession session = geoRepDao.getById(new Guid(geoRepSessionId));
if (session == null) {
log.error("No geo-replication session found for id '{}'", geoRepSessionId);
return;
}
backend.runInternalAction(ActionType.GlusterStorageSync, new GlusterStorageSyncCommandParameters(storageDomain.getId(), session.getId()), ExecutionHandler.createInternalJobContext());
} catch (Exception e) {
log.error("Error running dr sync", e);
}
}
Aggregations