Bug 965743 - The ISO client says that max_speed is in kB/s, but it is interpreted in B/s
The ISO client says that max_speed is in kB/s, but it is interpreted in B/s
Status: CLOSED CURRENTRELEASE
Product: Pulp
Classification: Community
Component: user-experience (Show other bugs)
Master
Unspecified Unspecified
unspecified Severity unspecified
: ---
: 2.2.0
Assigned To: Jay Dobies
Preethi Thomas
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-05-21 12:08 EDT by Randy Barlow
Modified: 2013-09-10 11:46 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-10 11:46:04 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Randy Barlow 2013-05-21 12:08:43 EDT
Somewhere in the stack, we need to convert from kB/s (best for humans) to B/s (what pycurl expects). I don't have a strong opinion about where that should be, but we should clearly communicate the expected units in the REST API as well. If we adjusted it in the client, that would resolve everything since the API docs already say B/s. If we want to resolve this server-side, it will require a migration.

Here is how to reproduce the problem:

$ pulp-admin iso repo update --max-speed 5 --repo-id test5
Repository [test5] successfully updated

$ pulp-admin iso repo sync run --repo-id test5
+----------------------------------------------------------------------+
                    Synchronizing Repository [test5]
+----------------------------------------------------------------------+

This command may be exited by pressing ctrl+c without affecting the actual
operation on the server.

Downloading the Pulp Manifest...
The Pulp Manifest was downloaded successfully.

Downloading 3 ISOs...
[                                                  ] 0%
ISOs: 0/3	Data: 32.9 kB/10.2 MB	Avg: 9.73158046807 B/s


Failed to retrieve 3 ISOs.

	test2.iso: {u'response_code': 0, u'error_message': u'Operation timed out after
30000 milliseconds with 0 out of 0 bytes received', u'error_code': 28}

	test.iso: {u'response_code': 200, u'error_message': u'Operation too slow. Less
than 1000 bytes/sec transferred the last 300 seconds', u'error_code': 28}

	test3.iso: {u'response_code': 0, u'error_message': u'Operation timed out after
30000 milliseconds with 0 out of 0 bytes received', u'error_code': 28}
Comment 1 Randy Barlow 2013-05-21 12:13:57 EDT
I suppose that my code to reproduce isn't that great since it's an update command instead of a create command. Try this instead:

$ pulp-admin iso repo create --repo-id speed_test --feed http://pkilambi.fedorapeople.org/test_file_repo/ --max-speed 5

$ pulp-admin iso repo sync run --repo-id speed_test
Comment 2 Randy Barlow 2013-05-24 12:04:10 EDT
Change the help text to say bytes per second for this ticket.
Comment 3 Jay Dobies 2013-05-28 12:28:40 EDT
https://github.com/pulp/pulp/pull/496
Comment 4 Jeff Ortel 2013-06-04 11:54:59 EDT
build: 2.2.0-0.1.beta
Comment 5 Preethi Thomas 2013-06-05 16:06:02 EDT
verified
[root@hp-dl360g6-01 ~]# rpm -q pulp-server
pulp-server-2.2.0-0.1.beta.fc18.noarch
[root@hp-dl360g6-01 ~]# 

[root@hp-dl360g6-01 ~]# pulp-admin iso repo create --repo-id speed_test --feed http://pkilambi.fedorapeople.org/test_file_repo/ --max-speed 102400
Successfully created repository [speed_test]

[root@hp-dl360g6-01 ~]# 
[root@hp-dl360g6-01 ~]# 
[root@hp-dl360g6-01 ~]# 
[root@hp-dl360g6-01 ~]# pulp-admin iso repo sync run --repo-id speed_test
+----------------------------------------------------------------------+
                 Synchronizing Repository [speed_test]
+----------------------------------------------------------------------+

This command may be exited by pressing ctrl+c without affecting the actual
operation on the server.

Downloading the Pulp Manifest...
The Pulp Manifest was downloaded successfully.

Downloading 3 ISOs...
[==============                                    ] 29%
ISOs: 0/3	Data: 3.0 MB/10.2 MB	Avg: 96.0 kB/s


Failed to retrieve 3 ISOs.

	test2.iso: {u'response_code': 0, u'error_message': u'Operation timed out after
30000 milliseconds with 0 out of 0 bytes received', u'error_code': 28}

	test.iso: {}

	test3.iso: {u'response_code': 0, u'error_message': u'Operation timed out after
30000 milliseconds with 0 out of 0 bytes received', u'error_code': 28}

[root@hp-dl360g6-01 ~]#
Comment 6 Preethi Thomas 2013-09-10 11:46:04 EDT
2.2 released
http://repos.fedorapeople.org/repos/pulp/pulp/stable/2.2/

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