cuboid 0.0.5 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -0
- data/README.md +13 -13
- data/cuboid.gemspec +1 -5
- data/lib/cuboid/application.rb +10 -10
- data/lib/cuboid/option_groups/{dispatcher.rb → agent.rb} +10 -10
- data/lib/cuboid/option_groups/paths.rb +1 -1
- data/lib/cuboid/options.rb +1 -1
- data/lib/cuboid/processes/{dispatchers.rb → agents.rb} +25 -25
- data/lib/cuboid/processes/executables/agent.rb +5 -0
- data/lib/cuboid/processes/helpers/agents.rb +23 -0
- data/lib/cuboid/processes/helpers/instances.rb +4 -4
- data/lib/cuboid/processes/helpers.rb +1 -1
- data/lib/cuboid/processes/instances.rb +9 -9
- data/lib/cuboid/processes/schedulers.rb +2 -2
- data/lib/cuboid/processes.rb +2 -2
- data/lib/cuboid/report.rb +1 -0
- data/lib/cuboid/rest/server/instance_helpers.rb +13 -13
- data/lib/cuboid/rest/server/routes/dispatcher.rb +11 -11
- data/lib/cuboid/rest/server/routes/grid.rb +8 -8
- data/lib/cuboid/rest/server/routes/instances.rb +1 -1
- data/lib/cuboid/rest/server.rb +5 -5
- data/lib/cuboid/rpc/client/{dispatcher.rb → agent.rb} +4 -4
- data/lib/cuboid/rpc/client/instance.rb +2 -2
- data/lib/cuboid/rpc/client.rb +1 -1
- data/lib/cuboid/rpc/server/agent/node.rb +247 -0
- data/lib/cuboid/rpc/server/{dispatcher → agent}/service.rb +13 -13
- data/lib/cuboid/rpc/server/{dispatcher.rb → agent.rb} +45 -38
- data/lib/cuboid/rpc/server/application_wrapper.rb +2 -1
- data/lib/cuboid/rpc/server/instance.rb +4 -4
- data/lib/cuboid/rpc/server/scheduler.rb +12 -12
- data/lib/cuboid.rb +0 -3
- data/lib/version +1 -1
- data/spec/cuboid/option_groups/dispatcher_spec.rb +2 -2
- data/spec/cuboid/rest/server_spec.rb +46 -46
- data/spec/cuboid/rpc/client/dispatcher_spec.rb +2 -2
- data/spec/cuboid/rpc/server/agent/node_spec.rb +222 -0
- data/spec/cuboid/rpc/server/{dispatcher → agent}/service_spec.rb +16 -16
- data/spec/cuboid/rpc/server/{dispatcher_spec.rb → agent_spec.rb} +103 -95
- data/spec/cuboid/rpc/server/scheduler_spec.rb +8 -8
- data/spec/support/fixtures/executables/node.rb +3 -3
- data/spec/support/fixtures/mock_app/test_service.rb +8 -8
- data/spec/support/fixtures/mock_app.rb +1 -1
- data/spec/support/fixtures/services/echo.rb +6 -6
- data/spec/support/helpers/resets.rb +1 -1
- data/spec/support/lib/web_server_client.rb +2 -2
- data/spec/support/lib/web_server_dispatcher.rb +1 -1
- data/spec/support/logs/Agent - 1797289-46860.log +6 -0
- data/spec/support/logs/Agent - 1797295-27499.log +11 -0
- data/spec/support/logs/Agent - 1797297-3144.log +11 -0
- data/spec/support/logs/Agent - 1797379-31898.log +6 -0
- data/spec/support/logs/Agent - 1797386-37553.log +11 -0
- data/spec/support/logs/Agent - 1797390-46182.log +11 -0
- data/spec/support/logs/Agent - 1797487-7120.log +11 -0
- data/spec/support/logs/Agent - 1797492-19266.log +11 -0
- data/spec/support/logs/Agent - 1797535-15905.log +6 -0
- data/spec/support/logs/Agent - 1797540-32892.log +16 -0
- data/spec/support/logs/Agent - 1797542-59822.log +14 -0
- data/spec/support/logs/Agent - 1797547-57893.log +10 -0
- data/spec/support/logs/Agent - 1797558-26026.log +11 -0
- data/spec/support/logs/Agent - 1797560-6022.log +11 -0
- data/spec/support/logs/Agent - 1797592-36797.log +6 -0
- data/spec/support/logs/Agent - 1797598-8455.log +16 -0
- data/spec/support/logs/Agent - 1797600-56813.log +14 -0
- data/spec/support/logs/Agent - 1797604-47328.log +10 -0
- data/spec/support/logs/Agent - 1797611-25674.log +16 -0
- data/spec/support/logs/Agent - 1797613-63564.log +14 -0
- data/spec/support/logs/Agent - 1797622-56082.log +10 -0
- data/spec/support/logs/Agent - 1797632-63113.log +16 -0
- data/spec/support/logs/Agent - 1797640-55358.log +14 -0
- data/spec/support/logs/Agent - 1797644-19227.log +10 -0
- data/spec/support/logs/Agent - 1797649-4273.log +16 -0
- data/spec/support/logs/Agent - 1797651-45800.log +14 -0
- data/spec/support/logs/Agent - 1797655-44436.log +10 -0
- data/spec/support/logs/Agent - 1797663-8070.log +16 -0
- data/spec/support/logs/Agent - 1797667-56769.log +14 -0
- data/spec/support/logs/Agent - 1797671-53005.log +10 -0
- data/spec/support/logs/Agent - 1797678-6376.log +6 -0
- data/spec/support/logs/Agent - 1797680-53067.log +6 -0
- data/spec/support/logs/Agent - 1797684-1440.log +6 -0
- data/spec/support/logs/Agent - 1797688-2251.log +6 -0
- data/spec/support/logs/Agent - 1797698-41295.log +6 -0
- data/spec/support/logs/Agent - 1797702-50250.log +6 -0
- data/spec/support/logs/Agent - 1797707-29900.log +6 -0
- data/spec/support/logs/Agent - 1797718-49346.log +6 -0
- data/spec/support/logs/Agent - 1797726-15376.log +6 -0
- data/spec/support/logs/Agent - 1797745-40056.log +6 -0
- data/spec/support/logs/Agent - 1797804-62957.log +17 -0
- data/spec/support/logs/Agent - 1797821-21500.log +15 -0
- data/spec/support/logs/Agent - 1797832-1983.log +11 -0
- data/spec/support/logs/Agent - 1797939-12833.log +17 -0
- data/spec/support/logs/Agent - 1797952-60103.log +15 -0
- data/spec/support/logs/Agent - 1797960-13475.log +11 -0
- data/spec/support/logs/Agent - 1798019-61496.log +17 -0
- data/spec/support/logs/Agent - 1798033-46806.log +15 -0
- data/spec/support/logs/Agent - 1798041-8155.log +11 -0
- data/spec/support/logs/Agent - 1798099-42581.log +17 -0
- data/spec/support/logs/Agent - 1798113-6252.log +15 -0
- data/spec/support/logs/Agent - 1798121-58237.log +11 -0
- data/spec/support/logs/Agent - 1798182-15586.log +16 -0
- data/spec/support/logs/Agent - 1798197-41430.log +14 -0
- data/spec/support/logs/Agent - 1798205-23172.log +10 -0
- data/spec/support/logs/Agent - 1798248-46908.log +6 -0
- data/spec/support/logs/Agent - 1798253-25994.log +16 -0
- data/spec/support/logs/Agent - 1798255-19341.log +14 -0
- data/spec/support/logs/Agent - 1798261-4788.log +10 -0
- data/spec/support/logs/Agent - 1798270-2955.log +16 -0
- data/spec/support/logs/Agent - 1798277-35029.log +14 -0
- data/spec/support/logs/Agent - 1798283-51766.log +10 -0
- data/spec/support/logs/Agent - 1798294-27029.log +16 -0
- data/spec/support/logs/Agent - 1798296-19420.log +14 -0
- data/spec/support/logs/Agent - 1798301-49988.log +10 -0
- data/spec/support/logs/Agent - 1798306-62835.log +16 -0
- data/spec/support/logs/Agent - 1798308-5619.log +14 -0
- data/spec/support/logs/Agent - 1798317-13936.log +10 -0
- data/spec/support/logs/Agent - 1798325-24989.log +16 -0
- data/spec/support/logs/Agent - 1798329-59694.log +14 -0
- data/spec/support/logs/Agent - 1798333-7693.log +10 -0
- data/spec/support/logs/Agent - 1798339-9797.log +6 -0
- data/spec/support/logs/Agent - 1798341-47566.log +6 -0
- data/spec/support/logs/Agent - 1798345-57649.log +6 -0
- data/spec/support/logs/Agent - 1798349-1601.log +6 -0
- data/spec/support/logs/Agent - 1798365-33727.log +6 -0
- data/spec/support/logs/Agent - 1798369-47048.log +6 -0
- data/spec/support/logs/Agent - 1798373-39436.log +6 -0
- data/spec/support/logs/Agent - 1798380-22295.log +6 -0
- data/spec/support/logs/Agent - 1798384-54448.log +6 -0
- data/spec/support/logs/Agent - 1798401-25598.log +6 -0
- data/spec/support/logs/Agent - 1798464-60577.log +16 -0
- data/spec/support/logs/Agent - 1798476-32013.log +14 -0
- data/spec/support/logs/Agent - 1798488-17640.log +10 -0
- data/spec/support/logs/Agent - 1798516-32546.log +16 -0
- data/spec/support/logs/Agent - 1798526-32438.log +14 -0
- data/spec/support/logs/Agent - 1798533-62298.log +10 -0
- data/spec/support/logs/Agent - 1798543-21098.log +16 -0
- data/spec/support/logs/Agent - 1798555-25891.log +14 -0
- data/spec/support/logs/Agent - 1798562-34080.log +10 -0
- data/spec/support/logs/Agent - 1798606-52034.log +10 -0
- data/spec/support/logs/Agent - 1798608-43174.log +10 -0
- data/spec/support/logs/Agent - 1798610-14773.log +16 -0
- data/spec/support/logs/Agent - 1798614-18350.log +14 -0
- data/spec/support/logs/Agent - 1798621-4674.log +10 -0
- data/spec/support/logs/Agent - 1798645-52114.log +6 -0
- data/spec/support/logs/Agent - 1798650-42695.log +6 -0
- data/spec/support/logs/Agent - 1798661-51655.log +7 -0
- data/spec/support/logs/Agent - 1798680-43699.log +6 -0
- data/spec/support/logs/Agent - 1798687-63896.log +16 -0
- data/spec/support/logs/Agent - 1798691-57598.log +14 -0
- data/spec/support/logs/Agent - 1798701-14752.log +10 -0
- data/spec/support/logs/Agent - 1798708-25763.log +16 -0
- data/spec/support/logs/Agent - 1798710-32797.log +14 -0
- data/spec/support/logs/Agent - 1798714-28009.log +10 -0
- data/spec/support/logs/Agent - 1798724-41047.log +16 -0
- data/spec/support/logs/Agent - 1798726-55249.log +14 -0
- data/spec/support/logs/Agent - 1798735-6516.log +10 -0
- data/spec/support/logs/Agent - 1798743-54492.log +16 -0
- data/spec/support/logs/Agent - 1798745-3549.log +14 -0
- data/spec/support/logs/Agent - 1798749-63028.log +10 -0
- data/spec/support/logs/Agent - 1798759-46764.log +16 -0
- data/spec/support/logs/Agent - 1798763-20439.log +14 -0
- data/spec/support/logs/Agent - 1798767-24602.log +10 -0
- data/spec/support/logs/Agent - 1798773-21120.log +6 -0
- data/spec/support/logs/Agent - 1798775-30653.log +7 -0
- data/spec/support/logs/Agent - 1798794-13970.log +6 -0
- data/spec/support/logs/Agent - 1798799-61184.log +16 -0
- data/spec/support/logs/Agent - 1798801-17972.log +14 -0
- data/spec/support/logs/Agent - 1798805-20634.log +10 -0
- data/spec/support/logs/Agent - 1798812-2372.log +16 -0
- data/spec/support/logs/Agent - 1798814-56878.log +14 -0
- data/spec/support/logs/Agent - 1798824-62001.log +10 -0
- data/spec/support/logs/Agent - 1798835-39880.log +16 -0
- data/spec/support/logs/Agent - 1798837-61826.log +14 -0
- data/spec/support/logs/Agent - 1798841-16507.log +10 -0
- data/spec/support/logs/Agent - 1798846-48234.log +16 -0
- data/spec/support/logs/Agent - 1798848-5064.log +14 -0
- data/spec/support/logs/Agent - 1798853-31760.log +10 -0
- data/spec/support/logs/Agent - 1798866-50670.log +16 -0
- data/spec/support/logs/Agent - 1798870-45487.log +14 -0
- data/spec/support/logs/Agent - 1798874-52084.log +10 -0
- data/spec/support/logs/Agent - 1798880-36517.log +6 -0
- data/spec/support/logs/Agent - 1798882-40177.log +6 -0
- data/spec/support/logs/Agent - 1798886-7030.log +6 -0
- data/spec/support/logs/Agent - 1798895-7798.log +6 -0
- data/spec/support/logs/Agent - 1798906-43816.log +6 -0
- data/spec/support/logs/Agent - 1798910-18160.log +6 -0
- data/spec/support/logs/Agent - 1798916-29506.log +6 -0
- data/spec/support/logs/Agent - 1798920-21682.log +6 -0
- data/spec/support/logs/Agent - 1798926-45303.log +6 -0
- data/spec/support/logs/Agent - 1798950-17451.log +6 -0
- data/spec/support/logs/Agent - 1799005-32280.log +16 -0
- data/spec/support/logs/Agent - 1799017-9877.log +14 -0
- data/spec/support/logs/Agent - 1799024-65347.log +10 -0
- data/spec/support/logs/Agent - 1799051-25939.log +16 -0
- data/spec/support/logs/Agent - 1799061-59062.log +14 -0
- data/spec/support/logs/Agent - 1799074-49397.log +10 -0
- data/spec/support/logs/Agent - 1799083-27497.log +16 -0
- data/spec/support/logs/Agent - 1799096-40902.log +14 -0
- data/spec/support/logs/Agent - 1799103-20369.log +10 -0
- data/spec/support/logs/Agent - 1799135-60557.log +10 -0
- data/spec/support/logs/Agent - 1799137-3725.log +10 -0
- data/spec/support/logs/Agent - 1799144-38486.log +16 -0
- data/spec/support/logs/Agent - 1799150-30915.log +14 -0
- data/spec/support/logs/Agent - 1799154-18474.log +10 -0
- data/spec/support/logs/Agent - 1799170-26867.log +6 -0
- data/spec/support/logs/Agent - 1799174-16635.log +6 -0
- data/spec/support/logs/Agent - 1799184-8862.log +6 -0
- data/spec/support/logs/Agent - 1799197-45365.log +6 -0
- data/spec/support/logs/Agent - 1799214-21005.log +6 -0
- data/spec/support/logs/Agent - 1799225-8303.log +6 -0
- data/spec/support/logs/Agent - 1799229-20233.log +6 -0
- data/spec/support/logs/Agent - 1799234-31440.log +6 -0
- data/spec/support/logs/Agent - 2486896-44236.log +6 -0
- data/spec/support/logs/Agent - 2487229-16390.log +6 -0
- data/spec/support/logs/Agent - 2487520-2511.log +6 -0
- data/spec/support/logs/Agent - 2487522-24008.log +6 -0
- data/spec/support/logs/Agent - 2487526-3383.log +6 -0
- data/spec/support/logs/Agent - 2487528-23713.log +10 -0
- data/spec/support/logs/Agent - 2487530-42875.log +10 -0
- data/spec/support/logs/Agent - 2487533-14182.log +10 -0
- data/spec/support/logs/Agent - 2487535-32486.log +10 -0
- data/spec/support/logs/Agent - 2487537-30578.log +10 -0
- data/spec/support/logs/Agent - 2487539-65402.log +10 -0
- data/spec/support/logs/Agent - 2493974-23066.log +6 -0
- data/spec/support/logs/Agent - 2501716-11729.log +6 -0
- data/spec/support/logs/Agent - 2501724-48638.log +6 -0
- data/spec/support/logs/Agent - 2501961-60077.log +6 -0
- data/spec/support/logs/Agent - 2501976-10941.log +10 -0
- data/spec/support/logs/Agent - 2502050-45312.log +10 -0
- data/spec/support/logs/Agent - 2502131-45940.log +10 -0
- data/spec/support/logs/Agent - 2502139-59848.log +10 -0
- data/spec/support/logs/Agent - 2502262-46629.log +10 -0
- data/spec/support/logs/Agent - 2502298-28395.log +10 -0
- data/spec/support/logs/Agent - 2512541-7108.log +6 -0
- data/spec/support/logs/Agent - 2515458-5532.log +6 -0
- data/spec/support/logs/Agent - 2515540-20379.log +6 -0
- data/spec/support/logs/Agent - 2515550-19661.log +6 -0
- data/spec/support/logs/Agent - 2515626-34192.log +6 -0
- data/spec/support/logs/Agent - 2515879-19884.log +6 -0
- data/spec/support/logs/Agent - 2516130-27514.log +6 -0
- data/spec/support/logs/Agent - 2516382-45886.log +6 -0
- data/spec/support/logs/Agent - 2516390-47909.log +6 -0
- data/spec/support/logs/Agent - 2516465-47774.log +6 -0
- data/spec/support/logs/Agent - 2516546-13955.log +6 -0
- data/spec/support/logs/Agent - 2516561-39041.log +6 -0
- data/spec/support/logs/Agent - 2516710-46722.log +6 -0
- data/spec/support/logs/Agent - 2516795-56481.log +16 -0
- data/spec/support/logs/Agent - 2516798-22121.log +14 -0
- data/spec/support/logs/Agent - 2516881-21755.log +10 -0
- data/spec/support/logs/Agent - 2517053-64944.log +16 -0
- data/spec/support/logs/Agent - 2517056-63364.log +14 -0
- data/spec/support/logs/Agent - 2517066-34797.log +10 -0
- data/spec/support/logs/Agent - 2518042-30794.log +16 -0
- data/spec/support/logs/Agent - 2518050-6895.log +14 -0
- data/spec/support/logs/Agent - 2518212-36288.log +10 -0
- data/spec/support/logs/Agent - 2518395-10976.log +16 -0
- data/spec/support/logs/Agent - 2518472-35419.log +14 -0
- data/spec/support/logs/Agent - 2518559-43119.log +10 -0
- data/spec/support/logs/Agent - 2518647-48415.log +16 -0
- data/spec/support/logs/Agent - 2518652-65099.log +14 -0
- data/spec/support/logs/Agent - 2518658-1449.log +10 -0
- data/spec/support/logs/Agent - 2518910-62083.log +6 -0
- data/spec/support/logs/Agent - 2518919-58035.log +6 -0
- data/spec/support/logs/Agent - 2519076-57825.log +6 -0
- data/spec/support/logs/Agent - 2519156-8413.log +6 -0
- data/spec/support/logs/Agent - 2519406-64200.log +6 -0
- data/spec/support/logs/Agent - 2519570-20841.log +6 -0
- data/spec/support/logs/Agent - 2519659-30136.log +6 -0
- data/spec/support/logs/Agent - 2519822-9736.log +6 -0
- data/spec/support/logs/Agent - 2520004-59217.log +6 -0
- data/spec/support/logs/Agent - 2520357-37723.log +6 -0
- data/spec/support/logs/Agent - 2521294-5229.log +16 -0
- data/spec/support/logs/Agent - 2521407-31515.log +14 -0
- data/spec/support/logs/Agent - 2521415-7501.log +10 -0
- data/spec/support/logs/Agent - 2521452-22168.log +16 -0
- data/spec/support/logs/Agent - 2521463-24492.log +14 -0
- data/spec/support/logs/Agent - 2521482-50808.log +10 -0
- data/spec/support/logs/Agent - 2521503-8180.log +16 -0
- data/spec/support/logs/Agent - 2521562-3183.log +14 -0
- data/spec/support/logs/Agent - 2521639-45199.log +10 -0
- data/spec/support/logs/Agent - 2521891-30967.log +10 -0
- data/spec/support/logs/Agent - 2521897-64837.log +10 -0
- data/spec/support/logs/Agent - 2521916-23526.log +16 -0
- data/spec/support/logs/Agent - 2521936-26313.log +14 -0
- data/spec/support/logs/Agent - 2521948-18199.log +10 -0
- data/spec/support/logs/Agent - 2522026-18512.log +6 -0
- data/spec/support/logs/Agent - 2522093-46502.log +6 -0
- data/spec/support/logs/Agent - 2522195-30981.log +6 -0
- data/spec/support/logs/Agent - 2522295-55509.log +6 -0
- data/spec/support/logs/Agent - 2522347-32811.log +6 -0
- data/spec/support/logs/Agent - 2523391-7522.log +6 -0
- data/spec/support/logs/Agent - 2523626-61560.log +6 -0
- data/spec/support/logs/Agent - 2523913-25677.log +6 -0
- data/spec/support/logs/Agent - 2539887-21281.log +6 -0
- data/spec/support/logs/Agent - 2540261-61895.log +6 -0
- data/spec/support/logs/Agent - 2540430-8261.log +6 -0
- data/spec/support/logs/Agent - 361913-24577.log +6 -0
- data/spec/support/logs/Agent - 362152-33398.log +6 -0
- data/spec/support/logs/Agent - 362154-44243.log +6 -0
- data/spec/support/logs/Agent - 362157-6034.log +6 -0
- data/spec/support/logs/Agent - 362160-38548.log +10 -0
- data/spec/support/logs/Agent - 362162-59176.log +10 -0
- data/spec/support/logs/Agent - 362165-23738.log +10 -0
- data/spec/support/logs/Agent - 362167-57542.log +10 -0
- data/spec/support/logs/Agent - 362172-22798.log +10 -0
- data/spec/support/logs/Agent - 362174-46609.log +10 -0
- data/spec/support/logs/Agent - 362398-10913.log +6 -0
- data/spec/support/logs/Agent - 362524-29482.log +6 -0
- data/spec/support/logs/Agent - 362527-40674.log +6 -0
- data/spec/support/logs/Agent - 362530-32963.log +6 -0
- data/spec/support/logs/Agent - 362532-22236.log +6 -0
- data/spec/support/logs/Agent - 362543-4429.log +6 -0
- data/spec/support/logs/Agent - 362557-7510.log +6 -0
- data/spec/support/logs/Agent - 362574-36915.log +6 -0
- data/spec/support/logs/Agent - 362576-65372.log +6 -0
- data/spec/support/logs/Agent - 362578-29183.log +6 -0
- data/spec/support/logs/Agent - 362580-43546.log +6 -0
- data/spec/support/logs/Agent - 362582-22254.log +6 -0
- data/spec/support/logs/Agent - 362588-40009.log +6 -0
- data/spec/support/logs/Agent - 362591-60596.log +16 -0
- data/spec/support/logs/Agent - 362595-3584.log +14 -0
- data/spec/support/logs/Agent - 362599-39016.log +10 -0
- data/spec/support/logs/Agent - 362606-58506.log +16 -0
- data/spec/support/logs/Agent - 362609-55768.log +14 -0
- data/spec/support/logs/Agent - 362613-37168.log +10 -0
- data/spec/support/logs/Agent - 362629-16593.log +16 -0
- data/spec/support/logs/Agent - 362632-32264.log +14 -0
- data/spec/support/logs/Agent - 362643-59807.log +10 -0
- data/spec/support/logs/Agent - 362649-40552.log +16 -0
- data/spec/support/logs/Agent - 362655-31144.log +14 -0
- data/spec/support/logs/Agent - 362660-12968.log +10 -0
- data/spec/support/logs/Agent - 362666-6806.log +16 -0
- data/spec/support/logs/Agent - 362673-39178.log +14 -0
- data/spec/support/logs/Agent - 362678-36132.log +10 -0
- data/spec/support/logs/Agent - 362685-62240.log +6 -0
- data/spec/support/logs/Agent - 362687-4068.log +6 -0
- data/spec/support/logs/Agent - 362691-48465.log +6 -0
- data/spec/support/logs/Agent - 362693-40295.log +6 -0
- data/spec/support/logs/Agent - 362705-53855.log +6 -0
- data/spec/support/logs/Agent - 362712-14029.log +6 -0
- data/spec/support/logs/Agent - 362717-3069.log +6 -0
- data/spec/support/logs/Agent - 362721-38670.log +6 -0
- data/spec/support/logs/Agent - 362725-7644.log +6 -0
- data/spec/support/logs/Agent - 362748-18302.log +6 -0
- data/spec/support/logs/Agent - 362828-61766.log +16 -0
- data/spec/support/logs/Agent - 362838-44693.log +14 -0
- data/spec/support/logs/Agent - 362847-31875.log +10 -0
- data/spec/support/logs/Agent - 362875-46401.log +16 -0
- data/spec/support/logs/Agent - 362887-52041.log +14 -0
- data/spec/support/logs/Agent - 362897-7426.log +10 -0
- data/spec/support/logs/Agent - 362908-35228.log +16 -0
- data/spec/support/logs/Agent - 362919-33764.log +14 -0
- data/spec/support/logs/Agent - 362928-1323.log +10 -0
- data/spec/support/logs/Agent - 362960-27883.log +10 -0
- data/spec/support/logs/Agent - 362964-26072.log +10 -0
- data/spec/support/logs/Agent - 362966-42927.log +16 -0
- data/spec/support/logs/Agent - 362972-56025.log +14 -0
- data/spec/support/logs/Agent - 362977-39574.log +10 -0
- data/spec/support/logs/Agent - 362992-23510.log +6 -0
- data/spec/support/logs/Agent - 362996-63445.log +6 -0
- data/spec/support/logs/Agent - 363017-59359.log +6 -0
- data/spec/support/logs/Agent - 363034-15682.log +6 -0
- data/spec/support/logs/Agent - 363050-6605.log +6 -0
- data/spec/support/logs/Agent - 363065-59445.log +6 -0
- data/spec/support/logs/Agent - 363070-6619.log +6 -0
- data/spec/support/logs/Agent - 363077-18731.log +6 -0
- data/spec/support/logs/Agent - 363250-16962.log +6 -0
- data/spec/support/logs/Agent - 363265-25598.log +6 -0
- data/spec/support/logs/Agent - 363279-50603.log +6 -0
- data/spec/support/logs/{Instance - 1521363-26218.error.log → Instance - 2525557-35695.error.log } +18 -18
- data/spec/support/logs/{Instance - 1521353-26273.error.log → Instance - 2525638-6350.error.log } +18 -18
- data/spec/support/logs/{Instance - 1521355-56591.error.log → Instance - 2525719-30351.error.log } +18 -18
- data/spec/support/logs/Instance - 363119-21886.error.log +105 -0
- data/spec/support/logs/Instance - 363121-31774.error.log +105 -0
- data/spec/support/logs/Instance - 363127-52671.error.log +105 -0
- data/spec/support/logs/Scheduler - 2486608-59709.log +3 -0
- data/spec/support/logs/Scheduler - 2486612-44110.log +27 -0
- data/spec/support/logs/Scheduler - 2486723-50393.log +3 -0
- data/spec/support/logs/Scheduler - 2486727-21620.log +27 -0
- data/spec/support/logs/Scheduler - 2486877-37845.log +3 -0
- data/spec/support/logs/Scheduler - 2486881-3624.log +1 -0
- data/spec/support/logs/Scheduler - 2486911-24752.log +3 -0
- data/spec/support/logs/Scheduler - 2486919-48535.log +27 -0
- data/spec/support/logs/Scheduler - 2486985-8897.log +1 -0
- data/spec/support/logs/Scheduler - 2487211-7516.log +3 -0
- data/spec/support/logs/Scheduler - 2487215-2831.log +1 -0
- data/spec/support/logs/Scheduler - 2487246-7826.log +3 -0
- data/spec/support/logs/Scheduler - 2487256-35669.log +6 -0
- data/spec/support/logs/Scheduler - 2487272-11542.log +4 -0
- data/spec/support/logs/Scheduler - 2487278-9621.log +1 -0
- data/spec/support/logs/Scheduler - 2487291-24094.log +3 -0
- data/spec/support/logs/Scheduler - 2487299-60095.log +6 -0
- data/spec/support/logs/Scheduler - 2487368-7706.log +3 -0
- data/spec/support/logs/Scheduler - 2487378-9859.log +6 -0
- data/spec/support/logs/Scheduler - 2487396-17812.log +3 -0
- data/spec/support/logs/Scheduler - 2487407-25543.log +6 -0
- data/spec/support/logs/Scheduler - 2487451-44767.log +4 -0
- data/spec/support/logs/Scheduler - 2487506-1422.log +6 -0
- data/spec/support/logs/Scheduler - 2487541-38068.log +1 -0
- data/spec/support/logs/Scheduler - 2487544-21866.log +1 -0
- data/spec/support/logs/Scheduler - 2487548-15245.log +1 -0
- data/spec/support/logs/Scheduler - 2487551-34905.log +1 -0
- data/spec/support/logs/Scheduler - 2487554-22142.log +1 -0
- data/spec/support/logs/Scheduler - 2487562-35113.log +1 -0
- data/spec/support/logs/Scheduler - 2487565-55125.log +3 -0
- data/spec/support/logs/Scheduler - 2487569-48845.log +6 -0
- data/spec/support/logs/Scheduler - 2487576-57192.log +4 -0
- data/spec/support/logs/Scheduler - 2487583-17991.log +1 -0
- data/spec/support/logs/Scheduler - 2487586-30014.log +1 -0
- data/spec/support/logs/Scheduler - 2487591-6472.log +1 -0
- data/spec/support/logs/Scheduler - 2487594-2195.log +1 -0
- data/spec/support/logs/Scheduler - 2487598-55808.log +3 -0
- data/spec/support/logs/Scheduler - 2487605-7400.log +1 -0
- data/spec/support/logs/Scheduler - 2487607-4337.log +1 -0
- data/spec/support/logs/Scheduler - 2487610-25835.log +1 -0
- data/spec/support/logs/Scheduler - 2493623-45209.log +3 -0
- data/spec/support/logs/Scheduler - 2493714-59407.log +1 -0
- data/spec/support/logs/Scheduler - 2494470-61696.log +3 -0
- data/spec/support/logs/Scheduler - 2494723-2810.log +6 -0
- data/spec/support/logs/Scheduler - 2495458-22112.log +4 -0
- data/spec/support/logs/Scheduler - 2496034-4076.log +1 -0
- data/spec/support/logs/Scheduler - 2496119-62253.log +3 -0
- data/spec/support/logs/Scheduler - 2496210-50380.log +6 -0
- data/spec/support/logs/Scheduler - 2497536-24922.log +3 -0
- data/spec/support/logs/Scheduler - 2497786-13515.log +6 -0
- data/spec/support/logs/Scheduler - 2498774-16911.log +3 -0
- data/spec/support/logs/Scheduler - 2498961-4742.log +6 -0
- data/spec/support/logs/Scheduler - 2500340-16045.log +4 -0
- data/spec/support/logs/Scheduler - 2500980-26158.log +6 -0
- data/spec/support/logs/Scheduler - 2502381-26435.log +1 -0
- data/spec/support/logs/Scheduler - 2502463-62965.log +1 -0
- data/spec/support/logs/Scheduler - 2502547-53434.log +1 -0
- data/spec/support/logs/Scheduler - 2502628-43720.log +1 -0
- data/spec/support/logs/Scheduler - 2502643-58379.log +1 -0
- data/spec/support/logs/Scheduler - 2502873-64893.log +1 -0
- data/spec/support/logs/Scheduler - 2502954-43885.log +3 -0
- data/spec/support/logs/Scheduler - 2503039-52147.log +6 -0
- data/spec/support/logs/Scheduler - 2503768-28831.log +4 -0
- data/spec/support/logs/Scheduler - 2504259-24533.log +1 -0
- data/spec/support/logs/Scheduler - 2504343-56967.log +1 -0
- data/spec/support/logs/Scheduler - 2504502-25085.log +1 -0
- data/spec/support/logs/Scheduler - 2504587-30789.log +1 -0
- data/spec/support/logs/Scheduler - 2504608-56601.log +3 -0
- data/spec/support/logs/Scheduler - 2504760-36374.log +1 -0
- data/spec/support/logs/Scheduler - 2504841-49675.log +1 -0
- data/spec/support/logs/Scheduler - 2504923-15781.log +1 -0
- data/spec/support/logs/Scheduler - 2532871-63847.log +16 -0
- data/spec/support/logs/Scheduler - 2538978-63705.log +6 -0
- data/spec/support/logs/Scheduler - 2539461-10579.log +6 -0
- data/spec/support/logs/Scheduler - 2539981-44320.log +6 -0
- data/spec/support/logs/Scheduler - 2540265-37672.log +3 -0
- data/spec/support/logs/Scheduler - 2540434-9490.log +5 -0
- data/spec/support/logs/Scheduler - 2540840-9957.log +1 -0
- data/spec/support/logs/Scheduler - 2540921-2437.log +1 -0
- data/spec/support/logs/Scheduler - 2540937-17100.log +1 -0
- data/spec/support/logs/Scheduler - 2541007-52812.log +1 -0
- data/spec/support/logs/Scheduler - 2541091-56468.log +1 -0
- data/spec/support/logs/Scheduler - 2541109-54138.log +1 -0
- data/spec/support/logs/Scheduler - 2541188-17918.log +1 -0
- data/spec/support/logs/Scheduler - 2541267-2563.log +3 -0
- data/spec/support/logs/Scheduler - 2541430-40675.log +3 -0
- data/spec/support/logs/Scheduler - 2542341-38074.log +3 -0
- data/spec/support/logs/Scheduler - 2542519-33069.log +3 -0
- data/spec/support/logs/Scheduler - 2542610-41819.log +4 -0
- data/spec/support/logs/Scheduler - 2543168-3708.log +1 -0
- data/spec/support/logs/Scheduler - 2543332-46957.log +4 -0
- data/spec/support/logs/Scheduler - 2543334-53034.log +1 -0
- data/spec/support/logs/Scheduler - 2543419-31038.log +1 -0
- data/spec/support/logs/Scheduler - 2543666-10481.log +16 -0
- data/spec/support/logs/Scheduler - 2544245-30154.log +4 -0
- data/spec/support/logs/Scheduler - 2544487-8113.log +1 -0
- data/spec/support/logs/Scheduler - 2544490-62030.log +1 -0
- data/spec/support/logs/Scheduler - 2544494-64830.log +1 -0
- data/spec/support/logs/Scheduler - 2544585-3507.log +1 -0
- data/spec/support/logs/Scheduler - 2544668-24185.log +3 -0
- data/spec/support/logs/Scheduler - 2544762-17601.log +1 -0
- data/spec/support/logs/Scheduler - 2544790-32379.log +1 -0
- data/spec/support/logs/Scheduler - 2544853-35518.log +1 -0
- data/spec/support/logs/Scheduler - 2544939-52525.log +1 -0
- data/spec/support/logs/Scheduler - 2545016-12352.log +1 -0
- data/spec/support/logs/Scheduler - 2545096-63001.log +1 -0
- data/spec/support/logs/Scheduler - 2545178-63647.log +2 -0
- data/spec/support/logs/Scheduler - 361893-37255.log +3 -0
- data/spec/support/logs/Scheduler - 361897-36090.log +1 -0
- data/spec/support/logs/Scheduler - 361928-44834.log +3 -0
- data/spec/support/logs/Scheduler - 361937-43013.log +6 -0
- data/spec/support/logs/Scheduler - 361956-8533.log +4 -0
- data/spec/support/logs/Scheduler - 361968-31856.log +1 -0
- data/spec/support/logs/Scheduler - 361988-37894.log +3 -0
- data/spec/support/logs/Scheduler - 361997-31525.log +6 -0
- data/spec/support/logs/Scheduler - 362037-51907.log +3 -0
- data/spec/support/logs/Scheduler - 362047-32758.log +6 -0
- data/spec/support/logs/Scheduler - 362072-11620.log +3 -0
- data/spec/support/logs/Scheduler - 362080-16797.log +6 -0
- data/spec/support/logs/Scheduler - 362124-56230.log +4 -0
- data/spec/support/logs/Scheduler - 362137-4746.log +6 -0
- data/spec/support/logs/Scheduler - 362176-32691.log +1 -0
- data/spec/support/logs/Scheduler - 362179-34759.log +1 -0
- data/spec/support/logs/Scheduler - 362183-18758.log +1 -0
- data/spec/support/logs/Scheduler - 362187-63438.log +1 -0
- data/spec/support/logs/Scheduler - 362189-35075.log +1 -0
- data/spec/support/logs/Scheduler - 362191-34351.log +1 -0
- data/spec/support/logs/Scheduler - 362195-51436.log +3 -0
- data/spec/support/logs/Scheduler - 362199-46884.log +6 -0
- data/spec/support/logs/Scheduler - 362214-12351.log +4 -0
- data/spec/support/logs/Scheduler - 362230-12723.log +1 -0
- data/spec/support/logs/Scheduler - 362233-16133.log +1 -0
- data/spec/support/logs/Scheduler - 362238-51103.log +1 -0
- data/spec/support/logs/Scheduler - 362241-20441.log +1 -0
- data/spec/support/logs/Scheduler - 362245-40692.log +3 -0
- data/spec/support/logs/Scheduler - 362251-40074.log +1 -0
- data/spec/support/logs/Scheduler - 362253-48087.log +1 -0
- data/spec/support/logs/Scheduler - 362256-27112.log +1 -0
- data/spec/support/logs/Scheduler - 363208-60869.log +16 -0
- data/spec/support/logs/Scheduler - 363231-35883.log +6 -0
- data/spec/support/logs/Scheduler - 363240-11734.log +6 -0
- data/spec/support/logs/Scheduler - 363252-28394.log +6 -0
- data/spec/support/logs/Scheduler - 363267-7527.log +3 -0
- data/spec/support/logs/Scheduler - 363282-48049.log +5 -0
- data/spec/support/logs/Scheduler - 363298-26965.log +1 -0
- data/spec/support/logs/Scheduler - 363300-14973.log +1 -0
- data/spec/support/logs/Scheduler - 363302-58216.log +1 -0
- data/spec/support/logs/Scheduler - 363304-11942.log +1 -0
- data/spec/support/logs/Scheduler - 363306-39654.log +1 -0
- data/spec/support/logs/Scheduler - 363308-57479.log +1 -0
- data/spec/support/logs/Scheduler - 363310-32176.log +1 -0
- data/spec/support/logs/Scheduler - 363314-13492.log +3 -0
- data/spec/support/logs/Scheduler - 363322-38112.log +3 -0
- data/spec/support/logs/Scheduler - 363342-26080.log +3 -0
- data/spec/support/logs/Scheduler - 363349-51783.log +3 -0
- data/spec/support/logs/Scheduler - 363355-44132.log +4 -0
- data/spec/support/logs/Scheduler - 363367-12160.log +1 -0
- data/spec/support/logs/Scheduler - 363372-28520.log +4 -0
- data/spec/support/logs/Scheduler - 363376-58951.log +1 -0
- data/spec/support/logs/Scheduler - 363379-28506.log +1 -0
- data/spec/support/logs/Scheduler - 363384-63536.log +16 -0
- data/spec/support/logs/Scheduler - 363402-32695.log +4 -0
- data/spec/support/logs/Scheduler - 363412-41984.log +1 -0
- data/spec/support/logs/Scheduler - 363414-47366.log +1 -0
- data/spec/support/logs/Scheduler - 363416-44368.log +1 -0
- data/spec/support/logs/Scheduler - 363427-29292.log +1 -0
- data/spec/support/logs/Scheduler - 363431-44605.log +3 -0
- data/spec/support/logs/Scheduler - 363439-19754.log +1 -0
- data/spec/support/logs/Scheduler - 363441-5762.log +1 -0
- data/spec/support/logs/Scheduler - 363443-4000.log +1 -0
- data/spec/support/logs/Scheduler - 363445-3688.log +1 -0
- data/spec/support/logs/Scheduler - 363448-50268.log +1 -0
- data/spec/support/logs/Scheduler - 363451-23104.log +1 -0
- data/spec/support/logs/Scheduler - 363454-12897.log +2 -0
- data/spec/support/logs/{error-1520329.log → error-2487640.log} +449 -449
- data/spec/support/logs/error-360075.log +797 -0
- data/spec/support/logs/output_spec_2487640.log +390 -0
- data/spec/support/logs/output_spec_360075.log +390 -0
- data/spec/support/reports/052f88c73e2d0ecf331dbf5fce0cfe3c.crf +0 -0
- data/spec/support/reports/06eed3dec98f5cd5fc717190a004d7d6.crf +0 -0
- data/spec/support/reports/0902bd88bbd4df462910007a3b5018fc.crf +0 -0
- data/spec/support/reports/10b9864e81e3204d1ef4940ccb88b0ed.crf +0 -0
- data/spec/support/reports/16b575097e68156416a84a6854d3719c.crf +0 -0
- data/spec/support/reports/18be00bff4371738c7c7013b284b415b.crf +0 -0
- data/spec/support/reports/1ca39d410c2cf1f652eb8c320d6682bd.crf +0 -0
- data/spec/support/reports/266a09d73152ce2f3d2951f1dab133f3.crf +0 -0
- data/spec/support/reports/2929bee9c126b2695dc569b693fef574.crf +0 -0
- data/spec/support/reports/2abd611201d06f0428f1b060b32d4839.crf +0 -0
- data/spec/support/reports/2b9ce956f7060163d7a0b78603dc05ca.crf +0 -0
- data/spec/support/reports/3254163f76b8696fa1677d18eaefce1d.crf +0 -0
- data/spec/support/reports/3a9e6a4fa91c901550ff295cd21d69c9.crf +0 -0
- data/spec/support/reports/3de18cf956e18664f441f94ee05e4118.crf +0 -0
- data/spec/support/reports/46bcffd844008e71c7d90a76baf8597d.crf +0 -0
- data/spec/support/reports/482cf0d0c54cda32bedf59b2ea995c65.crf +0 -0
- data/spec/support/reports/502508e3a29966200350196c9859881c.crf +0 -0
- data/spec/support/reports/5f0d832d46338d69b4eab6ff91ba4c91.crf +0 -0
- data/spec/support/reports/620287cfdc373595385cf2471e1d4523.crf +0 -0
- data/spec/support/reports/65d71de3b0e8c9fe894f4ba36cb4cb7c.crf +0 -0
- data/spec/support/reports/6754d1f86dc5544abeca7f06314ebc56.crf +0 -0
- data/spec/support/reports/75fecdd5e006942292e02e6a223e7279.crf +0 -0
- data/spec/support/reports/77523cc87357aa220c33d5604f41b5a1.crf +0 -0
- data/spec/support/reports/7e137bd5f71e0f0fbb63b93b87dae160.crf +0 -0
- data/spec/support/reports/806a17c3a40cc22eafd77c97b64a2ed5.crf +0 -0
- data/spec/support/reports/81cca53163bbab5ccf4d5f0401d5adcd.crf +0 -0
- data/spec/support/reports/8745ae8fdeb76289765582e06a614940.crf +0 -0
- data/spec/support/reports/8c204ee129fe1bd6c5964d29ae5d03ae.crf +0 -0
- data/spec/support/reports/937b7b516a99c23b2a641bb7bf695bfa.crf +0 -0
- data/spec/support/reports/a6eb89ffb1c33e33e421c1ee393118a9.crf +0 -0
- data/spec/support/reports/aadbf2c1544b0e11174853fb4883a38c.crf +0 -0
- data/spec/support/reports/c360a2833f3e635e69036916010edeac.crf +0 -0
- data/spec/support/reports/cf0bfb4662a7cda85db324936aae93d3.crf +0 -0
- data/spec/support/reports/cfff9c06897e28b1d58977909738c78f.crf +0 -0
- data/spec/support/reports/e2d5321452359193a758f7d16879ddb3.crf +0 -0
- data/spec/support/reports/e58c9dfbf9edeca9adcf32af5940f16b.crf +0 -0
- data/spec/support/reports/e96abea937f1ed3f89bc2ec5397522db.crf +0 -0
- data/spec/support/reports/ec0bbd4424061d305963551a29d20e1a.crf +0 -0
- data/spec/support/reports/f16e679098a4411d4f1c123abcd6af90.crf +0 -0
- data/spec/support/reports/f2c155087c431851979048ceb8c46ec9.crf +0 -0
- data/spec/support/reports/f3d542036e17f6a66e11bfacb2fb3366.crf +0 -0
- data/spec/support/reports/f72c7feef5f9c7e29f423c3ebe345ef3.crf +0 -0
- data/spec/support/reports/fbb2e1c6ada2d4b8229488f4c4b3b418.crf +0 -0
- data/spec/support/snapshots/Cuboid 2022-02-01 13_10_28 +0200 a06d9bd7db81b1b4fb077ceadcc3895f.csf +0 -0
- data/spec/support/snapshots/Cuboid 2022-02-01 13_10_42 +0200 36c68859faf144eed9ff9c01ae754217.csf +0 -0
- data/spec/support/snapshots/Cuboid 2022-02-01 13_24_42 +0200 5a26112a913330ee8763b2982a4d42df.csf +0 -0
- data/spec/support/snapshots/Cuboid 2022-02-01 13_24_56 +0200 190856b98ac7099eb553ed3abcfbcb87.csf +0 -0
- data/spec/support/snapshots/Cuboid 2022-02-01 13_35_35 +0200 a9c5229b459119840c9428a3d7c54eb1.csf +0 -0
- data/spec/support/snapshots/Cuboid 2022-02-01 13_35_41 +0200 d93660f71110dad136cea0758b29611e.csf +0 -0
- data/spec/support/snapshots/Cuboid 2022-02-01 13_35_44 +0200 57083dafa382f1d21cc33c9740861c88.csf +0 -0
- data/spec/support/snapshots/Cuboid 2022-02-13 07_55_57 +0200 6ff9bf8c7b70ad85fa3a42f44bcc5fe7.csf +0 -0
- data/spec/support/snapshots/Cuboid 2022-02-13 07_56_12 +0200 2852d4e0ae04e5365301703913f7b763.csf +0 -0
- data/spec/support/snapshots/Cuboid 2022-02-13 08_06_41 +0200 54da34dab4b059de90cdd33d400ccac7.csf +0 -0
- data/spec/support/snapshots/Cuboid 2022-02-13 08_06_46 +0200 61596bdce9318446373d1b736ec7c9ce.csf +0 -0
- data/spec/support/snapshots/Cuboid 2022-02-13 08_06_48 +0200 19030be87532ece27c1d4791a8d3229c.csf +0 -0
- data/spec/support/snapshots/Cuboid 2022-02-20 03_01_57 +0200 b03ce79d889c60483385e77cda635831.csf +0 -0
- metadata +1213 -457
- data/lib/cuboid/processes/executables/dispatcher.rb +0 -5
- data/lib/cuboid/processes/helpers/dispatchers.rb +0 -23
- data/lib/cuboid/rpc/server/dispatcher/node.rb +0 -247
- data/spec/cuboid/rpc/server/dispatcher/node_spec.rb +0 -222
- data/spec/support/logs/Dispatcher - 1520492-37227.log +0 -6
- data/spec/support/logs/Dispatcher - 1520680-13689.log +0 -6
- data/spec/support/logs/Dispatcher - 1520682-24167.log +0 -6
- data/spec/support/logs/Dispatcher - 1520688-42731.log +0 -6
- data/spec/support/logs/Dispatcher - 1520690-5750.log +0 -10
- data/spec/support/logs/Dispatcher - 1520692-55183.log +0 -10
- data/spec/support/logs/Dispatcher - 1520695-39752.log +0 -10
- data/spec/support/logs/Dispatcher - 1520697-44327.log +0 -10
- data/spec/support/logs/Dispatcher - 1520699-58785.log +0 -10
- data/spec/support/logs/Dispatcher - 1520701-60952.log +0 -10
- data/spec/support/logs/Dispatcher - 1520796-50420.log +0 -6
- data/spec/support/logs/Dispatcher - 1520894-56883.log +0 -6
- data/spec/support/logs/Dispatcher - 1520896-21419.log +0 -6
- data/spec/support/logs/Dispatcher - 1520898-62584.log +0 -6
- data/spec/support/logs/Dispatcher - 1520900-59721.log +0 -6
- data/spec/support/logs/Dispatcher - 1520910-51632.log +0 -6
- data/spec/support/logs/Dispatcher - 1520920-21801.log +0 -6
- data/spec/support/logs/Dispatcher - 1520930-49223.log +0 -6
- data/spec/support/logs/Dispatcher - 1520933-34241.log +0 -6
- data/spec/support/logs/Dispatcher - 1520935-64571.log +0 -6
- data/spec/support/logs/Dispatcher - 1520937-50734.log +0 -6
- data/spec/support/logs/Dispatcher - 1520939-60841.log +0 -6
- data/spec/support/logs/Dispatcher - 1520944-8124.log +0 -6
- data/spec/support/logs/Dispatcher - 1520946-25192.log +0 -16
- data/spec/support/logs/Dispatcher - 1520948-9752.log +0 -14
- data/spec/support/logs/Dispatcher - 1520952-45543.log +0 -10
- data/spec/support/logs/Dispatcher - 1520958-36653.log +0 -16
- data/spec/support/logs/Dispatcher - 1520960-17456.log +0 -14
- data/spec/support/logs/Dispatcher - 1520964-5774.log +0 -10
- data/spec/support/logs/Dispatcher - 1520976-40848.log +0 -16
- data/spec/support/logs/Dispatcher - 1520978-29867.log +0 -14
- data/spec/support/logs/Dispatcher - 1520982-17715.log +0 -10
- data/spec/support/logs/Dispatcher - 1520987-8925.log +0 -16
- data/spec/support/logs/Dispatcher - 1520989-25480.log +0 -14
- data/spec/support/logs/Dispatcher - 1520993-5124.log +0 -10
- data/spec/support/logs/Dispatcher - 1520999-12901.log +0 -16
- data/spec/support/logs/Dispatcher - 1521004-32265.log +0 -14
- data/spec/support/logs/Dispatcher - 1521008-33455.log +0 -10
- data/spec/support/logs/Dispatcher - 1521014-13779.log +0 -6
- data/spec/support/logs/Dispatcher - 1521017-14755.log +0 -6
- data/spec/support/logs/Dispatcher - 1521022-48687.log +0 -6
- data/spec/support/logs/Dispatcher - 1521024-59097.log +0 -6
- data/spec/support/logs/Dispatcher - 1521034-12604.log +0 -6
- data/spec/support/logs/Dispatcher - 1521038-64272.log +0 -6
- data/spec/support/logs/Dispatcher - 1521043-8680.log +0 -6
- data/spec/support/logs/Dispatcher - 1521047-22949.log +0 -6
- data/spec/support/logs/Dispatcher - 1521051-3355.log +0 -6
- data/spec/support/logs/Dispatcher - 1521074-12332.log +0 -6
- data/spec/support/logs/Dispatcher - 1521118-53130.log +0 -16
- data/spec/support/logs/Dispatcher - 1521128-47137.log +0 -14
- data/spec/support/logs/Dispatcher - 1521136-30328.log +0 -10
- data/spec/support/logs/Dispatcher - 1521161-21329.log +0 -16
- data/spec/support/logs/Dispatcher - 1521172-19183.log +0 -14
- data/spec/support/logs/Dispatcher - 1521179-34902.log +0 -10
- data/spec/support/logs/Dispatcher - 1521190-20155.log +0 -16
- data/spec/support/logs/Dispatcher - 1521204-43843.log +0 -14
- data/spec/support/logs/Dispatcher - 1521211-23972.log +0 -10
- data/spec/support/logs/Dispatcher - 1521237-20879.log +0 -10
- data/spec/support/logs/Dispatcher - 1521239-61999.log +0 -10
- data/spec/support/logs/Dispatcher - 1521242-20975.log +0 -16
- data/spec/support/logs/Dispatcher - 1521246-28409.log +0 -14
- data/spec/support/logs/Dispatcher - 1521250-58505.log +0 -10
- data/spec/support/logs/Dispatcher - 1521262-53292.log +0 -6
- data/spec/support/logs/Dispatcher - 1521266-42758.log +0 -6
- data/spec/support/logs/Dispatcher - 1521277-4215.log +0 -6
- data/spec/support/logs/Dispatcher - 1521292-16086.log +0 -6
- data/spec/support/logs/Dispatcher - 1521301-42112.log +0 -6
- data/spec/support/logs/Dispatcher - 1521312-61196.log +0 -6
- data/spec/support/logs/Dispatcher - 1521316-23353.log +0 -6
- data/spec/support/logs/Dispatcher - 1521321-46361.log +0 -6
- data/spec/support/logs/Dispatcher - 1521438-46016.log +0 -6
- data/spec/support/logs/Dispatcher - 1521454-49862.log +0 -6
- data/spec/support/logs/Dispatcher - 1521470-54737.log +0 -6
- data/spec/support/logs/Scheduler - 1520469-35703.log +0 -3
- data/spec/support/logs/Scheduler - 1520473-60524.log +0 -6
- data/spec/support/logs/Scheduler - 1520509-34951.log +0 -3
- data/spec/support/logs/Scheduler - 1520517-31455.log +0 -6
- data/spec/support/logs/Scheduler - 1520529-43808.log +0 -4
- data/spec/support/logs/Scheduler - 1520536-23387.log +0 -1
- data/spec/support/logs/Scheduler - 1520549-48260.log +0 -3
- data/spec/support/logs/Scheduler - 1520563-45636.log +0 -6
- data/spec/support/logs/Scheduler - 1520599-40643.log +0 -3
- data/spec/support/logs/Scheduler - 1520608-54106.log +0 -6
- data/spec/support/logs/Scheduler - 1520629-24722.log +0 -3
- data/spec/support/logs/Scheduler - 1520637-61755.log +0 -6
- data/spec/support/logs/Scheduler - 1520663-17447.log +0 -4
- data/spec/support/logs/Scheduler - 1520671-38282.log +0 -6
- data/spec/support/logs/Scheduler - 1520703-33082.log +0 -1
- data/spec/support/logs/Scheduler - 1520706-22309.log +0 -1
- data/spec/support/logs/Scheduler - 1520709-1816.log +0 -1
- data/spec/support/logs/Scheduler - 1520711-19998.log +0 -1
- data/spec/support/logs/Scheduler - 1520714-47570.log +0 -1
- data/spec/support/logs/Scheduler - 1520723-18521.log +0 -1
- data/spec/support/logs/Scheduler - 1520725-40913.log +0 -3
- data/spec/support/logs/Scheduler - 1520749-45742.log +0 -6
- data/spec/support/logs/Scheduler - 1520759-44350.log +0 -4
- data/spec/support/logs/Scheduler - 1520770-53219.log +0 -1
- data/spec/support/logs/Scheduler - 1520773-54792.log +0 -1
- data/spec/support/logs/Scheduler - 1520777-19636.log +0 -1
- data/spec/support/logs/Scheduler - 1520780-51801.log +0 -1
- data/spec/support/logs/Scheduler - 1520782-9652.log +0 -3
- data/spec/support/logs/Scheduler - 1520786-59472.log +0 -1
- data/spec/support/logs/Scheduler - 1520789-1603.log +0 -1
- data/spec/support/logs/Scheduler - 1520792-35476.log +0 -1
- data/spec/support/logs/Scheduler - 1521410-47324.log +0 -16
- data/spec/support/logs/Scheduler - 1521422-33737.log +0 -6
- data/spec/support/logs/Scheduler - 1521433-36637.log +0 -6
- data/spec/support/logs/Scheduler - 1521440-15066.log +0 -6
- data/spec/support/logs/Scheduler - 1521456-48637.log +0 -3
- data/spec/support/logs/Scheduler - 1521472-54425.log +0 -5
- data/spec/support/logs/Scheduler - 1521496-12923.log +0 -1
- data/spec/support/logs/Scheduler - 1521518-46819.log +0 -1
- data/spec/support/logs/Scheduler - 1521522-21417.log +0 -1
- data/spec/support/logs/Scheduler - 1521525-35088.log +0 -1
- data/spec/support/logs/Scheduler - 1521528-13676.log +0 -1
- data/spec/support/logs/Scheduler - 1521530-48176.log +0 -1
- data/spec/support/logs/Scheduler - 1521532-13207.log +0 -1
- data/spec/support/logs/Scheduler - 1521535-5799.log +0 -3
- data/spec/support/logs/Scheduler - 1521543-62784.log +0 -3
- data/spec/support/logs/Scheduler - 1521551-10263.log +0 -3
- data/spec/support/logs/Scheduler - 1521556-56026.log +0 -3
- data/spec/support/logs/Scheduler - 1521560-14551.log +0 -4
- data/spec/support/logs/Scheduler - 1521573-47584.log +0 -1
- data/spec/support/logs/Scheduler - 1521578-14443.log +0 -4
- data/spec/support/logs/Scheduler - 1521580-60337.log +0 -1
- data/spec/support/logs/Scheduler - 1521583-52039.log +0 -1
- data/spec/support/logs/Scheduler - 1521586-1500.log +0 -16
- data/spec/support/logs/Scheduler - 1521598-61298.log +0 -4
- data/spec/support/logs/Scheduler - 1521602-61490.log +0 -1
- data/spec/support/logs/Scheduler - 1521604-29209.log +0 -1
- data/spec/support/logs/Scheduler - 1521606-47734.log +0 -1
- data/spec/support/logs/Scheduler - 1521612-63269.log +0 -1
- data/spec/support/logs/Scheduler - 1521614-47018.log +0 -3
- data/spec/support/logs/Scheduler - 1521619-32411.log +0 -1
- data/spec/support/logs/Scheduler - 1521621-42861.log +0 -1
- data/spec/support/logs/Scheduler - 1521623-56258.log +0 -1
- data/spec/support/logs/Scheduler - 1521627-9487.log +0 -1
- data/spec/support/logs/Scheduler - 1521630-3345.log +0 -1
- data/spec/support/logs/Scheduler - 1521632-47325.log +0 -1
- data/spec/support/logs/Scheduler - 1521635-22156.log +0 -2
- data/spec/support/logs/output_spec_1520329.log +0 -390
- data/spec/support/reports/003bed585153336c2548d1c60a026a3e.crf +0 -0
- data/spec/support/reports/30e3c7a8c13e9b40a0a443a5e5a4ff94.crf +0 -0
- data/spec/support/reports/31655751a9f0eee91e588bc796985b1e.crf +0 -0
- data/spec/support/reports/40801b7993c0ed919b73242a9c078dde.crf +0 -0
- data/spec/support/reports/4719b89667e92bb80102f4b0bb4c0c75.crf +0 -0
- data/spec/support/reports/4e765a3d2870d2763ea72167bd3db9d6.crf +0 -0
- data/spec/support/reports/61968f732d8ae715c104175e43679915.crf +0 -0
- data/spec/support/reports/63446a8ec637d9991b8c6a1151ae59a9.crf +0 -0
- data/spec/support/reports/737144b18305c7a115ad7964b9bbe41c.crf +0 -0
- data/spec/support/reports/73fe5f7adf905045c3fe4669bdf60d02.crf +0 -0
- data/spec/support/reports/86cd396db9ef97472876f32e57c44ce7.crf +0 -0
- data/spec/support/reports/8a031ac2b2730dfd07a1d1ca870299f2.crf +0 -0
- data/spec/support/reports/8e16ac74484ee5d8cf7073fe22adf787.crf +0 -0
- data/spec/support/reports/8eff857213ab6ff712a0b0e8582855c9.crf +0 -0
- data/spec/support/reports/9e0e6ed8718973b3d4e63bbb7dd1d1c6.crf +0 -0
- data/spec/support/reports/a9c88f967d09cb9c4e8e1180cfb24828.crf +0 -0
- data/spec/support/reports/ba32970a64686e45ec8caa5032f65c2e.crf +0 -0
- data/spec/support/reports/cceb7596659fd619ab4438953cbda78b.crf +0 -0
- data/spec/support/reports/d2e0f4558b605ffd1215e9226815b951.crf +0 -0
- data/spec/support/snapshots/Cuboid 2022-01-24 14_38_16 +0200 8238609e31cedaf1bcb89205f9d42121.csf +0 -0
- data/spec/support/snapshots/Cuboid 2022-01-24 14_38_30 +0200 68690b002e79c7bc9e3aabfcbc7ac5a7.csf +0 -0
- data/spec/support/snapshots/Cuboid 2022-01-24 14_46_39 +0200 6fd3c9491d3e784e18f9c3c0d9deddec.csf +0 -0
- data/spec/support/snapshots/Cuboid 2022-01-24 14_46_44 +0200 c3a012fba59210bc7c169afb0565d5a8.csf +0 -0
- data/spec/support/snapshots/Cuboid 2022-01-24 14_46_46 +0200 e4c1ce35d8e62e6a16f84eccd36b2283.csf +0 -0
data/lib/cuboid/rest/server.rb
CHANGED
@@ -23,7 +23,7 @@ class Server < Sinatra::Base
|
|
23
23
|
end
|
24
24
|
|
25
25
|
register Routes::Instances
|
26
|
-
register Routes::
|
26
|
+
register Routes::Agent
|
27
27
|
register Routes::Grid
|
28
28
|
register Routes::Scheduler
|
29
29
|
|
@@ -81,9 +81,9 @@ class Server < Sinatra::Base
|
|
81
81
|
halt 404, json( "Scan not found for id: #{h id}." )
|
82
82
|
end
|
83
83
|
|
84
|
-
def
|
85
|
-
return if
|
86
|
-
halt 501, json( 'No
|
84
|
+
def ensure_agent!
|
85
|
+
return if agent
|
86
|
+
halt 501, json( 'No Agent has been set.' )
|
87
87
|
end
|
88
88
|
|
89
89
|
def ensure_scheduler!
|
@@ -114,7 +114,7 @@ class Server < Sinatra::Base
|
|
114
114
|
|
115
115
|
def reset
|
116
116
|
@@instances.clear
|
117
|
-
@@
|
117
|
+
@@agents.clear
|
118
118
|
end
|
119
119
|
|
120
120
|
def run!( options )
|
@@ -5,10 +5,10 @@ require Options.paths.lib + 'rpc/client/base'
|
|
5
5
|
module RPC
|
6
6
|
class Client
|
7
7
|
|
8
|
-
# RPC
|
8
|
+
# RPC Agent client
|
9
9
|
#
|
10
10
|
# @author Tasos "Zapotek" Laskos <tasos.laskos@gmail.com>
|
11
|
-
class
|
11
|
+
class Agent
|
12
12
|
# Not always available, set by the parent.
|
13
13
|
attr_accessor :pid
|
14
14
|
|
@@ -18,7 +18,7 @@ class Dispatcher
|
|
18
18
|
@client = Base.new( url, nil, options )
|
19
19
|
@node = Arachni::RPC::Proxy.new( @client, 'node' )
|
20
20
|
|
21
|
-
Cuboid::Application.application.
|
21
|
+
Cuboid::Application.application.agent_services.keys.each do |name|
|
22
22
|
self.class.send( :attr_reader, name.to_sym )
|
23
23
|
|
24
24
|
instance_variable_set(
|
@@ -48,7 +48,7 @@ class Dispatcher
|
|
48
48
|
|
49
49
|
# Used to provide the illusion of locality for remote methods
|
50
50
|
def method_missing( sym, *args, &block )
|
51
|
-
@client.call( "
|
51
|
+
@client.call( "agent.#{sym.to_s}", *args, &block )
|
52
52
|
end
|
53
53
|
|
54
54
|
end
|
@@ -5,7 +5,7 @@ require Options.paths.lib + 'rpc/client/base'
|
|
5
5
|
module RPC
|
6
6
|
class Client
|
7
7
|
|
8
|
-
# RPC client for remote instances spawned by a remote
|
8
|
+
# RPC client for remote instances spawned by a remote agent
|
9
9
|
#
|
10
10
|
# @author Tasos "Zapotek" Laskos <tasos.laskos@gmail.com>
|
11
11
|
class Instance
|
@@ -47,7 +47,7 @@ class Instance
|
|
47
47
|
@instance = Proxy.new( @client )
|
48
48
|
@options = Arachni::RPC::Proxy.new( @client, 'options' )
|
49
49
|
|
50
|
-
# map
|
50
|
+
# map Agent handlers
|
51
51
|
Cuboid::Application.application.instance_services.keys.each do |name|
|
52
52
|
self.class.send( :attr_reader, name.to_sym )
|
53
53
|
|
data/lib/cuboid/rpc/client.rb
CHANGED
@@ -0,0 +1,247 @@
|
|
1
|
+
module Cuboid
|
2
|
+
|
3
|
+
require Options.paths.lib + 'rpc/server/output'
|
4
|
+
|
5
|
+
module RPC
|
6
|
+
|
7
|
+
# Agent node class, helps maintain a list of all available Agents in
|
8
|
+
# the grid and announce itself to peering Agents.
|
9
|
+
#
|
10
|
+
# As soon as a new Node is fired up it checks-in with its peer and grabs
|
11
|
+
# a list of all available peers.
|
12
|
+
#
|
13
|
+
# As soon as it receives the peer list it then announces itself to them.
|
14
|
+
#
|
15
|
+
# Upon convergence there will be a grid of Agents each one with its own
|
16
|
+
# copy of all available Agent URLs.
|
17
|
+
#
|
18
|
+
# @author Tasos "Zapotek" Laskos <tasos.laskos@gmail.com>
|
19
|
+
class Server::Agent::Node
|
20
|
+
include UI::Output
|
21
|
+
|
22
|
+
# Initializes the node by:
|
23
|
+
#
|
24
|
+
# * Adding the peer (if the user has supplied one) to the peer list.
|
25
|
+
# * Getting the peer's peer list and appending them to its own.
|
26
|
+
# * Announces itself to the peer and instructs it to propagate our URL
|
27
|
+
# to the others.
|
28
|
+
#
|
29
|
+
# @param [Cuboid::Options] options
|
30
|
+
# @param [Server::Base] server
|
31
|
+
# Agent's RPC server.
|
32
|
+
# @param [String] logfile
|
33
|
+
# Where to send the output.
|
34
|
+
def initialize( options, server, logfile = nil )
|
35
|
+
@options = options
|
36
|
+
@server = server
|
37
|
+
@url = @server.url
|
38
|
+
|
39
|
+
reroute_to_file( logfile ) if logfile
|
40
|
+
|
41
|
+
print_status 'Initializing grid node...'
|
42
|
+
|
43
|
+
@dead_nodes = Set.new
|
44
|
+
@peers = Set.new
|
45
|
+
@nodes_info_cache = []
|
46
|
+
|
47
|
+
if (peer = @options.agent.peer)
|
48
|
+
# Grab the peer's peers.
|
49
|
+
connect_to_peer( peer ).peers do |urls|
|
50
|
+
if urls.rpc_exception?
|
51
|
+
add_dead_peer( peer )
|
52
|
+
print_info "Neighbour seems dead: #{peer}"
|
53
|
+
add_dead_peer( peer )
|
54
|
+
next
|
55
|
+
end
|
56
|
+
|
57
|
+
# Add peer and announce it to everyone.
|
58
|
+
add_peer( peer, true )
|
59
|
+
|
60
|
+
urls.each { |url| @peers << url if url != @url }
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
print_status 'Node ready.'
|
65
|
+
|
66
|
+
log_updated_peers
|
67
|
+
|
68
|
+
Arachni::Reactor.global.at_interval( @options.agent.ping_interval ) do
|
69
|
+
ping
|
70
|
+
check_for_comebacks
|
71
|
+
end
|
72
|
+
end
|
73
|
+
|
74
|
+
# @return [Boolean]
|
75
|
+
# `true` if grid member, `false` otherwise.
|
76
|
+
def grid_member?
|
77
|
+
@peers.any?
|
78
|
+
end
|
79
|
+
|
80
|
+
def unplug
|
81
|
+
@peers.each do |peer|
|
82
|
+
connect_to_peer( peer ).remove_peer( @url ) {}
|
83
|
+
end
|
84
|
+
|
85
|
+
@peers.clear
|
86
|
+
@dead_nodes.clear
|
87
|
+
|
88
|
+
nil
|
89
|
+
end
|
90
|
+
|
91
|
+
# Adds a peer to the peer list.
|
92
|
+
#
|
93
|
+
# @param [String] node_url
|
94
|
+
# URL of a peering node.
|
95
|
+
# @param [Boolean] propagate
|
96
|
+
# Whether or not to announce the new node to the peers.
|
97
|
+
def add_peer( node_url, propagate = false )
|
98
|
+
# we don't want ourselves in the Set
|
99
|
+
return false if node_url == @url
|
100
|
+
return false if @peers.include?( node_url )
|
101
|
+
|
102
|
+
print_status "Adding peer: #{node_url}"
|
103
|
+
|
104
|
+
@peers << node_url
|
105
|
+
log_updated_peers
|
106
|
+
announce( node_url ) if propagate
|
107
|
+
|
108
|
+
connect_to_peer( node_url ).add_peer( @url, propagate ) do |res|
|
109
|
+
next if !res.rpc_exception?
|
110
|
+
add_dead_peer( node_url )
|
111
|
+
print_status "Neighbour seems dead: #{node_url}"
|
112
|
+
end
|
113
|
+
true
|
114
|
+
end
|
115
|
+
|
116
|
+
def remove_peer( url )
|
117
|
+
@peers.delete url
|
118
|
+
@dead_nodes.delete url
|
119
|
+
nil
|
120
|
+
end
|
121
|
+
|
122
|
+
# @return [Array]
|
123
|
+
# Neighbour/node/peer URLs.
|
124
|
+
def peers
|
125
|
+
@peers.to_a
|
126
|
+
end
|
127
|
+
|
128
|
+
def peers_with_info( &block )
|
129
|
+
fail 'This method requires a block!' if !block_given?
|
130
|
+
|
131
|
+
@peers_cmp = ''
|
132
|
+
|
133
|
+
if @nodes_info_cache.empty? || @peers_cmp != peers.to_s
|
134
|
+
@peers_cmp = peers.to_s
|
135
|
+
|
136
|
+
each = proc do |peer, iter|
|
137
|
+
connect_to_peer( peer ).info do |info|
|
138
|
+
if info.rpc_exception?
|
139
|
+
print_info "Neighbour seems dead: #{peer}"
|
140
|
+
add_dead_peer( peer )
|
141
|
+
log_updated_peers
|
142
|
+
|
143
|
+
iter.return( nil )
|
144
|
+
else
|
145
|
+
iter.return( info )
|
146
|
+
end
|
147
|
+
end
|
148
|
+
end
|
149
|
+
|
150
|
+
after = proc do |nodes|
|
151
|
+
@nodes_info_cache = nodes.compact
|
152
|
+
block.call( @nodes_info_cache )
|
153
|
+
end
|
154
|
+
|
155
|
+
Arachni::Reactor.global.create_iterator( peers ).map( each, after )
|
156
|
+
else
|
157
|
+
block.call( @nodes_info_cache )
|
158
|
+
end
|
159
|
+
end
|
160
|
+
|
161
|
+
# @return [Hash]
|
162
|
+
#
|
163
|
+
# * `url` -- This node's URL.
|
164
|
+
# * `name` -- Nickname
|
165
|
+
# * `peers` -- Array of peers.
|
166
|
+
def info
|
167
|
+
{
|
168
|
+
'url' => @url,
|
169
|
+
'name' => @options.agent.name,
|
170
|
+
'peers' => @peers.to_a,
|
171
|
+
'unreachable_peers' => @dead_nodes.to_a
|
172
|
+
}
|
173
|
+
end
|
174
|
+
|
175
|
+
def alive?
|
176
|
+
true
|
177
|
+
end
|
178
|
+
|
179
|
+
private
|
180
|
+
|
181
|
+
def add_dead_peer( url )
|
182
|
+
remove_peer( url )
|
183
|
+
@dead_nodes << url
|
184
|
+
end
|
185
|
+
|
186
|
+
def log_updated_peers
|
187
|
+
print_info 'Updated peers:'
|
188
|
+
|
189
|
+
if !peers.empty?
|
190
|
+
peers.each { |node| print_info( '---- ' + node ) }
|
191
|
+
else
|
192
|
+
print_info '<empty>'
|
193
|
+
end
|
194
|
+
end
|
195
|
+
|
196
|
+
def ping
|
197
|
+
peers.each do |peer|
|
198
|
+
connect_to_peer( peer ).alive? do |res|
|
199
|
+
next if !res.rpc_exception?
|
200
|
+
add_dead_peer( peer )
|
201
|
+
print_status "Found dead peer: #{peer} "
|
202
|
+
end
|
203
|
+
end
|
204
|
+
end
|
205
|
+
|
206
|
+
def check_for_comebacks
|
207
|
+
@dead_nodes.dup.each do |url|
|
208
|
+
peer = connect_to_peer( url )
|
209
|
+
peer.alive? do |res|
|
210
|
+
next if res.rpc_exception?
|
211
|
+
|
212
|
+
print_status "Agent came back to life: #{url}"
|
213
|
+
([@url] | peers).each do |node|
|
214
|
+
peer.add_peer( node ){}
|
215
|
+
end
|
216
|
+
|
217
|
+
add_peer( url )
|
218
|
+
@dead_nodes.delete url
|
219
|
+
end
|
220
|
+
end
|
221
|
+
end
|
222
|
+
|
223
|
+
# Announces the node to the ones in the peer list
|
224
|
+
#
|
225
|
+
# @param [String] node
|
226
|
+
# URL
|
227
|
+
def announce( node )
|
228
|
+
print_status "Advertising: #{node}"
|
229
|
+
|
230
|
+
peers.each do |peer|
|
231
|
+
next if peer == node
|
232
|
+
|
233
|
+
print_info '---- to: ' + peer
|
234
|
+
connect_to_peer( peer ).add_peer( node ) do |res|
|
235
|
+
add_dead_peer( peer ) if res.rpc_exception?
|
236
|
+
end
|
237
|
+
end
|
238
|
+
end
|
239
|
+
|
240
|
+
def connect_to_peer( url )
|
241
|
+
@rpc_clients ||= {}
|
242
|
+
@rpc_clients[url] ||= Client::Agent.new( url ).node
|
243
|
+
end
|
244
|
+
|
245
|
+
end
|
246
|
+
end
|
247
|
+
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Cuboid
|
2
2
|
module RPC
|
3
3
|
|
4
|
-
# Base class and namespace for all
|
4
|
+
# Base class and namespace for all Agent services.
|
5
5
|
#
|
6
6
|
# # RPC accessibility
|
7
7
|
#
|
@@ -26,20 +26,20 @@ module RPC
|
|
26
26
|
# results to that block instead of returning a value.
|
27
27
|
#
|
28
28
|
# @author Tasos "Zapotek" Laskos <tasos.laskos@gmail.com>
|
29
|
-
class Server::
|
29
|
+
class Server::Agent::Service
|
30
30
|
|
31
31
|
attr_reader :options
|
32
|
-
attr_reader :
|
32
|
+
attr_reader :agent
|
33
33
|
|
34
|
-
def initialize( options,
|
34
|
+
def initialize( options, agent )
|
35
35
|
@options = options
|
36
|
-
@
|
36
|
+
@agent = agent
|
37
37
|
end
|
38
38
|
|
39
|
-
# @return [Server::
|
39
|
+
# @return [Server::Agent::Node]
|
40
40
|
# Local node.
|
41
41
|
def node
|
42
|
-
|
42
|
+
agent.instance_eval { @node }
|
43
43
|
end
|
44
44
|
|
45
45
|
# Performs an asynchronous map operation over all running instances.
|
@@ -102,17 +102,17 @@ class Server::Dispatcher::Service
|
|
102
102
|
# @return [Array<Hash>]
|
103
103
|
# Alive instances.
|
104
104
|
def instances
|
105
|
-
|
105
|
+
agent.running_instances
|
106
106
|
end
|
107
107
|
|
108
|
-
# Connects to a
|
108
|
+
# Connects to a Agent by `url`
|
109
109
|
#
|
110
110
|
# @param [String] url
|
111
111
|
#
|
112
|
-
# @return [Client::
|
113
|
-
def
|
114
|
-
@
|
115
|
-
@
|
112
|
+
# @return [Client::Agent]
|
113
|
+
def connect_to_agent( url )
|
114
|
+
@agent_connections ||= {}
|
115
|
+
@agent_connections[url] ||= Client::Agent.new( url )
|
116
116
|
end
|
117
117
|
|
118
118
|
# Connects to an Instance by `url`.
|
@@ -14,24 +14,24 @@ class Server
|
|
14
14
|
#
|
15
15
|
# The process goes something like this:
|
16
16
|
#
|
17
|
-
# * A client issues a {#
|
18
|
-
# * The
|
17
|
+
# * A client issues a {#spawn} call.
|
18
|
+
# * The Agent spawns and returns Instance info to the client (url, auth token, etc.).
|
19
19
|
# * The client connects to the Instance using that info.
|
20
20
|
#
|
21
21
|
# Once the client finishes using the RPC Instance it *must* shut it down
|
22
22
|
# otherwise the system will be eaten away by zombie processes.
|
23
23
|
#
|
24
24
|
# @author Tasos "Zapotek" Laskos <tasos.laskos@gmail.com>
|
25
|
-
class
|
26
|
-
require Options.paths.lib + 'rpc/server/
|
27
|
-
require Options.paths.lib + 'rpc/server/
|
25
|
+
class Agent
|
26
|
+
require Options.paths.lib + 'rpc/server/agent/node'
|
27
|
+
require Options.paths.lib + 'rpc/server/agent/service'
|
28
28
|
|
29
29
|
include Utilities
|
30
30
|
include UI::Output
|
31
31
|
|
32
32
|
SERVICE_NAMESPACE = Service
|
33
33
|
|
34
|
-
PREFERENCE_STRATEGIES = Cuboid::OptionGroups::
|
34
|
+
PREFERENCE_STRATEGIES = Cuboid::OptionGroups::Agent::STRATEGIES
|
35
35
|
|
36
36
|
def initialize( options = Options.instance )
|
37
37
|
@options = options
|
@@ -46,20 +46,20 @@ class Dispatcher
|
|
46
46
|
method.parameters.flatten.include? :block
|
47
47
|
end
|
48
48
|
|
49
|
-
Options.
|
49
|
+
Options.agent.url = @url = @server.url
|
50
50
|
|
51
51
|
prep_logging
|
52
52
|
|
53
53
|
print_status 'Starting the RPC Server...'
|
54
54
|
|
55
|
-
@server.add_handler( '
|
55
|
+
@server.add_handler( 'agent', self )
|
56
56
|
|
57
57
|
# trap interrupts and exit cleanly when required
|
58
58
|
trap_interrupts { shutdown }
|
59
59
|
|
60
60
|
@instances = []
|
61
61
|
|
62
|
-
Cuboid::Application.application.
|
62
|
+
Cuboid::Application.application.agent_services.each do |name, service|
|
63
63
|
@server.add_handler( name.to_s, service.new( @options, self ) )
|
64
64
|
end
|
65
65
|
|
@@ -70,7 +70,7 @@ class Dispatcher
|
|
70
70
|
end
|
71
71
|
|
72
72
|
def services
|
73
|
-
Cuboid::Application.application.
|
73
|
+
Cuboid::Application.application.agent_services.keys
|
74
74
|
end
|
75
75
|
|
76
76
|
# @return [TrueClass]
|
@@ -80,24 +80,25 @@ class Dispatcher
|
|
80
80
|
end
|
81
81
|
|
82
82
|
# @param [Symbol] strategy
|
83
|
-
# `:horizontal` -- Pick the
|
84
|
-
# `:vertical` -- Pick the
|
83
|
+
# `:horizontal` -- Pick the Agent with the least amount of workload.
|
84
|
+
# `:vertical` -- Pick the Agent with the most amount of workload.
|
85
|
+
# `:direct` -- Bypass the grid and get an Instance directly from this agent.
|
85
86
|
#
|
86
87
|
# @return [String, nil]
|
87
88
|
# Depending on strategy and availability:
|
88
89
|
#
|
89
|
-
# * URL of the preferred
|
90
|
-
# this
|
90
|
+
# * URL of the preferred Agent. If not a grid member it will return
|
91
|
+
# this Agent's URL.
|
91
92
|
# * `nil` if all nodes are at max utilization or on error.
|
92
93
|
# * `ArgumentError` -- On invalid `strategy`.
|
93
|
-
def preferred( strategy = Cuboid::Options.
|
94
|
+
def preferred( strategy = Cuboid::Options.agent.strategy, &block )
|
94
95
|
strategy = strategy.to_sym
|
95
96
|
if !PREFERENCE_STRATEGIES.include? strategy
|
96
97
|
block.call :error_unknown_strategy
|
97
98
|
raise ArgumentError, "Unknown strategy: #{strategy}"
|
98
99
|
end
|
99
100
|
|
100
|
-
if !@node.grid_member?
|
101
|
+
if strategy == :direct || !@node.grid_member?
|
101
102
|
block.call( self.utilization == 1 ? nil : @url )
|
102
103
|
return
|
103
104
|
end
|
@@ -117,9 +118,9 @@ class Dispatcher
|
|
117
118
|
end
|
118
119
|
end
|
119
120
|
|
120
|
-
each = proc do |
|
121
|
-
connect_to_peer(
|
122
|
-
iter.return pick_utilization.call(
|
121
|
+
each = proc do |peer, iter|
|
122
|
+
connect_to_peer( peer ).utilization do |utilization|
|
123
|
+
iter.return pick_utilization.call( peer, utilization )
|
123
124
|
end
|
124
125
|
end
|
125
126
|
|
@@ -136,32 +137,35 @@ class Dispatcher
|
|
136
137
|
block.call nodes.sort_by { |_, score| adjust_score_by_strategy.call score }[0][0]
|
137
138
|
end
|
138
139
|
|
139
|
-
Arachni::Reactor.global.create_iterator( @node.
|
140
|
+
Arachni::Reactor.global.create_iterator( @node.peers ).map( each, after )
|
140
141
|
end
|
141
142
|
|
142
|
-
#
|
143
|
+
# Spawns an {Instance}.
|
143
144
|
#
|
144
|
-
# @param [String]
|
145
|
+
# @param [String] options
|
146
|
+
# @option [String] strategy
|
147
|
+
# @option [String] owner
|
145
148
|
# An owner to assign to the {Instance}.
|
146
|
-
# @
|
149
|
+
# @option [Hash] helpers
|
147
150
|
# Hash of helper data to be added to the instance info.
|
148
|
-
# @param [Boolean] load_balance
|
149
|
-
# Return an {Instance} from the least burdened {Dispatcher} (when in Grid mode)
|
150
|
-
# or from this one directly?
|
151
151
|
#
|
152
152
|
# @return [Hash, nil]
|
153
153
|
# Depending on availability:
|
154
154
|
#
|
155
155
|
# * `Hash`: Connection and proc info.
|
156
|
-
# * `nil`: Max utilization
|
157
|
-
def
|
156
|
+
# * `nil`: Max utilization or currently spawning, wait and retry.
|
157
|
+
def spawn( options = {}, &block )
|
158
|
+
if @spawning
|
159
|
+
block.call nil
|
160
|
+
return
|
161
|
+
end
|
162
|
+
|
158
163
|
options = options.my_symbolize_keys
|
159
164
|
strategy = options.delete(:strategy)
|
160
165
|
owner = options[:owner]
|
161
166
|
helpers = options[:helpers] || {}
|
162
|
-
load_balance = options[:load_balance].nil? ? true : options[:load_balance]
|
163
167
|
|
164
|
-
if
|
168
|
+
if strategy != 'direct' && @node.grid_member?
|
165
169
|
preferred *[strategy].compact do |url|
|
166
170
|
if !url
|
167
171
|
block.call
|
@@ -173,9 +177,9 @@ class Dispatcher
|
|
173
177
|
next
|
174
178
|
end
|
175
179
|
|
176
|
-
connect_to_peer( url ).
|
177
|
-
helpers:
|
178
|
-
|
180
|
+
connect_to_peer( url ).spawn( options.merge(
|
181
|
+
helpers: helpers.merge( via: @url ),
|
182
|
+
strategy: :direct
|
179
183
|
),
|
180
184
|
&block
|
181
185
|
)
|
@@ -188,6 +192,7 @@ class Dispatcher
|
|
188
192
|
return
|
189
193
|
end
|
190
194
|
|
195
|
+
@spawning = true
|
191
196
|
spawn_instance do |info|
|
192
197
|
info['owner'] = owner
|
193
198
|
info['helpers'] = helpers
|
@@ -195,6 +200,8 @@ class Dispatcher
|
|
195
200
|
@instances << info
|
196
201
|
|
197
202
|
block.call info
|
203
|
+
|
204
|
+
@spawning = false
|
198
205
|
end
|
199
206
|
end
|
200
207
|
|
@@ -243,7 +250,7 @@ class Dispatcher
|
|
243
250
|
end
|
244
251
|
|
245
252
|
# @return [Float]
|
246
|
-
# Workload score for this
|
253
|
+
# Workload score for this Agent, calculated using {System#utilization}.
|
247
254
|
#
|
248
255
|
# * `0.0` => No utilization.
|
249
256
|
# * `1.0` => Max utilization.
|
@@ -285,7 +292,7 @@ class Dispatcher
|
|
285
292
|
end
|
286
293
|
end
|
287
294
|
|
288
|
-
# Starts the
|
295
|
+
# Starts the agent's server
|
289
296
|
def run
|
290
297
|
Arachni::Reactor.global.on_error do |_, e|
|
291
298
|
print_error "Reactor: #{e}"
|
@@ -314,7 +321,7 @@ class Dispatcher
|
|
314
321
|
def spawn_instance( options = {}, &block )
|
315
322
|
Processes::Instances.spawn( options.merge(
|
316
323
|
address: @server.address,
|
317
|
-
port_range: Options.
|
324
|
+
port_range: Options.agent.instance_port_range,
|
318
325
|
token: Utilities.generate_token,
|
319
326
|
application: Options.paths.application
|
320
327
|
)) do |client|
|
@@ -331,12 +338,12 @@ class Dispatcher
|
|
331
338
|
def prep_logging
|
332
339
|
# reroute all output to a logfile
|
333
340
|
@logfile ||= reroute_to_file( @options.paths.logs +
|
334
|
-
"/
|
341
|
+
"/Agent - #{Process.pid}-#{@options.rpc.server_port}.log" )
|
335
342
|
end
|
336
343
|
|
337
344
|
def connect_to_peer( url )
|
338
345
|
@rpc_clients ||= {}
|
339
|
-
@rpc_clients[url] ||= Client::
|
346
|
+
@rpc_clients[url] ||= Client::Agent.new( url )
|
340
347
|
end
|
341
348
|
|
342
349
|
end
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'tempfile'
|
2
|
+
require 'forwardable'
|
2
3
|
|
3
4
|
module Cuboid
|
4
5
|
|
@@ -111,7 +112,7 @@ class ApplicationWrapper
|
|
111
112
|
busy: running?,
|
112
113
|
application: @application.class.to_s,
|
113
114
|
seed: Utilities.random_seed,
|
114
|
-
|
115
|
+
agent_url: Cuboid::Options.agent.url,
|
115
116
|
scheduler_url: Cuboid::Options.scheduler.url
|
116
117
|
}
|
117
118
|
|
@@ -90,10 +90,10 @@ class Instance
|
|
90
90
|
end
|
91
91
|
|
92
92
|
# @return [String, nil]
|
93
|
-
#
|
94
|
-
#
|
95
|
-
def
|
96
|
-
@options.
|
93
|
+
# Agent URL that provided this Instance, `nil` if not provided by a
|
94
|
+
# Agent.
|
95
|
+
def agent_url
|
96
|
+
@options.agent.url
|
97
97
|
end
|
98
98
|
|
99
99
|
# @param (see Cuboid::Application#restore)
|