Search in sources :

Example 6 with InfrastructureManager

use of org.ow2.proactive.resourcemanager.nodesource.infrastructure.InfrastructureManager in project scheduling by ow2-proactive.

the class NodesRecoveryManager method recoverFullyDeployedInfrastructureOrReset.

protected boolean recoverFullyDeployedInfrastructureOrReset(String nodeSourceName, NodeSource nodeSourceToDeploy, NodeSourceDescriptor descriptor) {
    boolean recoverNodes = false;
    boolean existPersistedNodes = this.existPersistedNodes(nodeSourceName);
    if (existPersistedNodes) {
        InfrastructureManager im = InfrastructureManagerFactory.recover(descriptor);
        if (!im.getDeployingAndLostNodes().isEmpty()) {
            // if there are deploying nodes, we will not recover
            this.rmCore.getDbManager().removeAllNodesFromNodeSource(nodeSourceName);
        } else {
            recoverNodes = true;
            nodeSourceToDeploy.setInfrastructureManager(im);
        }
    }
    return recoverNodes;
}
Also used : InfrastructureManager(org.ow2.proactive.resourcemanager.nodesource.infrastructure.InfrastructureManager)

Aggregations

InfrastructureManager (org.ow2.proactive.resourcemanager.nodesource.infrastructure.InfrastructureManager)3 NodeSourcePolicy (org.ow2.proactive.resourcemanager.nodesource.policy.NodeSourcePolicy)2 Before (org.junit.Before)1 Test (org.junit.Test)1 Node (org.objectweb.proactive.core.node.Node)1 Client (org.ow2.proactive.resourcemanager.authentication.Client)1 RMNodeEvent (org.ow2.proactive.resourcemanager.common.event.RMNodeEvent)1 RMCore (org.ow2.proactive.resourcemanager.core.RMCore)1 NodeSourceData (org.ow2.proactive.resourcemanager.db.NodeSourceData)1 RMException (org.ow2.proactive.resourcemanager.exception.RMException)1 RMMonitoringImpl (org.ow2.proactive.resourcemanager.frontend.RMMonitoringImpl)1 HostsPinger (org.ow2.proactive.resourcemanager.frontend.topology.pinging.HostsPinger)1 NodeSource (org.ow2.proactive.resourcemanager.nodesource.NodeSource)1 DefaultInfrastructureManager (org.ow2.proactive.resourcemanager.nodesource.infrastructure.DefaultInfrastructureManager)1 RMDeployingNode (org.ow2.proactive.resourcemanager.rmnode.RMDeployingNode)1 RMNode (org.ow2.proactive.resourcemanager.rmnode.RMNode)1 TopologyManager (org.ow2.proactive.resourcemanager.selection.topology.TopologyManager)1