Bug 1322360

Summary: Support for smart proxy on RHEL6
Product: Red Hat Satellite Reporter: Ivan Necas <inecas>
Component: Remote ExecutionAssignee: Adam Ruzicka <aruzicka>
Status: CLOSED ERRATA QA Contact: Lukas Pramuk <lpramuk>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.0.4CC: bbuckingham, bkearney, ehelms, kbidarka, lpramuk, mhulan, mmccune
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
URL: http://projects.theforeman.org/issues/11369
Whiteboard:
Fixed In Version: foreman-installer-1.11.0.9-1,rubygem-apipie-params-0.0.5-2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-07-27 11:11:00 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1347201    

Description Ivan Necas 2016-03-30 11:50:01 UTC
The smart_proxy_dynflow requires at least Ruby 1.9.3 to work properly. We need to find a way how to run it on the RHEL6.

Comment 1 Ivan Necas 2016-03-30 11:50:03 UTC
Created from redmine issue http://projects.theforeman.org/issues/11369

Comment 3 Stephen Benjamin 2016-04-28 12:40:48 UTC
*** Bug 1331258 has been marked as a duplicate of this bug. ***

Comment 5 Bryan Kearney 2016-05-20 08:13:43 UTC
Upstream bug assigned to aruzicka

Comment 6 Bryan Kearney 2016-05-20 08:13:45 UTC
Upstream bug assigned to aruzicka

Comment 12 Lukas Pramuk 2016-07-21 05:11:44 UTC
FailedQA.

@satellite-capsule-6.2.0-20.3.el6sat.noarch          
rubygem-smart_proxy_dynflow-0.1.3-1.el6sat.noarch
rubygem-smart_proxy_remote_execution_ssh-0.1.2-2.el6sat.noarch

# satellite-installer --enable-foreman-proxy-plugin-remote-execution-ssh
 Could not start Service[smart_proxy_dynflow_core]: Execution of '/sbin/service smart_proxy_dynflow_core start' returned 1: Starting smart_proxy_dynflow_core: /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/dependency.rb:315:in `to_specs': Could not find 'rake' (>= 0) among 28 total gem(s) (Gem::LoadError)
 /Stage[main]/Foreman_proxy::Plugin::Dynflow/Service[smart_proxy_dynflow_core]/ensure: change from stopped to running failed: Could not start Service[smart_proxy_dynflow_core]: Execution of '/sbin/service smart_proxy_dynflow_core start' returned 1: Starting smart_proxy_dynflow_core: /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/dependency.rb:315:in `to_specs': Could not find 'rake' (>= 0) among 28 total gem(s) (Gem::LoadError)
Installing             Done                                               [100%] [....................................]
  Something went wrong! Check the log for ERROR-level output
  The full log is at /var/log/foreman-installer/capsule.log


# service smart_proxy_dynflow_core start
Starting smart_proxy_dynflow_core: /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/dependency.rb:315:in `to_specs': Could not find 'rake' (>= 0) among 28 total gem(s) (Gem::LoadError)
Checked in 'GEM_PATH=/opt/theforeman/tfm/root/usr/share/gems:/opt/rh/rh-ror41/root/usr/share/gems:/usr/share/foreman-proxy/.gem/ruby:/opt/rh/rh-ruby22/root/usr/share/gems:/opt/rh/rh-ruby22/root/usr/local/share/gems/opt/rh/rh-ror41/root/usr/share/gems:/opt/rh/rh-ruby22/root/usr/local/share/gems', execute `gem env` for more information
	from /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/specification.rb:1311:in `block in activate_dependencies'
	from /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/specification.rb:1300:in `each'
	from /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/specification.rb:1300:in `activate_dependencies'
	from /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/specification.rb:1282:in `activate'
	from /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/specification.rb:1314:in `block in activate_dependencies'
	from /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/specification.rb:1300:in `each'
	from /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/specification.rb:1300:in `activate_dependencies'
	from /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/specification.rb:1282:in `activate'
	from /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/specification.rb:1314:in `block in activate_dependencies'
	from /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/specification.rb:1300:in `each'
	from /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/specification.rb:1300:in `activate_dependencies'
	from /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/specification.rb:1282:in `activate'
	from /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/core_ext/kernel_gem.rb:67:in `block in gem'
	from /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/core_ext/kernel_gem.rb:66:in `synchronize'
	from /opt/rh/rh-ruby22/root/usr/share/rubygems/rubygems/core_ext/kernel_gem.rb:66:in `gem'
	from /usr/bin/smart_proxy_dynflow_core:22:in `<main>'

Comment 14 Ivan Necas 2016-07-21 07:18:56 UTC
This seems like a packaging issue on capsule, where there are some missed rake dependency in the spec and it happens only on capsule, not the main server, both on rhel6 and rhel7

The workaround should be to run:

  yum install -y rh-ruby22-rubygem-rake
  satellite-installer

This works both at the first run and also if one needs to fix the issue later.

Comment 16 Ivan Necas 2016-07-21 08:11:49 UTC
The problem was with the apipie-params gem having `rake` in the dependencies. This was fixed in upstream https://github.com/iNecas/apipie-params/pull/2 and released in apipie-params-0.0.5

Comment 19 Mike McCune 2016-07-22 05:59:38 UTC
Dev Verified this on SNAP 21.1:

[root@dhcp-8-29-12 ~]# satellite-installer --enable-foreman-proxy-plugin-remote-execution-ssh
Installing             Done                                               [100%] [..........................................................................................................................................................]
  Success!
  The full log is at /var/log/foreman-installer/capsule.log
[root@dhcp-8-29-12 ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 6.8 (Santiago)
[root@dhcp-8-29-12 ~]#

Comment 20 Lukas Pramuk 2016-07-22 11:13:29 UTC
VERIFIED.

@satellite-capsule-6.2.0-21.1.el6sat.noarch
foreman-installer-1.11.0.9-1.el6sat.noarch
tfm-rubygem-apipie-params-0.0.5-2.el6sat.noarch

Verified @standalone capsule on RHEL6

1)
# satellite-installer --enable-foreman-proxy-plugin-remote-execution-ssh
Installing             Done                                               [100%] [....................................]
  Success!
  The full log is at /var/log/foreman-installer/capsule.log

2)
@satellite # hammer capsule info --id 2
Id:         2
Name:       <CAPSULE_FQDN>
URL:        https://<CAPSULE_FQDN>:9090
Features:   
    Templates
    Puppet
    Puppet CA
    Discovery
    Pulp Node
    Dynflow
    SSH
Created at: 2016/07/22 09:57:40
Updated at: 2016/07/22 10:54:20

>>> standalone capsule SSH feature was enabled

Comment 21 Bryan Kearney 2016-07-27 11:11:00 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2016:1501