Bug 790181 - cds status doesn't reflect the latest sync task
Summary: cds status doesn't reflect the latest sync task
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: nodes
Version: 1.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Jay Dobies
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-13 20:52 UTC by Pradeep Kilambi
Modified: 2012-02-24 20:18 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:


Attachments (Terms of Use)

Description Pradeep Kilambi 2012-02-13 20:52:57 UTC
Description of problem:

cds status doesnt seem to show the newest task status in the "Most Recent Sync Tasks" output..Here is my flow:

1. schedule a cds sync( that failed)

2. correct the issue and re sync to see a success

3. now list the status info and see this:

The last sync shown is @ 2012-02-13 15:39:24-05:00

The most recent sync task was @ Finish Time:    2012-02-13 15:29:51-05:00


[pkilambi@prad ~]$ pulp-admin cds status --hostname f16-cds.usersys.redhat.com
+------------------------------------------+
                 CDS Status
+------------------------------------------+

Name                	f16-cds.usersys.redhat.com
Hostname            	f16-cds.usersys.redhat.com
Description         	None                     
Cluster             	None                     
Sync Schedule       	None                     
Repos               	testmrg_i386             
Next Sync           	Not Scheduled            
Last Sync           	2012-02-13 15:39:24-05:00
Status:
   Responding       	Yes                      
   Last Heartbeat   	2012-02-13 20:41:54.856127+00:00

+------------------------------------------+
           Most Recent Sync Tasks
+------------------------------------------+
Start Time:     2012-02-13 15:29:50-05:00
Finish Time:    2012-02-13 15:29:51-05:00
Result:         Error
Exception:      Error on the CDS during sync; check the server log for more information
Traceback:
Traceback (most recent call last):

  File "/home/pkilambi/code/pulp/src/pulp/server/tasking/task.py", line 420, in run
    result = self.callable(*self.args, **self.kwargs)

  File "/home/pkilambi/code/pulp/src/pulp/server/api/cds.py", line 573, in cds_sync
    self.dispatcher.sync(cds, payload)

  File "/home/pkilambi/code/pulp/src/pulp/server/cds/dispatcher.py", line 137, in sync
    self._send(stub.sync, data)

  File "/home/pkilambi/code/pulp/src/pulp/server/cds/dispatcher.py", line 169, in _send
    result = func(*args)

  File "/usr/lib/python2.7/site-packages/gofer/rmi/stub.py", line 72, in __call__
    return self.stub._send(request, opts)

  File "/usr/lib/python2.7/site-packages/gofer/rmi/stub.py", line 133, in _send
    return self.__send(request, options)

  File "/usr/lib/python2.7/site-packages/gofer/rmi/stub.py", line 164, in __send
    any=opts.any)

  File "/usr/lib/python2.7/site-packages/gofer/rmi/policy.py", line 144, in send
    return self.__getreply(sn, reader)

  File "/usr/lib/python2.7/site-packages/gofer/rmi/policy.py", line 181, in __getreply
    return self.__onreply(envelope)

  File "/usr/lib/python2.7/site-packages/gofer/rmi/policy.py", line 197, in __onreply
    raise RemoteException.instance(reply)

PulpException: Error on the CDS during sync; check the server log for more information


The recent sync tasks should report a success and not failure..

/var/log/pulp-cds/gofer.log

