Bug 1024452 - Misleading repo sync status displayed when repo sync failed
Summary: Misleading repo sync status displayed when repo sync failed
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Update Infrastructure for Cloud Providers
Classification: Red Hat
Component: Tools
Version: 2.1.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 2.1.3
Assignee: dgao
QA Contact: Ina Panova
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-29 16:52 UTC by Ina Panova
Modified: 2013-12-17 20:10 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
This update fixes the synchronization status for a repository that has an error during synchronization. Previously the status was displayed as 'Never' until the first time the repository was successfully synchronize. The status now displays the error that has occurred.
Clone Of:
Environment:
Last Closed: 2013-12-17 20:10:45 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:1854 0 normal SHIPPED_LIVE Red Hat Update Infrastructure 2.1.3 bug fix update 2013-12-18 01:07:53 UTC

Description Ina Panova 2013-10-29 16:52:17 UTC
Description of problem:

When a new RH repo was added and then synced, display repo sync summary screen does not show correct status of 'Last Result' in case repo was not successfully synced, i.e. it shows 'Never' instead of 'Error'

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

rh-rhui-tools-2.1.27-1.el6_4.noarch

How reproducible:
Always

Steps to reproduce:
1) Add RH repo ( I used Red Hat Update Infrastructure 1.2 (RPMs) repo in order to reproduce the issue)
2) Sync repo
3) Check 'display repo sync summary' screen 

rhui (sync) => dr



------------------------------------------------------------------------------
             -= Red Hat Update Infrastructure Management Tool =-


-= Repository Synchronization Status =-

Last Refreshed: 12:24:26
(updated every 5 seconds, ctrl+c to exit)

Next Sync                    Last Sync                    Last Result         
------------------------------------------------------------------------------
Red Hat Update Infrastructure 1.2 (RPMs) (5Server-i386)
In Progress                  Never                        Never               
Downloading Metadata

Red Hat Update Infrastructure 1.2 (RPMs) (5Server-x86_64)
In Progress                  Never                        Never               
Downloading Metadata


                                                   Connected: rhua.example.com
------------------------------------------------------------------------------
             -= Red Hat Update Infrastructure Management Tool =-


-= Repository Synchronization Status =-

Last Refreshed: 12:25:53
(updated every 5 seconds, ctrl+c to exit)

Next Sync                    Last Sync                    Last Result         
------------------------------------------------------------------------------
Red Hat Update Infrastructure 1.2 (RPMs) (5Server-i386)
10-29-2013 18:23             Never                        Never               

Red Hat Update Infrastructure 1.2 (RPMs) (5Server-x86_64)
10-29-2013 18:23             Never                        Never               


                                                   Connected: rhua.example.com
------------------------------------------------------------------------------


------------------------------------------------------------------------------
             -= Red Hat Update Infrastructure Management Tool =-


-= Synchronization Status =-

   dr  display repo sync summary
   vr  view the details of the last repository sync
   sr  sync an individual repository immediately
   dc  display CDS sync summary
   vc  view the details of the last CDS sync
   sc  sync an individual CDS immediately
   sl  sync a CDS cluster immediately

   logout
       removes stored authentication credentials and exits

   <   move to the previous screen
   ^, home
       move to the home screen
   /, clear
       clears the screen
   ?, help
       display help
   q, quit, exit
       exit

                                                   Connected: rhua.example.com
------------------------------------------------------------------------------





Meanwhile other sync screens reflect the proper and correct state of Last Sync:

rhui (sync) => vr

Select a repository: 
  1  - Red Hat Update Infrastructure 1.2 (RPMs) (5Server-i386)
  2  - Red Hat Update Infrastructure 1.2 (RPMs) (5Server-x86_64)
Enter value (1-2) or 'b' to abort: 1

  Start Time:     10-29-2013 12:24
  Finish Time:    10-29-2013 12:25
  Elapsed Time:   0:01:37
  Result:         Error
  Exception:      Traceback (most recent call last):

  File "/usr/lib/python2.6/site-packages/grinder/activeobject.py", line 429, in process
    retval = method(*args, **kwargs)

  File "/usr/lib/python2.6/site-packages/grinder/YumInfo.py", line 99, in getDownloadItems
    self.__getRepoData()

  File "/usr/lib/python2.6/site-packages/grinder/YumInfo.py", line 181, in __getRepoData
    for ftype in self.__getRepoXmlFileTypes():

  File "/usr/lib/python2.6/site-packages/grinder/Retry.py", line 44, in wrapped
    raise e

RepoError: Cannot retrieve repository metadata (repomd.xml) for repository: . Please verify its path and try again

  Traceback:
