Project

General

Profile

Feature #21902

Add a jobsub.ini option so that we know which collectors to use

Added by Shreyas Bhat about 1 month ago. Updated 21 days ago.

Status:
Closed
Priority:
High
Assignee:
Category:
JobSub Server RPM
Target version:
Start date:
02/14/2019
Due date:
% Done:

0%

Estimated time:
Stakeholders:
Duration:

Description

Right now, in the collector_host function, we run "condor_status -collector -af Machine" and pick a collector from that list (line 413, condor_commands.py). GCO requests that we instead read that in from the config. GCO added a couple of collectors that don't know about the jobsub schedds (gpccb01.fnal.gov, gpccb02.fnal.gov).

I think it's as easy as this:

def collector_host():
    """ 
    return the condor collector host name
    """ 
    jcp = JobsubConfigParser.JobsubConfigParser()

    try:
        # NEW STUFF
        hosts = jcp.get('default', 'collector_hosts')
        host_list = hosts.split(',')
        # END NEW STUFF

        while '' in host_list:
            host_list.remove('')
        host = host_list[randint(0, len(host_list) - 1)]
        logger.log('choosing %s from %s' % (host, host_list))
        return host
    except:
        tbk = traceback.format_exc()
        logger.log(tbk)
        logger.log(tbk, severity=logging.ERROR, logfile='condor_commands')
        logger.log(tbk, severity=logging.ERROR, logfile='error')

and then add in the jobsub.ini file, in the [default] section:

collector_hosts=gpcollector03.fnal.gov,gpcollector04.fnal.gov

If this works, we'd like to push this out in a new jobsub_server release (1.2.9.1?) in the next day or two.

History

#1 Updated by Shreyas Bhat about 1 month ago

Correction: The ini entry would be this if we're comma-separated:

collector_hosts='gpcollector03.fnal.gov,gpcollector04.fnal.gov'

If we're not, like most of the rest of the file:

collector_hosts= 'gpcollector03.fnal.gov gpcollector04.fnal.gov'

Then the host_list definition line would be changed to:

host_list = hosts.split() 

#2 Updated by Dennis Box about 1 month ago

  • Target version changed from v1.2.9 to V1.2.9.1

#3 Updated by Dennis Box about 1 month ago

  • Assignee changed from Dennis Box to Shreyas Bhat
  • Status changed from New to Feedback

see code changes in branch 21902

#4 Updated by Shreyas Bhat about 1 month ago

That looks good to me. Joe said we should just do a quick couple of tests on dev and then push to production if those work.

#5 Updated by Shreyas Bhat about 1 month ago

  • Assignee changed from Shreyas Bhat to Dennis Box
  • Status changed from Feedback to Accepted

#6 Updated by Dennis Box 21 days ago

  • Status changed from Accepted to Resolved

#7 Updated by Dennis Box 21 days ago

  • Status changed from Resolved to Closed


Also available in: Atom PDF