Author Topic: hostinfo subjobs not working as expected  (Read 5681 times)

jesse

  • Sr. Member
  • ****
  • Posts: 40
hostinfo subjobs not working as expected
« on: January 08, 2009, 06:37:55 AM »
I am using python and qube 5.4.  I am trying to get a list of subjobs from all the workers.  This is where I start:
Code: [Select]
hosts = qb.hostinfo(subjobs=True)
Sometimes the result is rather unexpected:
Code: [Select]
host.processors=0/0,
host.memory=0/12286,
host.swap=0/8388607
Host({
    'description': '',
    'lastupdate': 1231360047,
    'restrictions': '',
    'jobtypes': 'maya,frame,cmdline,cmdrange',
    'locks': 'host.processor_all=0',
    'reason': '',
    'groups': 'psyop',
    'address': '10.130.2.12',
    'flagsstring': 'dedicated,auto_mount,remove_logs,load_profile',
    'properties': 'host.qube_version=5.2-2,host.processor_speed=2667,host.architecture=,host.proxy_mode=proxy,host.os=winnt,host.qube_build=bld-5-2-2007-11-05-0,host.kernel_version=5.2,host.cpus=8,host.worker_mode=service,host.processor_model=,host.processor_make=GenuineIntel',
    'macaddress': '00:30:48:95:BF:DF',
    'stats': '',
    'name': 'lamrndr012',
    'cluster': 'cokeheist_2067P',
    'state': 'down',
    'flags': 29,
    'resources': 'host.processors=0/0,host.memory=0/12286,host.swap=0/8388607'})

At the time I collected this information, this node was running two jobs that occupied 8 of the node's cores.  Somehow these subjobs are invisible to the hostinfo command.  The qube Gui seems to see the subjobs correctly.

Any help would be appreciated.
Thanks,
jesse

jesse

  • Sr. Member
  • ****
  • Posts: 40
Re: hostinfo subjobs not working as expected
« Reply #1 on: January 09, 2009, 10:52:07 PM »
Ah, I figured out my specific problem.  I assumed this command would return a list of discreet hosts, but that is not how it works.

In the instances where I would see "host.processors=0/0" I would also get another entry in the hosts array with the correct information.  If I cull these duds I end up with a fairly good list.  Still sometimes the array returned from qb.hostinfo(subjobs=True) will contain will contain duplicate host entries but each entry will have a different set of subjobs.

This must just be related to asking for the subjobs.

Well, I'm sorted now that I no how to work around this problem.

Cheers,
jesse

Scot Brew

  • Hero Member
  • *****
  • Posts: 272
    • PipelineFX
Re: hostinfo subjobs not working as expected
« Reply #2 on: January 17, 2009, 05:29:03 AM »
We're glad to hear that you worked through the issue. 

As for the second part, if you do run qb.hostinfo() and get entries with duplicate hostnames, please check the mac address for uniqueness.  It should also show up if you run qbhosts from the commandline.  (The issue is a result of a change in the MAC address algorithm between Qube 5.2 and 5.3).  To address it, use "qbadmin worker --remove <hostname> and then do a "qbadmin worker --clearbanned".

The QubeGUI uses qb.hostinfo() and the other python API calls in the qb modules.  The results it gets should match what you get from the qb python calls.