Project

General

Profile

Actions

Bug #14925

closed

request_timeout not obeyed, host creation times out

Added by alvin starr over 8 years ago. Updated over 7 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Category:
Foreman commands (obsolete)
Target version:
-
Difficulty:
Triaged:
Team Backlog:
Fixed in Releases:
Found in Releases:
In Kanboard:

Description

when creating a host via hammer on AWS the host build times out every time.
The provisioning is being handled by ssh and takes 5 or more minutes.

The result is:

[ERROR 2016-05-03 23:06:16 Exception] Error: Request Timeout
Could not create the host:
Error: Request Timeout
[ERROR 2016-05-03 23:06:16 Exception]

RestClient::RequestTimeout (Request Timeout):
/opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:184:in `rescue in transmit'
/opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:140:in `transmit'
/opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in `execute'
/opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/request.rb:33:in `execute'
/opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-1.6.7/lib/restclient/resource.rb:67:in `post'
/opt/rh/ruby193/root/usr/local/share/gems/gems/apipie-bindings-0.0.16/lib/apipie_bindings/api.rb:295:in `call_client'
/opt/rh/ruby193/root/usr/local/share/gems/gems/apipie-bindings-0.0.16/lib/apipie_bindings/api.rb:224:in `http_call'
/opt/rh/ruby193/root/usr/local/share/gems/gems/apipie-bindings-0.0.16/lib/apipie_bindings/api.rb:175:in `call_action'
/opt/rh/ruby193/root/usr/local/share/gems/gems/apipie-bindings-0.0.16/lib/apipie_bindings/api.rb:169:in `call'
/opt/rh/ruby193/root/usr/local/share/gems/gems/apipie-bindings-0.0.16/lib/apipie_bindings/resource.rb:14:in `call'
/opt/rh/ruby193/root/usr/local/share/gems/gems/hammer_cli-0.6.1/lib/hammer_cli/apipie/command.rb:43:in `send_request'
/opt/rh/ruby193/root/usr/local/share/gems/gems/hammer_cli_foreman-0.6.2/lib/hammer_cli_foreman/commands.rb:189:in `send_request'
/opt/rh/ruby193/root/usr/local/share/gems/gems/hammer_cli-0.6.1/lib/hammer_cli/apipie/command.rb:34:in `execute'
/opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run'
/opt/rh/ruby193/root/usr/local/share/gems/gems/hammer_cli-0.6.1/lib/hammer_cli/abstract.rb:22:in `run'
/opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/subcommand/execution.rb:11:in `execute'
/opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run'
/opt/rh/ruby193/root/usr/local/share/gems/gems/hammer_cli-0.6.1/lib/hammer_cli/abstract.rb:22:in `run'
/opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/subcommand/execution.rb:11:in `execute'
/opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:68:in `run'
/opt/rh/ruby193/root/usr/local/share/gems/gems/hammer_cli-0.6.1/lib/hammer_cli/abstract.rb:22:in `run'
/opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.0.0/lib/clamp/command.rb:133:in `run'
/opt/rh/ruby193/root/usr/local/share/gems/gems/hammer_cli-0.6.1/bin/hammer:125:in `<top (required)>'
/usr/bin/hammer:23:in `load'
/usr/bin/hammer:23:in `<main>'


Files

hc.txt hc.txt 25.1 KB alvin starr, 05/05/2016 11:07 AM
Actions #1

Updated by Dominic Cleal over 8 years ago

  • Project changed from Foreman to Hammer CLI
  • Category changed from Host creation to Foreman commands (obsolete)
  • Status changed from New to Feedback

Consider increasing the request timeout in the Hammer configuration file, e.g.

https://github.com/theforeman/hammer-cli-foreman/blob/master/config/foreman.yml#L15-L16

Config files can be found in ~/.hammer, ~/.config and/or /etc/hammer. See http://theforeman.org/manuals/1.11/index.html#3.5.6CLI.

Actions #2

Updated by alvin starr over 8 years ago

I will give that a try.
It looks like its in

/etc/hammer/cli.modules.d/foreman.yml

Actions #3

Updated by alvin starr over 8 years ago

just gave it a spin.
/etc/hammer/cli.modules.d/foreman.yml looks like :

:foreman: # Enable/disable foreman commands
:enable_module: true

  1. Your foreman server address
    :host: 'https://localhost/'
  1. Credentials. You'll be asked for them interactively if you leave them blank here
    :username: 'admin'
    #:password: 'example'
  1. Check API documentation cache status on each request
    #:refresh_cache: false
  1. API request timeout. Set to -1 for no timeout
    :request_timeout: 900 #seconds

It still times out after a couple of minutes.

Actions #4

Updated by Dominic Cleal over 8 years ago

  • Status changed from Feedback to New

You have a 5 minute timeout set, could you attach debug logs from hammer (hammer -d host ...) to show what's going on?

Actions #5

Updated by alvin starr over 8 years ago

the timeout should be 15 minutes.
60*15=900

attached is the debug output

Actions #6

Updated by Dominic Cleal over 8 years ago

  • Subject changed from host creation time out. to request_timeout not obeyed, host creation times out
Actions #7

Updated by Anonymous over 7 years ago

  • Status changed from New to Resolved

this is fixed in newer versions that depend on rest-client >= 1.8

Actions

Also available in: Atom PDF