Bug 701566 - dr and sr commands throws error
Summary: dr and sr commands throws error
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Update Infrastructure for Cloud Providers
Classification: Red Hat
Component: Tools
Version: 2.0
Hardware: x86_64
OS: Linux
urgent
urgent
Target Milestone: ---
: ---
Assignee: Jay Dobies
QA Contact: wes hayutin
URL:
Whiteboard:
Depends On:
Blocks: 688298 rhui-20
TreeView+ depends on / blocked
 
Reported: 2011-05-03 08:53 UTC by Kedar Bidarkar
Modified: 2012-05-31 12:52 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-05-31 12:52:40 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Kedar Bidarkar 2011-05-03 08:53:36 UTC
Description of problem:
------------------------------------------------------------------------------
             -= Red Hat Update Infrastructure Management Tool =-


-= Synchronization Status =-

   dr  display repo synchronization schedules
   sr  trigger an individual repository sync
   dc  display CDS synchronization schedules
   sc  trigger an individual CDS sync

                                        Connected: rhui-server1.pnq.redhat.com
------------------------------------------------------------------------------
rhui (sync) => dr


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


-= Repository Synchronization Status =-

Last Refreshed: 18:05:09
(updated every 5 seconds, ctrl+c to exit)

Next Sync                    Last Sync                    Last Result         
------------------------------------------------------------------------------
Red Hat Enterprise Linux Server 6 Releases (RPMs) (6Server-x86_64)

An unexpected error has occurred during the last operation.
More information can be found in /root/.rhui/rhui.log.


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


-= Synchronization Status =-

   dr  display repo synchronization schedules
   sr  trigger an individual repository sync
   dc  display CDS synchronization schedules
   sc  trigger an individual CDS sync

   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: rhui-server1.pnq.redhat.com
------------------------------------------------------------------------------
rhui (sync) => sr


An unexpected error has occurred during the last operation.
More information can be found in /root/.rhui/rhui.log.


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


-= Synchronization Status =-

   dr  display repo synchronization schedules
   sr  trigger an individual repository sync
   dc  display CDS synchronization schedules
   sc  trigger an individual CDS sync

   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: rhui-server1.pnq.redhat.com
------------------------------------------------------------------------------
rhui (sync) => logout


Version-Release number of selected component (if applicable):
OS is rhel6
[root@rhui-server1 pulp]# rpm -qav | grep -e pulp -e rhui
pulp-0.0.171-1.el6.noarch
rh-rhui-tools-2.0.22-1.el6.noarch
pulp-common-0.0.171-1.el6.noarch
pulp-client-0.0.171-1.el6.noarch



How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:

no display of repo sync schedules and no option to set indiviual repo sync schedule.

Expected results:


Additional info:


from /root/.rhui/rhui.log

Connecting to RHUA [rhui-server1.pnq.redhat.com]...
Successfully connected to [rhui-server1.pnq.redhat.com]
Unexpected error caught at the shell level
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/rhui/tools/shell.py", line 73, in safe_listen
    self.listen(clear=first_run)
  File "/usr/lib/python2.6/site-packages/rhui/tools/shell.py", line 92, in listen
    Shell.listen(self)
  File "/usr/lib/python2.6/site-packages/rhui/common/shell.py", line 191, in listen
    item.func(*args, **item.kwargs)
  File "/usr/lib/python2.6/site-packages/rhui/tools/screens/sync.py", line 63, in repo_display
    self._sync_display('-= Repository Synchronization Status =-', self.pulp.repos_with_sync_status, False)
  File "/usr/lib/python2.6/site-packages/rhui/tools/screens/sync.py", line 241, in _sync_display
    self.prompt.write(SYNC_STATUS_LINE % (next_sync, render.format_date(data['last_sync']), self._color_sync_state(data)))
  File "/usr/lib/python2.6/site-packages/rhui/tools/screens/sync.py", line 259, in _color_sync_state
    return self.prompt.color(data['sync_state'], STATE_COLORS[data['sync_state']])
