Bug 982432 - Faulty exception handling in beaker-sync-tasks
Faulty exception handling in beaker-sync-tasks
Status: CLOSED NEXTRELEASE
Product: Beaker
Classification: Community
Component: scheduler (Show other bugs)
0.13
Unspecified Unspecified
high Severity high (vote)
: 0.14
: ---
Assigned To: beaker-dev-list
tools-bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-08 22:56 EDT by xjia
Modified: 2015-09-18 01:40 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-30 00:50:24 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description xjia 2013-07-08 22:56:05 EDT
Description of problem:
As QA env is in China, it downloads package form beaker engineering so slowly.
so beaker-sync-tasks will costs a lot of time. Finally, this command is stopped by some error.

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

How reproducible:
uncertainty

Steps to Reproduce:
1.su apache -s /bin/bash -c 'beaker-sync-tasks --debug --remote=https://beaker...'
2.
3.

Actual results:
[root@beaker site-packages]# su apache -s /bin/bash -c 'beaker-sync-tasks --debug --remote=https://beaker..'
2013-07-08 13:01:32,747 - Getting the list of tasks from remote and local Beaker..
^Z2013-07-08 13:02:29,684 - Warning: 10 tasks already present may be overwritten with the version from https://beaker.. if the two versions are different
Proceed with task addition? (y/n) y
2013-07-08 13:05:48,240 - Downloading 12832 new tasks
2013-07-08 13:05:52,989 - Downloaded php-CoreOS-php-misc-pr37394-1.0-1.noarch.rpm
<--snip-->
2013-07-08 22:10:04,117 - Downloaded rh-tests-sssd-tests-errata-rhel6-Functional-Tests-for-LDAP-ID-and-KRB5-AUTH-1.0-0.noarch.rpm
2013-07-08 22:10:04,117 - Getting task XML for /CoreOS/sysstat/Regression/bz458811-sar-I-ALL-ia64 from https://beaker..
2013-07-08 22:10:05,819 - Could not get task XML for /CoreOS/sysstat/Regression/bz458811-sar-I-ALL-ia64 from remote. Continuing.
Traceback (most recent call last):
  File "/usr/bin/beaker-sync-tasks", line 9, in <module>
    load_entry_point('bkr.server==0.13.2', 'console_scripts', 'beaker-sync-tasks')()
  File "/usr/lib/python2.6/site-packages/bkr/server/tools/sync_tasks.py", line 338, in main
    task_sync.tasks_add(new_tasks, old_tasks)
  File "/usr/lib/python2.6/site-packages/bkr/server/tools/sync_tasks.py", line 251, in tasks_add
    task_xml = self._get_task_xml('remote', task)
  File "/usr/lib/python2.6/site-packages/bkr/server/tools/sync_tasks.py", line 176, in _get_task_xml
    self.logger.error('Error message: %s' % e.faultString)
AttributeError: 'ProtocolError' object has no attribute 'faultString'


Expected results:
Should be success

Additional info:
Comment 1 Amit Saha 2013-07-08 23:02:19 EDT
(In reply to xjia from comment #0)
> Description of problem:
> As QA env is in China, it downloads package form beaker engineering so
> slowly.
> so beaker-sync-tasks will costs a lot of time. Finally, this command is
> stopped by some error.

The error you saw has nothing to do with the time taken, download speed etc. Yes it is possible that the network connectivity snapped.


> 
> Version-Release number of selected component (if applicable):
> 0.13.2
> 
> How reproducible:
> uncertainty
> 
> Steps to Reproduce:
> 1.su apache -s /bin/bash -c 'beaker-sync-tasks --debug
> --remote=https://beaker...'
> 2.
> 3.
> 
> Actual results:
> [root@beaker site-packages]# su apache -s /bin/bash -c 'beaker-sync-tasks
> --debug --remote=https://beaker..'
> 2013-07-08 13:01:32,747 - Getting the list of tasks from remote and local
> Beaker..
> ^Z2013-07-08 13:02:29,684 - Warning: 10 tasks already present may be
> overwritten with the version from https://beaker.. if the two versions are
> different
> Proceed with task addition? (y/n) y
> 2013-07-08 13:05:48,240 - Downloading 12832 new tasks
> 2013-07-08 13:05:52,989 - Downloaded
> php-CoreOS-php-misc-pr37394-1.0-1.noarch.rpm
> <--snip-->
> 2013-07-08 22:10:04,117 - Downloaded
> rh-tests-sssd-tests-errata-rhel6-Functional-Tests-for-LDAP-ID-and-KRB5-AUTH-
> 1.0-0.noarch.rpm
> 2013-07-08 22:10:04,117 - Getting task XML for
> /CoreOS/sysstat/Regression/bz458811-sar-I-ALL-ia64 from https://beaker..
> 2013-07-08 22:10:05,819 - Could not get task XML for
> /CoreOS/sysstat/Regression/bz458811-sar-I-ALL-ia64 from remote. Continuing.
> Traceback (most recent call last):
>   File "/usr/bin/beaker-sync-tasks", line 9, in <module>
>     load_entry_point('bkr.server==0.13.2', 'console_scripts',
> 'beaker-sync-tasks')()
>   File "/usr/lib/python2.6/site-packages/bkr/server/tools/sync_tasks.py",
> line 338, in main
>     task_sync.tasks_add(new_tasks, old_tasks)
>   File "/usr/lib/python2.6/site-packages/bkr/server/tools/sync_tasks.py",
> line 251, in tasks_add
>     task_xml = self._get_task_xml('remote', task)
>   File "/usr/lib/python2.6/site-packages/bkr/server/tools/sync_tasks.py",
> line 176, in _get_task_xml
>     self.logger.error('Error message: %s' % e.faultString)
> AttributeError: 'ProtocolError' object has no attribute 'faultString'

the faultString attribute is present for  xmlrpclib.Fault exceptions, but looks like not so for xmlrpclib.ProtocolError.

Perhaps, we should just log str(e).



> 
> 
> Expected results:
> Should be success
> 
> Additional info:
Comment 3 Amit Saha 2013-07-30 00:50:24 EDT
This was fixed in 54ba47ec9b68c24cdad117e8e78e7d58f8457289 should be in the upcoming release.

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