Forums | Admin

Discussion Forums: help

Start New Thread Start New Thread

 

By: Nicolas Fouché
RE: skynet_controller.rb: status of all serve [ reply ]  
2008-07-09 17:18
Thanks for your fast answer, it works like a charm.

I could have checked in the code, I relied too much on the RDoc on this one..

By: Adam Pisoni
RE: skynet_controller.rb: status of all serve [ reply ]  
2008-07-09 17:08
The issue is that there is no Main Manager. I think this will change in the future. for the time being you have to let skynet know about all your managers in order for it to ask them for their stats. In your Skynet config block add

Skynet.configure(
:MANAGER_HOSTS => ["sn-001.geni.com","sn-002.geni.com","sn-003.geni.com","sn-004.geni.com","sn-005.geni.com", "sn-006.geni.com"],
)

Except obviously put your own manager hosts.

By: Nicolas Fouché
skynet_controller.rb: status of all servers [ reply ]  
2008-07-09 17:01
Hi Adam,

first, thanks for this great project.

I'm playing with the Skynet Rails controller you provide in your last release. I have one Skynet manager with a Rails app on a server, and other Skynet managers on another servers. But the Skynet Rails controller only shows one server, the local one.

Here is the result of "Skynet::Manager.stats_for_hosts[:servers]" in the Skynet console:

{"localhost"=>{:hostname=>"foo", :processed_by_active_workers=>0, :active_master_or_task_workers=>0, :shutdown_workers=>2, :masters=>0, :earliest_update=>1215618762, :processed=>0, :active_taskworkers=>0, :active_workers=>0, :taskworkers=>0, :latest_update=>1215620573, :idle_masters=>0, :active_earliest_update=>nil, :number_of_workers=>0, :idle_master_or_task_workers=>0, :master_or_task_workers=>0, :active_latest_update=>nil, :idle_workers=>0, :idle_taskworkers=>0, :active_masters=>0}}

How can I tell the 'main' manager that there are others skynet managers out there ?

Note: I use a MySQL queue and all Skynet managers/workers successfully gets jobs from it.

Nicolas