KeyError: None
Unexpected error caught at the shell level
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/rhui/tools/shell.py", line 73, in safe_listen
    self.listen(clear=first_run)
  File "/usr/lib/python2.6/site-packages/rhui/tools/shell.py", line 92, in listen
    Shell.listen(self)
  File "/usr/lib/python2.6/site-packages/rhui/common/shell.py", line 191, in listen
    item.func(*args, **item.kwargs)
  File "/usr/lib/python2.6/site-packages/rhui/tools/screens/sync.py", line 92, in repo_sync
    repo_menu_items.append(select_text % (self._color_sync_state(repo), render.ghetto_format_date(repo['next_scheduled_sync']), repo['name']))
  File "/usr/lib/python2.6/site-packages/rhui/tools/screens/sync.py", line 259, in _color_sync_state
    return self.prompt.color(data['sync_state'], STATE_COLORS[data['sync_state']])
KeyError: None





from /var/log/pulp/pulp.log


2011-05-03 12:41:00,232 [INFO][Thread-72] _sync() @ repo.py:1489 - Sync of rhui-1.2-5Server-x86_64 starting, skip_dict = {}
2011-05-03 12:41:00,232 [INFO][Thread-72] sync() @ repo_sync.py:447 - Limiting download speed to 0 KB/sec per thread. [15] threads will be used
2011-05-03 12:41:00,238 [INFO][Thread-71] _sync() @ repo.py:1489 - Sync of rhui-1.2-5Server-i386 starting, skip_dict = {}
2011-05-03 12:41:00,239 [INFO][Thread-71] sync() @ repo_sync.py:447 - Limiting download speed to 0 KB/sec per thread. [15] threads will be used
2011-05-03 12:41:23,464 [INFO][Thread-72] sync() @ repo_sync.py:463 - YumSynchronizer reported 13 successes, 0 downloads, 0 errors
2011-05-03 12:41:23,462 [INFO][Thread-71] sync() @ repo_sync.py:463 - YumSynchronizer reported 13 successes, 0 downloads, 0 errors
2011-05-03 12:41:23,678 [INFO][Thread-72] _process_repo_images() @ repo_sync.py:260 - No image files to import to repo..
2011-05-03 12:41:23,679 [INFO][Thread-72] add_packages_from_dir() @ repo_sync.py:233 - Loaded group info from /var/lib/pulp//repos/content/dist/rhel/rhui/server/5Server/x86_64/rhui/1.2/os/repodata/comps-rhel5-server-rhui.xml
2011-05-03 12:41:23,680 [INFO][Thread-72] add_packages_from_dir() @ repo_sync.py:253 - Skipping errata imports from sync process
2011-05-03 12:41:23,684 [INFO][Thread-72] _sync() @ repo.py:1502 - Sync returned 13 packages, 0 errata in 23.4512681961 seconds
2011-05-03 12:41:23,685 [INFO][Thread-71] _process_repo_images() @ repo_sync.py:260 - No image files to import to repo..
2011-05-03 12:41:23,687 [INFO][Thread-71] add_packages_from_dir() @ repo_sync.py:233 - Loaded group info from /var/lib/pulp//repos/content/dist/rhel/rhui/server/5Server/i386/rhui/1.2/os/repodata/comps-rhel5-server-rhui.xml
2011-05-03 12:41:23,689 [INFO][Thread-71] add_packages_from_dir() @ repo_sync.py:253 - Skipping errata imports from sync process
2011-05-03 12:41:23,689 [INFO][Thread-71] _sync() @ repo.py:1502 - Sync returned 13 packages, 0 errata in 23.4500730038 seconds
2011-05-03 12:41:23,704 [INFO][Thread-72] _sync() @ repo.py:1513 - 0 old packages to process, 1 new packages to process
2011-05-03 12:41:23,708 [INFO][Thread-71] _sync() @ repo.py:1513 - 0 old packages to process, 0 new packages to process
2011-05-03 12:41:23,723 [INFO][Thread-72] _sync() @ repo.py:1527 - Examining 0 errata from repo rhui-1.2-5Server-x86_64
2011-05-03 12:41:23,726 [INFO][Thread-72] _sync() @ repo.py:1531 - Removing 0 old errata from repo rhui-1.2-5Server-x86_64
2011-05-03 12:41:23,728 [INFO][Thread-71] _sync() @ repo.py:1527 - Examining 0 errata from repo rhui-1.2-5Server-i386
2011-05-03 12:41:23,733 [INFO][Thread-71] _sync() @ repo.py:1531 - Removing 0 old errata from repo rhui-1.2-5Server-i386
2011-05-03 12:41:23,740 [INFO][Thread-72] _sync() @ repo.py:1535 - Adding 0 new errata to repo rhui-1.2-5Server-x86_64
2011-05-03 12:41:23,745 [INFO][Thread-71] _sync() @ repo.py:1535 - Adding 0 new errata to repo rhui-1.2-5Server-i386
2011-05-03 12:41:23,748 [WARNING][Thread-72] schedule() @ task.py:192 - Task eff9acb3-74ef-11e0-8a0b-5452002e70e0: RepoApi._sync(rhui-1.2-5Server-x86_64, synchronizer=<pulp.server.api.repo_sync.YumSynchronizer object at 0x7fac5c5e1250>) missed 1 scheduled runs
2011-05-03 12:41:23,750 [WARNING][Thread-71] schedule() @ task.py:192 - Task f042a497-74ef-11e0-8be9-5452002e70e0: RepoApi._sync(rhui-1.2-5Server-i386, synchronizer=<pulp.server.api.repo_sync.YumSynchronizer object at 0x7fac5c5e1250>) missed 1 scheduled runs
2011-05-03 13:00:00,517 [WARNING][Thread-103] schedule() @ task.py:192 - Task 39cc6ba8-74ec-11e0-b6f7-5452002e70e0: cull_audited_events(, ) missed 1 scheduled runs

