Bug 876752 - [RFE] machine-test should filter out excluded families
Summary: [RFE] machine-test should filter out excluded families
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Retired
Component: command line
Version: 0.9
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: 0.11
Assignee: Dan Callaghan
QA Contact: Raymond Mancy
URL:
Whiteboard: Scheduler
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-11-14 21:10 UTC by Bill Peck
Modified: 2018-02-06 00:41 UTC (History)
9 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2013-01-17 04:34:15 UTC
Embargoed:


Attachments (Terms of Use)

Description Bill Peck 2012-11-14 21:10:17 UTC
Description of problem:
bkr machine-test --machine FQDN will schedule a job potentially against families which have been excluded for that host.

The excluded families should not be included since they will just abort.

Version-Release number of selected component (if applicable):
0.9.4

Comment 1 Bill Peck 2012-11-16 19:21:04 UTC
On Gerrit for review..

http://gerrit.beaker-project.org/#/c/1501/

Comment 2 Dan Callaghan 2012-11-26 04:10:05 UTC
Thanks for the patch, Bill.

Comment 5 Raymond Mancy 2013-01-04 00:53:08 UTC
Couple of issues, first this traceback:

2013-01-03 19:23:29,157 bkr.server.xmlrpccontroller ERROR Error handling XML-RPC method
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/bkr/server/xmlrpccontroller.py", line 54, in RPC2
    response = self.process_rpc(method,params)
  File "/usr/lib/python2.6/site-packages/bkr/server/xmlrpccontroller.py", line 43, in process_rpc
    response = obj(*params)
  File "<string>", line 3, in get_osmajor_arches
  File "/usr/lib/python2.6/site-packages/turbogears/identity/conditions.py", line 249, in require
    return fn(self, *args, **kwargs)
  File "/usr/lib/python2.6/site-packages/bkr/server/systems.py", line 274, in get_osmajor_arches
    query = query.filter(Distro._tags.any(DistroTag.tag.in_(tags)))
NameError: global name 'Distro' is not defined

Secondly, we can still get ine set the tag to STABLE if no tag is set explicitly. This seems reasonable, but the recipe will fail if the STABLE tag does not exist. If by default we specified no tag then the recipe would run, but then we could be testing the distro as much as we are the machine :-S 

I think the get_os_major_arches should query on tag STABLE, and if no distros are returned then we cannot run the test.

Comment 6 Dan Callaghan 2013-01-04 04:27:49 UTC
(In reply to comment #5)
> Couple of issues, first this traceback:
> 
> 2013-01-03 19:23:29,157 bkr.server.xmlrpccontroller ERROR Error handling
> XML-RPC method
> Traceback (most recent call last):
>   File "/usr/lib/python2.6/site-packages/bkr/server/xmlrpccontroller.py",
> line 54, in RPC2
>     response = self.process_rpc(method,params)
>   File "/usr/lib/python2.6/site-packages/bkr/server/xmlrpccontroller.py",
> line 43, in process_rpc
>     response = obj(*params)
>   File "<string>", line 3, in get_osmajor_arches
>   File "/usr/lib/python2.6/site-packages/turbogears/identity/conditions.py",
> line 249, in require
>     return fn(self, *args, **kwargs)
>   File "/usr/lib/python2.6/site-packages/bkr/server/systems.py", line 274,
> in get_osmajor_arches
>     query = query.filter(Distro._tags.any(DistroTag.tag.in_(tags)))
> NameError: global name 'Distro' is not defined

http://gerrit.beaker-project.org/1599

> Secondly, we can still get ine set the tag to STABLE if no tag is set
> explicitly. This seems reasonable, but the recipe will fail if the STABLE
> tag does not exist. If by default we specified no tag then the recipe would
> run, but then we could be testing the distro as much as we are the machine
> :-S 
> 
> I think the get_os_major_arches should query on tag STABLE, and if no
> distros are returned then we cannot run the test.

Hmm the hardcoded 'STABLE' tag comes from the BeakerWorkflow base class. I see what you mean, it's problematic if we don't filter for 'STABLE' when picking families/arches but then we do include the filter in the job XML. Previously the machine-test command had hardcoded 'Active', but Bill took it out. I think we really need to get rid of all of these hardcoded tags, since they have no meaning outside of Red Hat, but that is a bigger issue. For now I am thinking I should restore the hardcoded 'Active' that we had before, since at least it's not a regression then.

Comment 7 Dan Callaghan 2013-01-04 06:49:06 UTC
(In reply to comment #6)
> I think we really need to get rid of all of these hardcoded tags, since
> they have no meaning outside of Red Hat, but that is a bigger issue.

Turns out that's not true, STABLE does have meaning for all Beaker sites, not just Red Hat -- it's just not documented properly (filed bug 891827).

So we can hardcode STABLE, we just need to do it properly:

http://gerrit.beaker-project.org/1600

Comment 9 Raymond Mancy 2013-01-10 05:42:47 UTC
Verified that it does not run a job on excluded distros. It does however give the following:

<job retention_tag="Scratch"><whiteboard>Test hx-pp.example.com</whiteboard></job>
<Fault 1: "<class 'bkr.common.bexceptions.BX'>:'No RecipeSets! You can not have a Job with no recipeSets!'">
Submitted: []


That's a different problem though, and have opened a BZ for it 893878

Comment 10 Dan Callaghan 2013-01-17 04:34:15 UTC
Beaker 0.11.0 has been released.


Note You need to log in before you can comment on or make changes to this bug.