Bug 862970

Summary: bkr task-details reports destructive=False and nda=False when it is not known
Product: [Retired] Beaker Reporter: Dan Callaghan <dcallagh>
Component: testsAssignee: Qixiang Wan <qwan>
Status: CLOSED CURRENTRELEASE QA Contact: Dan Callaghan <dcallagh>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 0.9CC: asaha, dcallagh, mishin, rglasz, rmancy
Target Milestone: 0.10.0   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: TaskLibrary
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 869957 (view as bug list) Environment:
Last Closed: 2012-11-22 06:44:03 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 869957    

Description Dan Callaghan 2012-10-04 04:07:53 UTC
bkr task-details reports destructive=False and nda=False for tasks where the field is missing in testinfo.desc (therefore the value is stored by Beaker as NULL/None, not False). This is dangerous because it means Beaker is reporting a test as not destructive, or not under NDA, when it does not know that.

See also bug 749512.

Originally this was probably to work around problems with encoding None/nil in XML-RPC responses. I don't think that is an issue anymore with Python 2.4+.

Comment 2 Dan Callaghan 2012-10-25 06:01:25 UTC
It turns out the nda field is never populated or displayed anywhere except in bkr task-details, so it is useless. So for this bug we should just remove the nda field entirely.

The original problem still applies to the destructive field though. We should report destructive=None when it's not known.

Comment 3 Qixiang Wan 2012-10-25 07:48:44 UTC
patch post:

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

With this fix, bkr task-details will report destructive:None and nda: None when these two fields are missing in testinfo.desc (which means beaker store the value as NULL).

mysql> select name, destructive, nda from task where name = "/distribution/install";
+-----------------------+-------------+------+
| name                  | destructive | nda  |
+-----------------------+-------------+------+
| /distribution/install |        NULL | NULL |
+-----------------------+-------------+------+
1 row in set (0.00 sec)

Before fix:

# bkr task-details /distribution/install

/distribution/install {'excluded_osmajor': [], 'creation_date': '2012-10-18 08:55:50', 'bugzillas': [], 'runfor': [], 'path': '/mnt/tests/distribution/install', 'owner': 'Bill Peck <bpeck>', 'rpm': 'beaker-distribution-install-1.10-15.noarch.rpm', 'id': 1, 'update_date': '2012-10-18 08:55:50', 'priority': 'Manual', 'version': '1.10-15', 'description': 'Reports back on the Installation that was done', 'repo': 'None', 'uploader': 'admin', 'oldrpm': None, 'destructive': False, 'types': [], 'excluded_arch': [], 'name': '/distribution/install', 'license': 'GPL', 'nda': False, 'required': ['@desktop-platform-devel', '@development', '@development-libs', '@development-tools', '@server-platform-devel', 'expect', 'gcc', 'libxml2-python', 'make', 'nfs-utils', 'ntp', 'procmail', 'pyOpenSSL', 'redhat-lsb', 'wget'], 'max_time': 1200, 'valid': True}

After fix:
# bkr task-details /distribution/install

/distribution/install {'excluded_osmajor': [], 'creation_date': '2012-10-18 08:55:50', 'bugzillas': [], 'runfor': [], 'path': '/mnt/tests/distribution/install', 'owner': 'Bill Peck <bpeck>', 'rpm': 'beaker-distribution-install-1.10-15.noarch.rpm', 'id': 1, 'update_date': '2012-10-18 08:55:50', 'priority': 'Manual', 'version': '1.10-15', 'description': 'Reports back on the Installation that was done', 'repo': 'None', 'uploader': 'admin', 'oldrpm': None, 'destructive': None, 'types': [], 'excluded_arch': [], 'name': '/distribution/install', 'license': 'GPL', 'nda': None, 'required': ['@desktop-platform-devel', '@development', '@development-libs', '@development-tools', '@server-platform-devel', 'expect', 'gcc', 'libxml2-python', 'make', 'nfs-utils', 'ntp', 'procmail', 'pyOpenSSL', 'redhat-lsb', 'wget'], 'max_time': 1200, 'valid': True}

Comment 4 Qixiang Wan 2012-10-25 08:37:53 UTC
Bug 869957 is cloned to track the useless nda issue.

Comment 6 Dan Callaghan 2012-11-09 05:50:55 UTC
Verified that we get 'destructive': None and no destructive attribute in the XML for /distribution/install, whereas for /distribution/beaker/Sanity/sync-set_block-tests we get 'destructive': False and destructive="false".

Comment 7 Raymond Mancy 2012-11-22 06:44:03 UTC
This has now been released