Comment 1 Sachin Ghai 2011-05-11 10:46:38 UTC
When I selected the 'dr' to display the repo sync schedule, got same error as mentioned above:

[root@dhcp193-136 rhui]# tail -n 100 /root/.rhui/rhui.log 
Connecting to RHUA [dhcp193-157.pnq.redhat.com]...
Successfully connected to [dhcp193-157.pnq.redhat.com]
Unexpected error caught at the shell level
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/rhui/tools/shell.py", line 73, in safe_listen
    self.listen(clear=first_run)
  File "/usr/lib/python2.6/site-packages/rhui/tools/shell.py", line 92, in listen
    Shell.listen(self)
  File "/usr/lib/python2.6/site-packages/rhui/common/shell.py", line 191, in listen
    item.func(*args, **item.kwargs)
  File "/usr/lib/python2.6/site-packages/rhui/tools/screens/sync.py", line 63, in repo_display
    self._sync_display('-= Repository Synchronization Status =-', self.pulp.repos_with_sync_status, False)
  File "/usr/lib/python2.6/site-packages/rhui/tools/screens/sync.py", line 241, in _sync_display
    self.prompt.write(SYNC_STATUS_LINE % (next_sync, render.format_date(data['last_sync']), self._color_sync_state(data)))
  File "/usr/lib/python2.6/site-packages/rhui/tools/screens/sync.py", line 259, in _color_sync_state
    return self.prompt.color(data['sync_state'], STATE_COLORS[data['sync_state']])
KeyError: None

Comment 2 Jay Dobies 2011-05-24 12:10:33 UTC
Should be fixed in 2.0.23.

Comment 3 Kedar Bidarkar 2011-05-26 07:05:27 UTC
As we face this issue not with a freshly installed setup, planning to wait further and check/track whether this issue persists with 2.0.23 build.

Comment 4 Kedar Bidarkar 2011-05-31 14:19:28 UTC
I have again faced this issue with the build.
build : pulp-180 and rhui-2.0.25 and rhel6

2011-05-31 13:11:52,078 [INFO][Thread-158] sync() @ repo_sync.py:458 - Running createrepo, this may take a few minutes to complete.
2011-05-31 13:11:52,271 [INFO][Thread-158] create_repo() @ util.py:377 - metadata found; taking backup.