2012-02-13 15:38:34,561 [INFO][worker-0] _sync_repo() @ cdslib.py:318 - Synchronizing repo at [https://prad.rdu.redhat.com//pulp/repos/content/dist/rhel/rhui/server/5/5Server/i386/mrg-g/2.0/os]
2012-02-13 15:38:34,562 [INFO][worker-0] _sync_repo() @ cdslib.py:324 - Synchronizing repo [testmrg_i386] from [https://prad.rdu.redhat.com//pulp/repos/content/dist/rhel/rhui/server/5/5Server/i386/mrg-g/2.0/os] to [/var/lib/pulp-cds/repos/content/dist/rhel/rhui/server/5/5Server/i386/mrg-g/2.0/os]
2012-02-13 15:39:21,332 [INFO][worker-0] _sync_repo() @ cdslib.py:361 - Successfully finished synccing [https://prad.rdu.redhat.com//pulp/repos/content/dist/rhel/rhui/server/5/5Server/i386/mrg-g/2.0/os]
2012-02-13 15:39:21,333 [INFO][worker-0] update_cluster_membership() @ cdslib.py:236 - Received cluster membership update; Cluster [None], Members []
2012-02-13 15:39:21,334 [INFO][worker-0] update_cluster_membership() @ cdslib.py:247 - No changes needed to be made to cluster memberships


/var/log/pulp/pulp.log

2012-02-13 15:39:24,275 17578:139635946673920: pulp.server.tasking.task:INFO: task:456 Task succeeded: Task b46f049e-5682-11e1-8111-0023ae793dbc: CdsApi.cds_sync(f16-cds.usersys.redhat.com, )

Comment 1 Jay Dobies 2012-02-13 21:14:37 UTC
I found the issue while talking to Pradeep about it before he filed it:

<jdob> awww awwwww, LAME... I sort them by finish time but its sorted ascending
<jdob> the intention was to sort descending and show the most recent first, then the default is to only show the top one on that list

Should be a very quick fix.

Comment 2 Jay Dobies 2012-02-14 20:53:01 UTC
commit 6427c71fc52b935f9ff582eb57ca7f8bc5ba89b2
Author: Jay Dobies <jason.dobies>
Date:   Tue Feb 14 15:51:59 2012 -0500

    The most recent entry should be first, so reverse the sort.

src/pulp/client/admin/plugins/cds.py

Comment 3 Jeff Ortel 2012-02-17 17:17:55 UTC
build: 0.267

Comment 4 Preethi Thomas 2012-02-21 19:00:09 UTC
verified

[root@preethi ~]# pulp-admin cds status --hostname=f16-cds.usersys.redhat.com
+------------------------------------------+
                 CDS Status
+------------------------------------------+

Name                	f16-cds.usersys.redhat.com
Hostname            	f16-cds.usersys.redhat.com
Description         	None                     
Cluster             	None                     
Sync Schedule       	None                     
Repos               	spacwalk                 
Next Sync           	In Progress              
Last Sync           	2012-02-21 13:52:24-05:00
Status:
   Responding       	Yes                      
   Last Heartbeat   	2012-02-21 19:08:04.083462+00:00

+------------------------------------------+
           Most Recent Sync Tasks
+------------------------------------------+
Start Time:     2012-02-21 13:52:20-05:00
Finish Time:    2012-02-21 13:52:24-05:00
Result:         Error
Exception:      Error on the CDS during sync; check the server log for more information
Traceback:
Traceback (most recent call last):

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

  File "/usr/lib/python2.7/site-packages/pulp/server/api/cds.py", line 573, in cds_sync
    self.dispatcher.sync(cds, payload)

  File "/usr/lib/python2.7/site-packages/pulp/server/cds/dispatcher.py", line 137, in sync
    self._send(stub.sync, data)

  File "/usr/lib/python2.7/site-packages/pulp/server/cds/dispatcher.py", line 169, in _send
    result = func(*args)

  File "/usr/lib/python2.7/site-packages/gofer/rmi/stub.py", line 72, in __call__
    return self.stub._send(request, opts)

  File "/usr/lib/python2.7/site-packages/gofer/rmi/stub.py", line 133, in _send
    return self.__send(request, options)

  File "/usr/lib/python2.7/site-packages/gofer/rmi/stub.py", line 164, in __send
    any=opts.any)

  File "/usr/lib/python2.7/site-packages/gofer/rmi/policy.py", line 144, in send
    return self.__getreply(sn, reader)

  File "/usr/lib/python2.7/site-packages/gofer/rmi/policy.py", line 181, in __getreply
    return self.__onreply(envelope)

  File "/usr/lib/python2.7/site-packages/gofer/rmi/policy.py", line 197, in __onreply
    raise RemoteException.instance(reply)

PulpException: Error on the CDS during sync; check the server log for more information


[root@preethi ~]# pulp-admin cds status --hostname=f16-cds.usersys.redhat.com
+------------------------------------------+
                 CDS Status
+------------------------------------------+

Name                	f16-cds.usersys.redhat.com
Hostname            	f16-cds.usersys.redhat.com
Description         	None                     
Cluster             	None                     
Sync Schedule       	None                     
Repos               	spacwalk                 
Next Sync           	Not Scheduled            
Last Sync           	2012-02-21 14:08:56-05:00
Status:
   Responding       	Yes                      
   Last Heartbeat   	2012-02-21 19:11:18.287201+00:00

+------------------------------------------+
           Most Recent Sync Tasks
+------------------------------------------+
Start Time:     2012-02-21 14:07:51-05:00
Finish Time:    2012-02-21 14:08:56-05:00
Result:         Success

[root@preethi ~]#

Comment 5 Preethi Thomas 2012-02-24 20:16:53 UTC
Pulp v1.0 is released
Closed Current Release.

Comment 6 Preethi Thomas 2012-02-24 20:18:01 UTC
Pulp v1.0 is released.


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