Project

General

Profile

Bug #24628

foreman installer fails on REX SSH key generation

Added by Hart Mel 3 months ago. Updated 3 months ago.

Status:
Closed
Priority:
Normal
Category:
Foreman modules
Target version:
-
Difficulty:
Triaged:
No
Bugzilla link:
Team Backlog:
Found in Releases:

Description

Running installer without argument fails

[root@foremandev ~]# foreman-installer 
Installing             Service[puppetserver]                              [87%] [....................................................        ]
 /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[foremandev.mycompany.com]: Failed to call refresh: Proxy foremandev.mycompany.com cannot be refreshed: unknown error (response 500)
 /Stage[main]/Foreman_proxy::Register/Foreman_smartproxy[foremandev.mycompany.com]: Proxy foremandev.mycompany.com cannot be refreshed: unknown error (response 500)
/usr/share/foreman-installer/modules/foreman/lib/puppet/provider/foreman_smartproxy/rest_v3.rb:53:in `refresh_features!'
/usr/share/foreman-installer/modules/foreman/lib/puppet/type/foreman_smartproxy.rb:73:in `refresh'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/event_manager.rb:147:in `process_callback'

production.log

2018-08-15T20:11:11 [I|app|] Started PUT "/api/v2/smart_proxies/1/refresh" for 10.105.200.100 at 2018-08-15 20:11:11 +0200
2018-08-15T20:11:11 [I|app|885ad] Processing by Api::V2::SmartProxiesController#refresh as JSON
2018-08-15T20:11:11 [I|app|885ad]   Parameters: {"apiv"=>"v2", "id"=>"1", "smart_proxy"=>{}}
2018-08-15T20:11:11 [I|app|885ad] Authorized user foreman_api_admin(API Admin)
2018-08-15T20:11:12 [W|app|885ad] Action failed
ProxyAPI::ProxyException: ERF12-9411 [ProxyAPI::ProxyException]: Unable to fetch public key ([RestClient::InternalServerError]: 500 Internal S
erver Error) for proxy https://foremandev.mycompany.com:8443/ssh
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-1.5.4/app/lib/proxy_api/remote_execution_ssh.rb:11:in `rescue in pubkey'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-1.5.4/app/lib/proxy_api/remote_execution_ssh.rb:8:in `pubkey'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-1.5.4/app/models/concerns/foreman_remote_execution/smart_proxy_extension
s.rb:9:in `update_pubkey'
/opt/theforeman/tfm/root/usr/share/gems/gems/foreman_remote_execution-1.5.4/app/models/concerns/foreman_remote_execution/smart_proxy_extension
s.rb:16:in `refresh'
/usr/share/foreman/app/controllers/api/v2/smart_proxies_controller.rb:60:in `refresh'

proxy.log

I, [2018-08-15T20:10:42.184903 ]  INFO -- : Successfully initialized 'dynflow'
E, [2018-08-15T20:10:42.190312 ] ERROR -- : Couldn't enable 'ssh': Ssh public key file /usr/share/foreman-proxy/.ssh/id_rsa_foreman_proxy does
n't exist.
You can generate one with `ssh-keygen -t rsa -b 4096 -f /usr/share/foreman-proxy/.ssh/id_rsa_foreman_proxy -N ''`
I, [2018-08-15T20:10:42.192330 ]  INFO -- : Successfully initialized 'ansible'
I, [2018-08-15T20:10:42.192443 ]  INFO -- : Successfully initialized 'discovery'
I, [2018-08-15T20:10:42.192518 ]  INFO -- : Successfully initialized 'pulp'

After the fails, running the installer a second time works, but probably because refresh is not called.
Running installer with --enable-foreman-plugin-remote-execution --enable-foreman-proxy-plugin-remote-execution-ssh for fresh install seems mandatory to not fail.

Associated revisions

Revision 18461ed0 (diff)
Added by Ewoud Kohl van Wijngaarden 3 months ago

Fixes #24628 - Change REX SSH dir to /var/lib/foreman-proxy

History

#1 Updated by Michael Moll 3 months ago

  • Project changed from Foreman to Installer

#2 Updated by The Foreman Bot 3 months ago

  • Assignee set to Ewoud Kohl van Wijngaarden
  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman-installer/pull/290 added

#3 Updated by Ewoud Kohl van Wijngaarden 3 months ago

  • Status changed from Ready For Testing to Closed

#4 Updated by Ewoud Kohl van Wijngaarden 3 months ago

  • Fixed in Releases 1.18.2, 1.19.0, 1.20.0 added

#5 Updated by Ewoud Kohl van Wijngaarden 3 months ago

  • Category set to Foreman modules
  • Subject changed from foreman installer fails to foreman installer fails on REX SSH key generation

Also available in: Atom PDF