-------- Original Message --------
Subject: Job number/job tag visibility into client
Date: Tue, 30 Mar 2010 02:19:41 -0300
From: Lucas Meneghel Rodrigues <lmr(a)redhat.com>
To: James Laska <jlaska(a)redhat.com>, jskladan(a)redhat.com
Hi guys, after researching a bit, here's what I found: the autotest
scheduler will call autoserv instances and pass them a job tag (flag
-P):
03/24 09:51:35 INFO |drone_mana:0497| command = ['nice', '-n',
'10',
'/usr/local/autotest/server/autoserv', '-p', '-m',
u'virtlab105.virt.bos.redhat.com', '-r',
u'/usr/local/autotest/results/541-debug_user/virtlab105.virt.bos.redhat.com',
'-u', u'debug_user', '-l', u'Development (RHEL 6)',
'-P',
u'541-debug_user/virtlab105.virt.bos.redhat.com', '-n',
'/usr/local/autotest/results/drone_tmp/attach.1', '-c']
In this case, the job tag is
541-debug_user/virtlab105.virt.bos.redhat.com
Job number goes on that job tag. This tag is generated by the method
execution_tag, that combines the job id, user and the execution subdir.
The job tag is passed to autoserv, that will execute autotest on a
client. The job tag can be accessed from inside a control file. Every
autotest control file has a job object, that can be accessed through
job.tag.
So, if I understood correctly what Josef explained to me, the solution
is fairly straightforward:
1) In the control file that autoqa generates, we could have code that
writes the job tag in, say, the job keyval:
utils.write_keyval(job.resultsdir, {"job_tag": job.tag})
So this information has permanent storage.
2) The job tag is used where placing the results inside the autotest
server, which makes linking to the job results a piece of cake:
http://autotest.virt.bos.redhat.com/results/556-debug_user/virtlab104.vir...
It's basically os.path.join(results_url, job_tag)
I *think* this is a plan of action. I might have not explained myself
very well, but I did try :) If some of this, or nothing at all, makes
sense, ping me on irc.
Lucas