Hide Forgot
Description of problem: cds status doesn't show status when it has a scheduled sync but if you manually run cds sync Version-Release number of selected component (if applicable): [root@preethi ~]# rpm -q pulp pulp-0.0.185-1.fc14.noarch How reproducible: Steps to Reproduce: 1. register a cds with sync schedule 2. associate a repo 3. run cds sync manually 4. check cds status [root@preethi ~]# pulp-admin cds register --hostname=pulp-cds.usersys.redhat.com --interval PT1H --start=2011-06-02T10:00:00-05:00:00 Successfully registered CDS [pulp-cds.usersys.redhat.com] [root@preethi ~]# pulp-admin cds list +------------------------------------------+ CDS Instances +------------------------------------------+ Name pulp-cds.usersys.redhat.com Hostname pulp-cds.usersys.redhat.com Description None Group None Sync Schedule 2011-06-02T11:00:00-04:00/PT1H Repos None Last Sync Never Status: Responding Yes Last Heartbeat 2011-06-02 14:31:37.360490+00:00 [root@preethi ~]# pulp-admin cds status --hostname=pulp-cds.usersys.redhat.com +------------------------------------------+ CDS Status +------------------------------------------+ Name pulp-cds.usersys.redhat.com Hostname pulp-cds.usersys.redhat.com Description None Group None Sync Schedule 2011-06-02T11:00:00-04:00/PT1H Repos None Last Sync Never Status: Responding Yes Last Heartbeat 2011-06-02 14:36:49.947570+00:00 +------------------------------------------+ Most Recent Sync Tasks +------------------------------------------+ State waiting Start Time Not Started Finish Time In Progress [root@preethi ~]# pulp-admin cds associate_repo --hostname=pulp-cds.usersys.redhat.com --repoid=f15 Successfully associated CDS [pulp-cds.usersys.redhat.com] with repo [f15] [root@preethi ~]# pulp-admin cds sync --hostname=pulp-cds.usersys.redhat.com Sync for CDS [pulp-cds.usersys.redhat.com] started Use "cds status" to check on the progress [root@preethi ~]# pulp-admin cds status --hostname=pulp-cds.usersys.redhat.com +------------------------------------------+ CDS Status +------------------------------------------+ Name pulp-cds.usersys.redhat.com Hostname pulp-cds.usersys.redhat.com Description None Group None Sync Schedule 2011-06-02T11:00:00-04:00/PT1H Repos f15 Last Sync Never Status: Responding Yes Last Heartbeat 2011-06-02 14:40:21.888404+00:00 +------------------------------------------+ Most Recent Sync Tasks +------------------------------------------+ State waiting Start Time Not Started Finish Time In Progress
I think I fixed this when I added in the sort by date to the CDS status output. Please check again in QE build after .186.
fails_qa [root@preethi ~]# rpm -q pulp pulp-0.0.212-1.fc14.noarch [root@preethi ~]# this is not fixed [root@preethi ~]# pulp-admin cds update --hostname=pulp-cds.usersys.redhat.com --interval P1D --start=2011-07-07T00:00:00-0:6:00 Successfully updated CDS [pulp-cds.usersys.redhat.com] [root@preethi ~]# pulp-admin cds sync --hostname=pulp-cds.usersys.redhat.com Sync for CDS [pulp-cds.usersys.redhat.com] started Use "cds status" to check on the progress [root@preethi ~]# pulp-admin cds status --hostname=pulp-cds.usersys.redhat.com +------------------------------------------+ CDS Status +------------------------------------------+ Name pulp-cds.usersys.redhat.com Hostname pulp-cds.usersys.redhat.com Description None Cluster None Sync Schedule 2011-07-07T00:00:00-04:00/P1D Repos f14 Last Sync 2011-07-21 11:04:57-04:00 Status: Responding Yes Last Heartbeat 2011-07-21 16:33:19.916754+00:00 +------------------------------------------+ Most Recent Sync Tasks +------------------------------------------+ State Waiting Start Time Not Started Finish Time In Progress [root@preethi ~]# pulp-admin cds list +------------------------------------------+ CDS Instances +------------------------------------------+ Name pulp-cds.usersys.redhat.com Hostname pulp-cds.usersys.redhat.com Description None Cluster None Sync Schedule 2011-07-07T00:00:00-04:00/P1D Repos f14 Last Sync 2011-07-21 11:04:57-04:00 Status: Responding Yes Last Heartbeat 2011-07-21 16:34:00.842484+00:00
I made some pretty significant changes to the CLI output. It's much more similar to RHUI in the API calls it uses now. Notice that "Next Sync" now appears in the CDS summary when viewing its status. This will either be the next scheduled sync, "Not Scheduled" if there's no schedule, or "In Progress" if it's currently running. This field does _not_ appear on `pulp-admin cds list`. -> pulp-admin cds register --hostname thor.marvel.u --interval P1D --start=2011-12-09T00:00:00-0:6:00 Successfully registered CDS [thor.marvel.u] -> pulp-admin cds status --hostname thor.marvel.u+------------------------------------------+ CDS Status +------------------------------------------+ Name thor.marvel.u Hostname thor.marvel.u Description None Cluster None Sync Schedule 2011-12-09 00:00:00-05:00 Repos None Next Sync 2011-12-09 05:00:00+00:00 Last Sync Never Status: Responding No Last Heartbeat 2011-12-07 19:54:27.574838+00:00 +------------------------------------------+ Most Recent Sync Tasks +------------------------------------------+ Start Time: 2011-12-07 10:04:09-05:00 Finish Time: 2011-12-07 10:04:15-05:00 Result: Success -> pulp-admin cds status --hostname thor.marvel.u +------------------------------------------+ CDS Status +------------------------------------------+ Name thor.marvel.u Hostname thor.marvel.u Description None Cluster None Sync Schedule 2011-12-09 00:00:00-05:00 Repos None Next Sync 2011-12-09 05:00:00+00:00 Last Sync Never Status: Responding Yes Last Heartbeat 2011-12-07 19:54:57.622847+00:00 +------------------------------------------+ Most Recent Sync Tasks +------------------------------------------+ The CDS has not yet been synchronized -> pulp-admin cds associate_repo --hostname thor.marvel.u --repoid fedora-64 Successfully associated CDS [thor.marvel.u] with repo [fedora-64] -> pulp-admin cds sync --hostname thor.marvel.u Sync for CDS [thor.marvel.u] started Use "cds status" to check on the progress # Note: I had done an accidental sync on the CDS before this which is why in the below screen shot it shows a completed sync. -> pulp-admin cds status --hostname thor.marvel.u +------------------------------------------+ CDS Status +------------------------------------------+ Name thor.marvel.u Hostname thor.marvel.u Description None Cluster None Sync Schedule 2011-12-09 00:00:00-05:00 Repos fedora-64 Next Sync In Progress Last Sync 2011-12-07 14:55:27-05:00 Status: Responding Yes Last Heartbeat 2011-12-07 19:56:27.871544+00:00 +------------------------------------------+ Most Recent Sync Tasks +------------------------------------------+ Start Time: 2011-12-07 14:55:26-05:00 Finish Time: 2011-12-07 14:55:27-05:00 Result: Success
Forgot to mention, the "Next Sync" may momentarily change to "Awaiting Execution" if it's been put on the queue but not run yet. For what it's worth, I found it easiest to test this by opening up a second terminal and doing a watch on the status command: watch -n 1 pulp-admin cds status --hostname thor.marvel.u
commit 5fc1faa868b4155d4e7e8709ce28cb6afe1499af Author: Jay Dobies <jason.dobies> Date: Wed Dec 7 15:02:11 2011 -0500 710153 - Significant reworking of CDS status CLI command. Brought in line with the work done in this area on RHUI 2.0. src/pulp/client/admin/plugins/cds.py src/pulp/client/constants.py
build: 0.255
Fails_qa [root@preethi ~]# pulp-admin -u admin -p admin cds update --hostname f16-cds.usersys.redhat.com --name "QE F16 CDS" --interval PT1M --start=2011-12-22T13:00:00-00:06:00 Successfully updated CDS [f16-cds.usersys.redhat.com] [root@preethi ~]# pulp-admin -u admin -padmin cds status --hostname f16-cds.usersys.redhat.com +------------------------------------------+ CDS Status +------------------------------------------+ 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/cds.py", line 427, in run _print_cds(cds, next_sync=next_sync) File "/usr/lib/python2.7/site-packages/pulp/client/admin/plugins/cds.py", line 76, in _print_cds sync_schedule = dateutils.parse_iso8601_datetime(sync_schedule) File "/usr/lib/python2.7/site-packages/pulp/common/dateutils.py", line 170, in parse_iso8601_datetime return isodate.parse_datetime(datetime_str) File "/usr/lib/python2.7/site-packages/isodate/isodatetime.py", line 48, in parse_datetime datestring, timestring = datetimestring.split('T') isodate.isoerror.ISO8601Error: Malformed ISO8601 date-time string: 2011-12-22T08:06:00-05:00/PT1M Also would be good to give examples for --start and --interval values as on repo sync --help [root@preethi ~]# pulp-admin -u admin -p admin cds update --hostname f16-cds.usersys.redhat.com --name "QE F16 CDS" --interval PT1M --start=2011-12-22T13:00:00-00:06:00 Successfully updated CDS [f16-cds.usersys.redhat.com] [root@preethi ~]# pulp-admin -u admin -padmin cds status --hostname f16-cds.usersys.redhat.com +------------------------------------------+ CDS Status +------------------------------------------+ 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/cds.py", line 427, in run _print_cds(cds, next_sync=next_sync) File "/usr/lib/python2.7/site-packages/pulp/client/admin/plugins/cds.py", line 76, in _print_cds sync_schedule = dateutils.parse_iso8601_datetime(sync_schedule) File "/usr/lib/python2.7/site-packages/pulp/common/dateutils.py", line 170, in parse_iso8601_datetime return isodate.parse_datetime(datetime_str) File "/usr/lib/python2.7/site-packages/isodate/isodatetime.py", line 48, in parse_datetime datestring, timestring = datetimestring.split('T') isodate.isoerror.ISO8601Error: Malformed ISO8601 date-time string: 2011-12-22T08:06:00-05:00/PT1M [root@preethi ~]# pulp-admin -u admin -p admin cds update --help
commit af01f234c6f0e794eef9a844d7b28388dff2c0e3 Author: Jay Dobies <jason.dobies> Date: Tue Jan 3 10:11:18 2012 -0500 710153 - Fixed incorrect parsing of intervals in sync schedules. Added iso8601 format examples to --help. src/pulp/client/admin/plugins/cds.py
build: 0.256
verified [root@preethi ~]# rpm -q pulp pulp-0.0.256-1.fc15.noarch [root@preethi ~]# pulp-admin cds register --hostname=f16-cds.usersys.redhat.com --interval P1D --start=2011-01-09T12:00:00-0:6:0 Successfully registered CDS [f16-cds.usersys.redhat.com] [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 2011-01-09T12:00:00-05:00/P1D Repos None Next Sync 2012-01-09 17:00:00+00:00 Last Sync Never Status: Responding Yes Last Heartbeat 2012-01-09 16:38:08.933320+00:00 +------------------------------------------+ Most Recent Sync Tasks +------------------------------------------+ Start Time: 2011-12-22 11:59:12-05:00 Finish Time: 2011-12-22 11:59:12-05:00 Result: Success [root@preethi ~]# pulp-admin cds update --hostname=f16-cds.usersys.redhat.com --interval PT1M --start=2011-01-09T12:00:00-0:6:0 Successfully updated CDS [f16-cds.usersys.redhat.com] [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 2011-01-09T12:00:00-05:00/PT1M Repos None Next Sync 2012-01-09 17:00:00+00:00 Last Sync Never Status: Responding Yes Last Heartbeat 2012-01-09 16:40:30.429312+00:00 +------------------------------------------+ Most Recent Sync Tasks +------------------------------------------+ Start Time: 2011-12-22 11:59:12-05:00 Finish Time: 2011-12-22 11:59:12-05:00 Result: Success [root@preethi ~]# [root@preethi ~]# pulp-admin cds register --help Usage: pulp-admin <options> cds register <options> Options: -h, --help show this help message and exit --hostname=HOSTNAME CDS hostname (required) --name=NAME display name --description=DESCRIPTION description of the CDS --cluster_id=CLUSTER_ID if specified, the CDS will belong to the given cluster CDS Sync Schedule: --interval=SCHEDULE_INTERVAL length of time between each run in iso8601 duration format: P[n]Y[n]M[n]DT[n]H[n]M[n]S (e.g. "P3Y6M4DT12H30M5S" for "three years, six months, four days, twelve hours, thirty minutes, and five seconds") --start=SCHEDULE_START date and time of the first run in iso8601 combined date and time format (e.g. "2012-03-01T13:00:00Z"), omitting implies starting immediately --runs=SCHEDULE_RUNS number of times to run the scheduled sync, omitting implies running indefinitely [root@preethi ~]# pulp-admin cds update --help Usage: pulp-admin <options> cds update <options> Options: -h, --help show this help message and exit --hostname=HOSTNAME CDS hostname (required) --name=NAME display name --description=DESCRIPTION description of the CDS --cluster_id=CLUSTER_ID assigns the CDS to the given group --remove_cluster removes the CDS from a cluster if it is in one --remove_sync_schedule removes scheduled syncs for this CDS CDS Sync Schedule: --interval=SCHEDULE_INTERVAL length of time between each run in iso8601 duration format: P[n]Y[n]M[n]DT[n]H[n]M[n]S (e.g. "P3Y6M4DT12H30M5S" for "three years, six months, four days, twelve hours, thirty minutes, and five seconds") --start=SCHEDULE_START date and time of the first run in iso8601 combined date and time format (e.g. "2012-03-01T13:00:00Z"), omitting implies starting immediately --runs=SCHEDULE_RUNS number of times to run the scheduled sync, omitting implies running indefinitely
Pulp v1.0 is released Closed Current Release.
Pulp v1.0 is released.