Traceback (most recent call last):

  File "/usr/lib/python2.6/site-packages/pulp/server/tasking/task.py", line 424, in run
    result = self.callable(*self.args, **self.kwargs)

  File "/usr/lib/python2.6/site-packages/pulp/server/api/repo_sync.py", line 272, in _sync
    progress_callback, synchronizer, max_speed, threads)

  File "/usr/lib/python2.6/site-packages/pulp/server/api/repo_sync.py", line 355, in fetch_content
    progress_callback, max_speed, threads)

  File "/usr/lib/python2.6/site-packages/pulp/server/api/synchronizers.py", line 163, in sync
    max_speed=max_speed, threads=threads)

  File "/usr/lib/python2.6/site-packages/pulp/server/api/synchronizers.py", line 793, in remote
    verify_options=verify_options)

  File "/usr/lib/python2.6/site-packages/grinder/RepoFetch.py", line 144, in fetchYumRepo
    self.setupYumInfo()

  File "/usr/lib/python2.6/site-packages/grinder/RepoFetch.py", line 108, in setupYumInfo
    info.setUp()

  File "/usr/lib/python2.6/site-packages/grinder/YumInfo.py", line 355, in setUp
    skip=self.skip)

  File "/usr/lib/python2.6/site-packages/grinder/activeobject.py", line 82, in __call__
    return self.object(self, *args, **kwargs)

  File "/usr/lib/python2.6/site-packages/grinder/activeobject.py", line 267, in __call__
    return self.__call(method, args, kwargs)

  File "/usr/lib/python2.6/site-packages/grinder/activeobject.py", line 243, in __call
    return self.__rmi(method.name, args, kwargs)

  File "/usr/lib/python2.6/site-packages/grinder/activeobject.py", line 136, in __rmi
    raise Exception(ex)

Exception: Traceback (most recent call last):

  File "/usr/lib/python2.6/site-packages/grinder/activeobject.py", line 429, in process
    retval = method(*args, **kwargs)

  File "/usr/lib/python2.6/site-packages/grinder/YumInfo.py", line 99, in getDownloadItems
    self.__getRepoData()

  File "/usr/lib/python2.6/site-packages/grinder/YumInfo.py", line 181, in __getRepoData
    for ftype in self.__getRepoXmlFileTypes():

  File "/usr/lib/python2.6/site-packages/grinder/Retry.py", line 44, in wrapped
    raise e

RepoError: Cannot retrieve repository metadata (repomd.xml) for repository: . Please verify its path and try again

------------------------------------------------------------------------------
             -= Red Hat Update Infrastructure Management Tool =-


-= Synchronization Status =-

   dr  display repo sync summary
   vr  view the details of the last repository sync
   sr  sync an individual repository immediately
   dc  display CDS sync summary
   vc  view the details of the last CDS sync
   sc  sync an individual CDS immediately
   sl  sync a CDS cluster immediately

                                                   Connected: rhua.example.com
------------------------------------------------------------------------------
rhui (sync) => sr

Select one or more repositories to schedule to be synchronized before its scheduled time.
The sync will happen as soon as possible depending on other tasks that may be executing
in the RHUI. Only repositories that are not currently synchronizing are displayed.

         Last Result         Next Sync         Repository
         ------------------------------------------

  -  1 : Error      10-29-2013 18:23  Red Hat Update Infrastructure 1.2 (RPMs) (5Server-i386)
  -  2 : Error      10-29-2013 18:23  Red Hat Update Infrastructure 1.2 (RPMs) (5Server-x86_64)
Enter value (1-2) to toggle selection, 'c' to confirm selections, or '?' for more commands: ^C


Actual results:

display repo sync summary screen shows Last Result 'Never' in case of unsuccessful sync

Expected results:
display repo sync summary screen should show Last Result 'Error' in case of unsuccessful sync.

Comment 1 dgao 2013-10-31 16:13:06 UTC
https://github.com/splice/pulp/commit/7f842dff112d5409ba223cf62dc5c36a08580cfc

cloude commit:8d20cab3464ad1b0092f99cafb1416154d897ded

Comment 2 Ina Panova 2013-11-06 09:55:12 UTC
------------------------------------------------------------------------------
             -= Red Hat Update Infrastructure Management Tool =-


-= Repository Synchronization Status =-

Last Refreshed: 04:52:57
(updated every 5 seconds, ctrl+c to exit)

Next Sync                    Last Sync                    Last Result         
------------------------------------------------------------------------------
Red Hat Update Infrastructure 1.2 (RPMs) (5Server-i386)
11-06-2013 10:50             Never                        Error      

Red Hat Update Infrastructure 1.2 (RPMs) (5Server-x86_64)
11-06-2013 10:50             Never                        Error      


                                                   Connected: rhua.example.com


tested in 
pulp-0.0.263-40.el6_5.noarch
rh-rhui-tools-2.1.28-1.el6_5.noarch
rh-rhui-tools-debug-script-2.1.28-1.el6_5.noarch

Move to Verified.

Comment 4 errata-xmlrpc 2013-12-17 20:10:45 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2013-1854.html


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