Project

General

Profile

Actions

Bug #27607

open

Duplicate requests when timeout occurs

Added by Oleh Fedorenko over 4 years ago. Updated over 4 years ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
Other commands
Target version:
-
Difficulty:
Triaged:
Yes
Team Backlog:
Ivan
Fixed in Releases:
Found in Releases:
In Kanboard:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1639748

Description of problem:

When requests to hammer take too long (over 60s by default in Sat 6.2 and over 120s in 6.3+), for some HTTP methods (GET HEAD PUT DELETE OPTIONS TRACE), the request is sent again to the server.

This can lead to `Required lock is already taken by other running tasks` error, when the task serving the update is still running.

Version-Release number of selected component (if applicable):
6.2+

How reproducible:
In some cases

Steps to Reproduce:
1. have a satellite with larger number of repositories
2. call hammer -p redhat -d organization update --id 1 --redhat-repository-url http://other-sat.example.com

Actual results:
if the request takes more than default timeout to process, there will be another request appearing after the timeout, producing the lock error.

Expected results:
if there is timeout, the hammer just exists, without any additional retires

Additional info:

We've tracked that down to ruby implementation https://github.com/ruby/ruby/blob/8778e9267c6b2f92ce7caea26fe59593cbbf2645/lib/net/http.rb#L1534, where the retry happens. In Ruby 2.5, an option set max_retries was exposed https://github.com/ruby/ruby/commit/4f4d7247208b467c3d48587d10761c23a41b140b, but the rest-client is not exposing it yet.

Actions #1

Updated by Oleh Fedorenko over 4 years ago

  • Priority changed from Normal to Low
  • Triaged changed from No to Yes

The problem with retrying is on rest-client side.

The newest versions of Ruby allow to set max count of retries (https://github.com/ruby/ruby/blob/930e637c0e2ffd6fcb46205d473b6f4c05607471/lib/net/http.rb#L755), but the newest versions of rest-client don't (https://github.com/rest-client/rest-client/blob/master/lib/restclient/request.rb#L694-L707).

So problem will remain until a new version of rest-client is released with possibility to change count of retries. From our side we then should update hammer/apipie-bindings to use it and fix the issue.

Actions #2

Updated by Martin Bacovsky over 4 years ago

  • Team Backlog Ivan added
Actions #3

Updated by Shira Maximov over 4 years ago

  • In Kanboard set to yes

Changing in_kanboard field to yes

Actions #4

Updated by Shira Maximov over 4 years ago

  • In Kanboard deleted (yes)
Actions

Also available in: Atom PDF