2011-05-31 13:11:52,578 [INFO][Thread-158] _create_repo() @ util.py:364 - started repo metadata update
2011-05-31 13:18:56,002 [INFO][Thread-158] _create_repo() @ util.py:370 - [createrepo --database --checksum sha256 -g /var/lib/pulp//repos/content/dist/rhel/rhui/server-6/releases/6Server/x86_64/os/repodata/1a7fc54d30d0d44222742c63069ab0126afef9f160931cc15e564dbe6414f268-comps-rhel6-Server.xml --update /var/lib/pulp//repos/content/dist/rhel/rhui/server-6/releases/6Server/x86_64/os ] on /var/lib/pulp//repos/content/dist/rhel/rhui/server-6/releases/6Server/x86_64/os finished
2011-05-31 13:18:59,343 [INFO][Thread-158] sync() @ repo_sync.py:472 - Createrepo finished in 427.235371828 seconds
2011-05-31 13:18:59,422 [INFO][Thread-158] sync() @ repo_sync.py:474 - YumSynchronizer reported 3396 successes, 0 downloads, 1 errors
2011-05-31 13:25:03,200 [INFO][MainThread] start() @ async.py:276 - Task reply handler, started.
2011-05-31 13:25:03,202 [INFO][asynctaskreplyqueue] connect() @ broker.py:99 - connecting:
{dhcp201-103.englab.pnq.redhat.com:5674}:
transport=SSL
host=dhcp201-103.englab.pnq.redhat.com
port=5674
cacert=/etc/pki/rhua/qpid-ca.crt
clientcert=/etc/pki/rhua/qpid-client.crt
2011-05-31 13:25:03,870 [INFO][asynctaskreplyqueue] connect() @ broker.py:102 - {dhcp201-103.englab.pnq.redhat.com:5674} connected to AMQP

Comment 5 Kedar Bidarkar 2011-05-31 14:21:38 UTC
Throws below error, on trying the 'dr' display sync schedule command after a while.

Comment 6 Kedar Bidarkar 2011-05-31 14:25:03 UTC
But this time it shows the sync schedules, but the pulp.log file generaes the below errors.





2011-05-31 13:44:32,057 [INFO][Dummy-2] initialize() @ connection.py:48 - Attempting Database connection with seeds = dhcp201-103.englab.pnq.redhat.com
2011-05-31 13:44:32,214 [INFO][Dummy-2] initialize() @ connection.py:53 - Database connection established with: seeds = dhcp201-103.englab.pnq.redhat.com, name = pulp_database
2011-05-31 13:44:32,457 [WARNING][Dummy-2] schedule() @ task.py:289 - Task a45fec9e-8bad-11e0-a9be-54520056ed37: cull_audited_events(, ) missed 1 scheduled runs
2011-05-31 13:44:32,458 [WARNING][Dummy-2] schedule() @ task.py:289 - Task a461a1f5-8bad-11e0-a9c9-54520056ed37: cull_history(, ) missed 1 scheduled runs
2011-05-31 13:44:32,491 [ERROR][Dummy-2] clear_all_sync_in_progress() @ repo.py:76 - r = SON([(u'_id', u'repo_id-1'), (u'id', u'repo_id-1'), (u'sync_in_progress', False)])
2011-05-31 13:44:32,492 [ERROR][Dummy-2] clear_all_sync_in_progress() @ repo.py:76 - r = SON([(u'_id', u'rhel-server-5Server-x86_64'), (u'id', u'rhel-server-5Server-x86_64'), (u'sync_in_progress', False)])
2011-05-31 13:44:32,493 [ERROR][Dummy-2] clear_all_sync_in_progress() @ repo.py:76 - r = SON([(u'_id', u'rhui-1.2-5Server-x86_64'), (u'id', u'rhui-1.2-5Server-x86_64'), (u'sync_in_progress', False)])
2011-05-31 13:44:32,493 [ERROR][Dummy-2] clear_all_sync_in_progress() @ repo.py:76 - r = SON([(u'_id', u'rhel-server-6-releases-6Server-x86_64'), (u'id', u'rhel-server-6-releases-6Server-x86_64'), (u'sync_in_progress', True)])
2011-05-31 13:44:32,571 [WARNING][Dummy-2] __init__() @ scheduler.py:124 - IntervalScheduler created with start time more than one interval in the past: 2011-05-30 09:23:45-04:00, 6:00:00
2011-05-31 13:44:32,572 [ERROR][Dummy-2] set_synchronizer() @ repo_sync_task.py:32 - __name__ = pulp.server.api.repo_sync_task
2011-05-31 13:44:32,572 [WARNING][Dummy-2] schedule() @ task.py:289 - Task a47098c7-8bad-11e0-aa2c-54520056ed37: RepoApi._sync(rhel-server-5Server-x86_64, synchronizer=<pulp.server.api.repo_sync.YumSynchronizer object at 0x7f57a8b11190>) missed 5 scheduled runs
2011-05-31 13:44:32,574 [WARNING][Dummy-2] __init__() @ scheduler.py:124 - IntervalScheduler created with start time more than one interval in the past: 2011-05-30 09:23:43-04:00, 6:00:00
2011-05-31 13:44:32,574 [ERROR][Dummy-2] set_synchronizer() @ repo_sync_task.py:32 - __name__ = pulp.server.api.repo_sync_task
2011-05-31 13:44:32,574 [WARNING][Dummy-2] schedule() @ task.py:289 - Task a47349a6-8bad-11e0-aa3d-54520056ed37: RepoApi._sync(rhui-1.2-5Server-x86_64, synchronizer=<pulp.server.api.repo_sync.YumSynchronizer object at 0x7f57a8b11510>) missed 5 scheduled runs
2011-05-31 13:44:32,853 [WARNING][Dummy-2] __init__() @ scheduler.py:124 - IntervalScheduler created with start time more than one interval in the past: 2011-05-30 09:23:44-04:00, 6:00:00
2011-05-31 13:44:32,854 [ERROR][Dummy-2] set_synchronizer() @ repo_sync_task.py:32 - __name__ = pulp.server.api.repo_sync_task
2011-05-31 13:44:32,854 [WARNING][Dummy-2] schedule() @ task.py:289 - Task a49def30-8bad-11e0-ab55-54520056ed37: RepoApi._sync(rhel-server-6-releases-6Server-x86_64, synchronizer=<pulp.server.api.repo_sync.YumSynchronizer object at 0x7f57a8b11750>) missed 5 scheduled runs
2011-05-31 13:44:32,891 [WARNING][Dummy-2] __init__() @ scheduler.py:124 - IntervalScheduler created with start time more than one interval in the past: 2011-05-30 14:52:26-04:00, 6:00:00
2011-05-31 13:44:32,892 [WARNING][Dummy-2] schedule() @ task.py:289 - Task a4a3b487-8bad-11e0-ab7a-54520056ed37: CdsApi.cds_sync(dhcp201-162.englab.pnq.redhat.com, ) missed 4 scheduled runs






The /root/.rhui/rhui.log file throws the below error.

Connecting to RHUA [dhcp201-103.englab.pnq.redhat.com]...
Successfully connected to [dhcp201-103.englab.pnq.redhat.com]
Unexpected error caught at the shell level
Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/rhui/tools/shell.py", line 73, in safe_listen
    self.listen(clear=first_run)
  File "/usr/lib/python2.6/site-packages/rhui/tools/shell.py", line 92, in listen
    Shell.listen(self)
  File "/usr/lib/python2.6/site-packages/rhui/common/shell.py", line 191, in listen
    item.func(*args, **item.kwargs)
  File "/usr/lib/python2.6/site-packages/rhui/tools/screens/sync.py", line 63, in repo_display
    self._sync_display('-= Repository Synchronization Status =-', self.pulp.repos_with_sync_status, False)
  File "/usr/lib/python2.6/site-packages/rhui/tools/screens/sync.py", line 196, in _sync_display
    data_sets = retrieve_func()
  File "/usr/lib/python2.6/site-packages/rhui/tools/pulp_api.py", line 198, in repos_with_sync_status
    redhat_repos = self.redhat_repo_list()
  File "/usr/lib/python2.6/site-packages/rhui/tools/pulp_api.py", line 153, in redhat_repo_list
    raise e
ServerRequestError: (500, '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">\n<html><head>\n<title>500 Internal Server Error</title>\n</head><body>\n<h1>Internal Server Error</h1>\n<p>The server encountered an internal error or\nmisconfiguration and was unable to complete\nyour request.</p>\n<p>Please contact the server administrator,\n root@localhost and inform them of the time the error occurred,\nand anything you might have done that may have\ncaused the error.</p>\n<p>More information about this error may be available\nin the server error log.</p>\n<hr>\n<address>Apache/2.2.15 (Red Hat) Server at dhcp201-103.englab.pnq.redhat.com Port 443</address>\n</body></html>\n', None)

Comment 7 wes hayutin 2011-06-06 21:15:27 UTC
added to rhui-20 tracker

Comment 8 Jay Dobies 2011-06-16 14:18:28 UTC
Should be fixed in 0.190.

Comment 9 Kedar Bidarkar 2011-06-23 13:13:30 UTC
Currently, do not face this issue with the new builds for a while now, will re-open if required.

Comment 10 wes hayutin 2011-08-01 21:38:52 UTC
moving to release pending

Comment 11 wes hayutin 2012-05-31 12:52:40 UTC
closing out, product released


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