Bug 669435

Summary: Setting a repo sync timeout in milliseconds or microseconds doesn't work
Product: [Retired] Pulp Reporter: Jay Dobies <jason.dobies>
Component: z_otherAssignee: Pradeep Kilambi <pkilambi>
Status: CLOSED NOTABUG QA Contact: Preethi Thomas <pthomas>
Severity: medium Docs Contact:
Priority: low    
Version: unspecifiedCC: jconnor, skarmark
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-03-25 06:39:21 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 673053    

Description Jay Dobies 2011-01-13 16:55:55 UTC
I'm not sure we could even kill a thread that quickly given the way our tasking framework works. So while we support from an interface perspective the ability to specify a timeout in milliseconds or microseconds, I don't think we could ever enforce that.

For example, the following doesn't indicate a timeout took place. But I can't see how it'd be possible that the sync normally completed in 20 milliseconds.

$ pulp-admin repo sync --id pulp-f14-64 --timeout milliseconds:20
Sync for repository pulp-f14-64 started
Use "repo status" to check on the progress

$ pulp-admin repo status --id pulp-f14-64 
+------------------------------------------+
           Status for pulp-f14-64
+------------------------------------------+
Repository: pulp-f14-64
Number of Packages: 10
Last Sync: 2011-01-13 11:51:53.243000

Comment 1 Sayli Karmarkar 2011-03-25 06:39:21 UTC
$ sudo pulp-admin repo sync --id=test1 --timeout=seconds:-22 --help
Usage: pulp-admin <options> repo sync <options>

Options:
  -h, --help         show this help message and exit
  --id=ID            repository id (required)
  --timeout=TIMEOUT  sync timeout in <units>:<value> format (e.g. hours:2
                     valid units: seconds, minutes, hours, days, weeks
  --no-packages      skip packages from the sync process
  --no-errata        skip errata from the sync process
  --no-distribution  skip distributions from the sync process
  -F, --foreground   synchronize repository in the foreground

As milliseconds and microseconds are removed from valid units in UG and help text for repo sync, this bug no longer exist.