Bug 1365956

Summary: Installer doesn't affect remote execution-related settings
Product: Red Hat Satellite Reporter: Maxim Burgerhout <mburgerh>
Component: Remote ExecutionAssignee: Ivan Necas <inecas>
Status: CLOSED ERRATA QA Contact: Lukas Pramuk <lpramuk>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 6.2.0CC: ahumbe, aladke, bbuckingham, bkearney, cdonnell, egolov, ehelms, emarquez, inecas, jcallaha, karnsing, ktordeur, lennard.klein, lpramuk, rajgupta, tris.hoar, vgunasek
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-21 16:54:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch to add more logging around smart_proxy_dynflow_settings none

Description Maxim Burgerhout 2016-08-10 15:12:39 UTC
Description of problem:
The smart_proxy_dynflow_core process expects it's configuration to live in a different directory than the rest of the proxy configs.

This makes changing those settings after installation frustrating, because this is not documented very well.

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

How reproducible:


Steps to Reproduce:
1. Install Satellite 6.2
2. Try and change the REx working directories by changing the config file
3.

Actual results:
Doesn't work (settings are stored in a file that isn't used by smart_proxy_dynflow_core)

Expected results:
Either settings are stored in the file smart_proxy_dynflow_core uses, or smart_proxy_dynflow_core uses a file that is stored in the location the installer uses for config files

Additional info:
Ask Ivan Necas, he knows :)

Comment 2 Ivan Necas 2016-08-10 15:42:43 UTC
Created redmine issue http://projects.theforeman.org/issues/16050 from this bug

Comment 3 Ivan Necas 2016-08-10 15:44:29 UTC
I've updated the subject of the bug to better describe the current state without implying how it should be fixed. From the implementaiton perspective, we will address mainly the fact, that the installer attributes should affect the system and that the files will be where smart_proxy_remote_execution_core expects them to be.

Comment 5 Bryan Kearney 2016-09-12 14:17:40 UTC
Upstream bug assigned to inecas

Comment 6 Bryan Kearney 2016-09-12 14:17:43 UTC
Upstream bug assigned to inecas

Comment 7 Ivan Necas 2016-09-19 11:19:57 UTC
*** Bug 1371674 has been marked as a duplicate of this bug. ***

Comment 8 Bryan Kearney 2016-09-27 08:18:04 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/16050 has been resolved.

Comment 17 Ivan Necas 2016-11-22 13:16:12 UTC
Created attachment 1222730 [details]
patch to add more logging around smart_proxy_dynflow_settings

To apply the patch:

cd /opt/theforeman/tfm/root/usr/share/gems/gems/smart_proxy_dynflow_core-0.1.3
git init; git add -A .; git commit -m original
patch -p1 < ~/ssh-settings-log.patch
service smart_proxy_dynflow_core restart


After running that, please share /var/log/foreman-proxy/ssh_settings.log
file with us

Comment 18 Ivan Necas 2016-11-23 08:08:54 UTC
Additional note for the workaround:

Make sure the files in /etc/smart_proxy_dynflow_core/ are readable by the foreman-proxy user

chown -R :foreman-proxy /etc/smart_proxy_dynflow_core/

Comment 19 Lukas Pramuk 2017-12-06 17:19:54 UTC
VERIFIED.

@satellite-6.3.0-22.0.el7sat.noarch
foreman-installer-1.15.6.4-1.el7sat.noarch
rubygem-smart_proxy_dynflow-0.1.8-1.el7sat.noarch
tfm-rubygem-smart_proxy_dynflow_core-0.1.8-1.fm1_15.el7sat.noarch
rubygem-smart_proxy_remote_execution_ssh-0.1.6-1.el7sat.noarch

by the manual reproducer:

1. Have a provisioned host registered to SAT with REX enabled

2. Enable hourly recurring job - Run Command - SSH Default "yum -y install mc"

3. @Host: Check /var/tmp for REX content

4. Run installer and modify ssh remote working dir

@Host: # mkdir /var/tmp2
@SAT: # satellite-installer --foreman-proxy-plugin-remote-execution-ssh-remote-working-dir /var/tmp2

5. Check whether installer modified config file option 

# grep remote /etc/foreman-proxy/settings.d/remote_execution_ssh.yml 
:remote_working_dir: /var/tmp2

>>> installer affects REX settings file

6. @Host: Watch new REX content appearing in /var/tmp2 

>>> the new setting in yaml file is really effective for REX jobs

Comment 20 Satellite Program 2018-02-21 16:54:37 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/RHSA-2018:0336