File tree Expand file tree Collapse file tree
SingularityService/src/main/java/com/hubspot/singularity/mesos Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -800,18 +800,7 @@ public void checkDecommissionedAgentsFromMaster(
800800
801801 for (MesosMasterAgentObject agentJsonObject : state .getAgents ()) {
802802 String agentId = agentJsonObject .getId ();
803- if (agentsById .containsKey (agentId )) {
804- SingularityAgent agent = agentsById .get (agentId );
805- if (agent != null ) {
806- LOG .info (
807- "Found resources ({}) for decommissioned agent {}" ,
808- agentJsonObject .getResources (),
809- agent
810- );
811- agentManager .saveObject (agent .withResources (agentJsonObject .getResources ()));
812- }
813- agentsById .remove (agentId );
814- }
803+ agentsById .remove (agentId );
815804 }
816805
817806 for (SingularityAgent leftOverAgent : agentsById .values ()) {
Original file line number Diff line number Diff line change @@ -108,8 +108,8 @@ public void startup(MasterInfo masterInfo) {
108108
109109 MesosMasterStateObject state = mesosClient .getMasterState (uri );
110110
111- agentAndRackManager .loadAgentsAndRacksFromMaster (state , true );
112111 agentAndRackManager .checkDecommissionedAgentsFromMaster (state , true );
112+ agentAndRackManager .loadAgentsAndRacksFromMaster (state , true );
113113
114114 ExecutorService startupExecutor = Executors .newFixedThreadPool (
115115 configuration .getSchedulerStartupConcurrency (),
You can’t perform that action at this time.
0 commit comments