Bug 757825
Summary: | sync with schedules doesn't return the sync progress of currently syncing | ||
---|---|---|---|
Product: | [Retired] Pulp | Reporter: | Preethi Thomas <pthomas> |
Component: | user-experience | Assignee: | Jason Connor <jconnor> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Preethi Thomas <pthomas> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 1.0.0 | CC: | mmccune, skarmark |
Target Milestone: | --- | Keywords: | Triaged |
Target Release: | Sprint 30 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2012-02-24 20:10:58 UTC | Type: | --- |
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: | 772350 | ||
Bug Blocks: |
Description
Preethi Thomas
2011-11-28 19:15:22 UTC
I fixed this a while back, verified fix. build: 0.256 fails_qa [root@preethi ~]# pulp-admin repo sync --id=f15 --interval PT5M --start=2012-01-07T14:00:00:00 Sync schedule for repo [ f15 ] changed to [ 2012-01-07T14:00:00/PT5M ] [root@preethi ~]# pulp-admin repo status --id=f15+------------------------------------------+ Status for f15 +------------------------------------------+ Repository: f15 Number of Packages: 2935 Last Sync: 2012-01-04 15:04:30-05:00 Traceback (most recent call last): File "/usr/bin/pulp-admin", line 23, in <module> admin.main() File "/usr/lib/python2.7/site-packages/pulp/client/lib/cli.py", line 152, in main command.main(self.args[1:]) File "/usr/lib/python2.7/site-packages/pulp/client/pluginlib/command.py", line 129, in main action.main(args[1:]) File "/usr/lib/python2.7/site-packages/pulp/client/pluginlib/command.py", line 213, in main self.run() File "/usr/lib/python2.7/site-packages/pulp/client/admin/plugins/repo.py", line 315, in run error_details = self.form_error_details(syncs[0]["progress"]) File "/usr/lib/python2.7/site-packages/pulp/client/admin/plugins/repo.py", line 153, in form_error_details if not progress.has_key("error_details"): AttributeError: 'NoneType' object has no attribute 'has_key' unblocked by commit c54587e29439ef2eaf9dd6d5dceeeacaaf4ced61 build: 0.257 fails_qa [root@preethi ~]# rpm -q pulp pulp-0.0.257-1.fc15.noarch the progress shows as progress unknown if you run repo status at the time its syncing. But once its done it seem to returning the status so the steps to reproduce (from my comment above) 1. Create a repo 2. Run repo sync with schedule (eg I have a schedule 2012-01-10T14:00:00-05:00/PT5M) 3. At the time that the repo is scheduled to sync ( so at 2012-01-10T14:00:00-05:00/PT5M) run repo status see this [root@preethi ~]# pulp-admin -u admin -p admin repo status --id=centos +------------------------------------------+ Status for centos +------------------------------------------+ Repository: centos Number of Packages: 6294 Last Sync: 2012-01-10 14:31:35-05:00 Currently syncing: progress unknown the progress callback was being eliminated on the second call by the task history mechanism the fix requires the following two commits: 428960971592a3a5b615b513f6fd93fd69f35f2c 0bf928815823b5eb46df48c0b0119059ccf228bc build: 0.259 fails_qa [root@pulp-f16 ~]# rpm -q pulp pulp-0.0.264-1.fc16.noarch [root@pulp-f16 ~]# if you get the status while the scheduled sync is running i can the progress as Progress Unknown [root@pulp-f16 ~]# pulp-admin repo status --id=test +------------------------------------------+ Status for test +------------------------------------------+ Repository: test Number of Packages: 20 Last Sync: 2012-02-07 12:25:10-05:00 Currently syncing: progress unknown Preethi, I can't reproduce this. Can you give me let me know how you have your test repository setup? == OUTPUT == [jconnor@localhost pulp]$ pulp-admin task list Task: ef2293c0-51dd-11e1-86ca-525400fdc2eb Job: None Scheduler: interval Call: cull_history Arguments: State: waiting Start time: None Finish time: None Scheduled time: 2012-02-08T08:00:00Z Result: None Exception: None Traceback: None Task: 2dcd93ca-51de-11e1-a17e-525400fdc2eb Job: None Scheduler: interval Call: _sync Arguments: kernel State: running Start time: 2012-02-07T15:52:52-07:00 Finish time: None Scheduled time: 2012-02-07T22:52:49Z Result: None Exception: None Traceback: None Task: ef227c63-51dd-11e1-86ca-525400fdc2eb Job: None Scheduler: interval Call: cull_audited_events Arguments: State: waiting Start time: None Finish time: None Scheduled time: 2012-02-08T20:00:00Z Result: None Exception: None Traceback: None [jconnor@localhost pulp]$ pulp-admin repo status --id kernel +------------------------------------------+ Status for kernel +------------------------------------------+ Repository: kernel Number of Packages: 24 Last Sync: 2012-02-07 15:51:27-07:00 Currently syncing: Downloading Items or Verifying (16 of 24 items downloaded. 151693276.0 bytes remaining) [jconnor@localhost pulp]$ pulp-admin repo status --id kernel +------------------------------------------+ Status for kernel +------------------------------------------+ Repository: kernel Number of Packages: 24 Last Sync: 2012-02-07 15:51:27-07:00 Currently syncing: Running Createrepo (24 of 24 items downloaded. 0.0 bytes remaining) Even after rebooting: == OUTPUT == [jconnor@localhost pulp]$ pulp-admin task list Task: c747de35-51de-11e1-8f53-525400fdc2eb Job: None Scheduler: interval Call: cull_audited_events Arguments: State: waiting Start time: None Finish time: None Scheduled time: 2012-02-08T20:00:00Z Result: None Exception: None Traceback: None Task: c747fe66-51de-11e1-8f53-525400fdc2eb Job: None Scheduler: interval Call: cull_history Arguments: State: waiting Start time: None Finish time: None Scheduled time: 2012-02-08T08:00:00Z Result: None Exception: None Traceback: None Task: 2dcd93ca-51de-11e1-a17e-525400fdc2eb Job: None Scheduler: immediate Call: _sync Arguments: kernel State: finished Start time: 2012-02-07T15:55:06-07:00 Finish time: 2012-02-07T15:55:37-07:00 Scheduled time: None Result: True Exception: None Traceback: None Task: c748b3d9-51de-11e1-8f58-525400fdc2eb Job: None Scheduler: interval Call: _sync Arguments: kernel State: running Start time: 2012-02-07T15:57:26-07:00 Finish time: None Scheduled time: 2012-02-07T15:57:25-07:00 Result: None Exception: None Traceback: None [jconnor@localhost pulp]$ pulp-admin repo status --id kernel +------------------------------------------+ Status for kernel +------------------------------------------+ Repository: kernel Number of Packages: 24 Last Sync: 2012-02-07 15:55:37-07:00 Currently syncing: Running Createrepo (24 of 24 items downloaded. 0.0 bytes remaining) Not exactly sure what triggers it. But the following steps seems to be good reproducer 1. change the schedule for repo sync 2. tail the log so that you know for sure the scheduled sync is kicked off. 3. As soon as the sync starts run repo status for the repo. [root@katello-test ~]# pulp-admin -u admin -p admin repo status --id=spacewalk +------------------------------------------+ Status for spacewalk +------------------------------------------+ Repository: spacewalk Number of Packages: 85 Last Sync: 2012-02-08 09:09:12-05:00 [root@katello-test ~]# pulp-admin -u admin -p admin repo status --id=spacewalk +------------------------------------------+ Status for spacewalk +------------------------------------------+ Repository: spacewalk Number of Packages: 85 Last Sync: 2012-02-08 09:09:12-05:00 Currently syncing: progress unknown [root@katello-test ~]# pulp-admin -u admin -p admin task list Task: 52f55e21-522c-11e1-8347-54520065b6c1 Job: None Scheduler: interval Call: cull_audited_events Arguments: State: waiting Start time: None Finish time: None Scheduled time: 2012-02-08T18:00:00Z Result: None Exception: None Traceback: None Task: 52f59c00-522c-11e1-8349-54520065b6c1 Job: None Scheduler: interval Call: cull_history Arguments: State: waiting Start time: None Finish time: None Scheduled time: 2012-02-09T06:00:00Z Result: None Exception: None Traceback: None Task: 5366b9cf-522c-11e1-862e-54520065b6c1 Job: None Scheduler: interval Call: _sync Arguments: spacewalk State: running Start time: 2012-02-08T09:14:02-05:00 Finish time: None Scheduled time: 2012-02-08T14:14:00Z Result: None Exception: None Traceback: None [root@katello-test ~]# Sayli pushed the fix for this in revision: 1bbb2836d7361fd6aa7e01250003da4d8742d786 build: 0.266 verified [root@katello-test ~]# pulp-admin repo status --id=pulp +------------------------------------------+ Status for pulp +------------------------------------------+ Repository: pulp Number of Packages: 17 Last Sync: 2012-02-22 22:26:15-05:00 Currently syncing: Downloading Metadata (0 of 0 items downloaded. 0.0 bytes remaining) [root@katello-test ~]# pulp-admin repo status --id=pulp +------------------------------------------+ Status for pulp +------------------------------------------+ Repository: pulp Number of Packages: 17 Last Sync: 2012-02-22 22:26:15-05:00 Currently syncing: Running Createrepo (17 of 17 items downloaded. 0.0 bytes remaining) Pulp v1.0 is released Closed Current Release. |