Project

General

Profile

Actions

Bug #32718

open

:request_timeout: appears to be ignored

Added by Joshua Hoblitt almost 3 years ago. Updated almost 3 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Hammer core
Target version:
-
Difficulty:
Triaged:
No
Team Backlog:
Fixed in Releases:
In Kanboard:

Description

I have increase apache's proxy timeout in an attempt to allow class importation to complete from the CLI. However, it appears that there is the value of `:request_timeout:` set in `cli.modules.d/foreman.yml` is ignored. I've tried values from 5 to 300 but the timeout seems to be fixed at ~120s.

# rpm -qa | grep hammer
tfm-rubygem-hammer_cli-2.4.0-1.el7.noarch
tfm-rubygem-hammer_cli_foreman-2.4.0-1.el7.noarch
# time /bin/hammer --debug proxy import-classes --id=1 
[ INFO 2021-06-03T23:21:42 Init] Initialization of Hammer CLI (2.4.0) has started...
[DEBUG 2021-06-03T23:21:42 Init] Running at ruby 2.5.5-p157
[ INFO 2021-06-03T23:21:42 Init] Configuration from the file /etc/hammer/cli_config.yml has been loaded
[ INFO 2021-06-03T23:21:42 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman.yml has been loaded
[ INFO 2021-06-03T23:21:42 Init] Configuration from the file /root/.hammer/cli.modules.d/foreman.yml has been loaded
[DEBUG 2021-06-03T23:21:42 SSLoptions] SSL options: {
    :ssl_ca_file => "/etc/puppetlabs/puppet/ssl/certs/ca.pem",
     :verify_ssl => true
}
[DEBUG 2021-06-03T23:21:42 API] Global headers: {
        :content_type => "application/json",
              :accept => "application/json;version=2",
    "Accept-Language" => "en" 
}
[DEBUG 2021-06-03T23:21:42 API] Follow redirects: never
[DEBUG 2021-06-03T23:21:42 Connection] Registered: foreman
[DEBUG 2021-06-03T23:21:42 HammerCLIForeman::CommandExtensions::OptionSources] Added predefined options for HammerCLIForeman::Command: 
[ INFO 2021-06-03T23:21:42 Extensions] Applied HammerCLIForeman::CommandExtensions::OptionSources for *all* except *nothing* on HammerCLIForeman::Command.
[DEBUG 2021-06-03T23:21:42 HammerCLIForeman::CommandExtensions::Fields] Added predefined options for HammerCLIForeman::ListCommand: [:fields]
[ INFO 2021-06-03T23:21:42 Extensions] Applied HammerCLIForeman::CommandExtensions::Fields for *all* except *nothing* on HammerCLIForeman::ListCommand.
[DEBUG 2021-06-03T23:21:42 HammerCLIForeman::CommandExtensions::Fields] Added predefined options for HammerCLIForeman::InfoCommand: [:fields]
[ INFO 2021-06-03T23:21:42 Extensions] Applied HammerCLIForeman::CommandExtensions::Fields for *all* except *nothing* on HammerCLIForeman::InfoCommand.
[DEBUG 2021-06-03T23:21:42 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added predefined options for HammerCLIForeman::AssociatingCommands::PuppetEnvironment::AddPuppetEnvironmentCommand: 
[DEBUG 2021-06-03T23:21:42 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Called option family block for HammerCLIForeman::AssociatingCommands::PuppetEnvironment::AddPuppetEnvironmentCommand:
    #<Proc:0x0000000001e716d8@/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-2.4.0/lib/hammer_cli_foreman/command_extensions/puppet_environment.rb:11>
[ INFO 2021-06-03T23:21:42 Extensions] Applied HammerCLIForeman::CommandExtensions::PuppetEnvironment for *all* except *nothing* on HammerCLIForeman::AssociatingCommands::PuppetEnvironment::AddPuppetEnvironmentCommand.
[DEBUG 2021-06-03T23:21:42 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added predefined options for HammerCLIForeman::AssociatingCommands::PuppetEnvironment::RemovePuppetEnvironmentCommand: 
[DEBUG 2021-06-03T23:21:42 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Called option family block for HammerCLIForeman::AssociatingCommands::PuppetEnvironment::RemovePuppetEnvironmentCommand:
    #<Proc:0x0000000001e716d8@/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-2.4.0/lib/hammer_cli_foreman/command_extensions/puppet_environment.rb:11>
[ INFO 2021-06-03T23:21:42 Extensions] Applied HammerCLIForeman::CommandExtensions::PuppetEnvironment for *all* except *nothing* on HammerCLIForeman::AssociatingCommands::PuppetEnvironment::RemovePuppetEnvironmentCommand.
[ INFO 2021-06-03T23:21:42 Modules] Extension module hammer_cli_foreman (2.4.0) loaded.
[DEBUG 2021-06-03T23:21:42 Init] Using locale 'en'
[DEBUG 2021-06-03T23:21:42 Init] 'mo' files for locale domain 'hammer-cli' loaded from '/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-2.4.0/locale'
[DEBUG 2021-06-03T23:21:42 Init] 'mo' files for locale domain 'hammer-cli-foreman' loaded from '/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-2.4.0/locale'
[ INFO 2021-06-03T23:21:42 HammerCLI::MainCommand] Called with options: {"option_debug"=>true}
[DEBUG 2021-06-03T23:21:42 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Added predefined options for HammerCLIForeman::SmartProxy::ImportPuppetClassesCommand: 
[DEBUG 2021-06-03T23:21:42 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Called option family block for HammerCLIForeman::SmartProxy::ImportPuppetClassesCommand:
    #<Proc:0x0000000001e716d8@/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-2.4.0/lib/hammer_cli_foreman/command_extensions/puppet_environment.rb:11>
[ INFO 2021-06-03T23:21:42 Extensions] Applied HammerCLIForeman::CommandExtensions::PuppetEnvironment for *all* except *nothing* on HammerCLIForeman::SmartProxy::ImportPuppetClassesCommand.
[DEBUG 2021-06-03T23:21:42 HammerCLIForeman::CommandExtensions::OptionSources] Called block for HammerCLIForeman::Command option sources:
    #<Proc:0x0000000001e499d0@/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-2.4.0/lib/hammer_cli_foreman/command_extensions/option_sources.rb:6>
[ INFO 2021-06-03T23:21:42 HammerCLIForeman::SmartProxy] Called with options: {}
[DEBUG 2021-06-03T23:21:42 HammerCLIForeman::CommandExtensions::OptionSources] Called block for HammerCLIForeman::Command option sources:
    #<Proc:0x0000000001e499d0@/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-2.4.0/lib/hammer_cli_foreman/command_extensions/option_sources.rb:6>
[DEBUG 2021-06-03T23:21:42 HammerCLIForeman::CommandExtensions::PuppetEnvironment] Called block for HammerCLIForeman::SmartProxy::ImportPuppetClassesCommand option sources:
    #<Proc:0x0000000001e71688@/opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-2.4.0/lib/hammer_cli_foreman/command_extensions/puppet_environment.rb:19>
[ INFO 2021-06-03T23:21:42 HammerCLIForeman::SmartProxy::ImportPuppetClassesCommand] Called with options: {"option_id"=>"1"}
[ INFO 2021-06-03T23:21:42 API] Server: https://foreman.xxx
[ INFO 2021-06-03T23:21:42 API] POST /api/smart_proxies/1/import_puppetclasses
[DEBUG 2021-06-03T23:21:42 API] Params: {
    "dryrun" => false
}
[DEBUG 2021-06-03T23:21:42 API] Headers: {}
[DEBUG 2021-06-03T23:21:42 API] Using authenticator: HammerCLIForeman::Api::InteractiveBasicAuth

[ERROR 2021-06-03T23:23:42 API] Timed out reading data from server
[DEBUG 2021-06-03T23:23:42 API] "" 
[DEBUG 2021-06-03T23:23:42 Exception] Using exception handler HammerCLIForeman::ExceptionHandler#handle_general_exception
[ERROR 2021-06-03T23:23:42 Exception] Error: Timed out reading data from server
Error: Timed out reading data from server
[ERROR 2021-06-03T23:23:42 Exception] 

RestClient::Exceptions::ReadTimeout (Timed out reading data from server):
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.2/lib/restclient/request.rb:733:in `rescue in transmit'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.2/lib/restclient/request.rb:642:in `transmit'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.2/lib/restclient/request.rb:145:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.2/lib/restclient/request.rb:52:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/rest-client-2.0.2/lib/restclient/resource.rb:67:in `post'
    /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.4.0/lib/apipie_bindings/api.rb:327:in `call_client'
    /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.4.0/lib/apipie_bindings/api.rb:240:in `http_call'
    /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.4.0/lib/apipie_bindings/api.rb:190:in `call_action'
    /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.4.0/lib/apipie_bindings/api.rb:185:in `call'
    /opt/theforeman/tfm/root/usr/share/gems/gems/apipie-bindings-0.4.0/lib/apipie_bindings/resource.rb:21:in `call'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-2.4.0/lib/hammer_cli/apipie/command.rb:53:in `send_request'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli_foreman-2.4.0/lib/hammer_cli_foreman/commands.rb:188:in `send_request'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-2.4.0/lib/hammer_cli/apipie/command.rb:34:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:63:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-2.4.0/lib/hammer_cli/abstract.rb:77:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/subcommand/execution.rb:11:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:63:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-2.4.0/lib/hammer_cli/abstract.rb:77:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/subcommand/execution.rb:11:in `execute'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:63:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-2.4.0/lib/hammer_cli/abstract.rb:77:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/clamp-1.1.2/lib/clamp/command.rb:132:in `run'
    /opt/theforeman/tfm/root/usr/share/gems/gems/hammer_cli-2.4.0/bin/hammer:147:in `<top (required)>'
    /bin/hammer:23:in `load'
    /bin/hammer:23:in `<main>'

real    2m1.155s
user    0m0.829s
sys    0m0.149s

Actions #1

Updated by Joshua Hoblitt almost 3 years ago

A value of -1 also results in a 120s timeout.

Actions

Also available in: Atom PDF