Bug 1421636

Summary: [RFE] Satellite installer pga_hba.conf and postgresql.conf management
Product: Red Hat Satellite Reporter: Marcel Gazdík <mgazdik>
Component: InstallationAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED DUPLICATE QA Contact: Katello QA List <katello-qa-list>
Severity: low Docs Contact:
Priority: medium    
Version: 6.2.6CC: bbuckingham, jcallaha, pgozart, stbenjam
Target Milestone: UnspecifiedKeywords: FutureFeature, Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-16 14:43:18 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:

Description Marcel Gazdík 2017-02-13 10:22:04 UTC
Add options for satellite installer which will make foreman-db-management more granular. Specifically, disable modification of pg_hba.conf and in that case show a message that certain code has to be added into that file manually if it was not added in one of the previous iteration.

  Possible reasons for that:

    1) Customer would like to add access for remote machines.
       - remote monitoring, etc.
    2) Any other security policy on site.

  Current satellite versions allow the user to install PostgreSQL using the satellite installer with default configuration required for running the Satellite. Customers needs to modify the configuration files in order to comply their company policies and whenever they re-run the satellite installer the modified config files are being overwritten by it. 
  Possible workarounds like using externally managed PostgreSQL or adding immutable flags is not good enough because this solution is not bullet prove when it comes to applying required changes which may come with future Satellite releases and/or it leads always to error messages whenever the satellite-installer is being executed.

Comment 3 Stephen Benjamin 2017-02-16 14:43:18 UTC
Hi there,

In the case, the customer edited the puppet modules directly. That will never be supported.  However, the class parameter values can be changed using custom hiera with BZ1305782. 

https://bugzilla.redhat.com/show_bug.cgi?id=1305782#c14 explains how to use the hiera feature - it will most likely be available in 6.2.8.

As far as the pg_hba.conf setting, they can set the value like this:

---
postgresql::server::manage_pg_hba_conf: false

The module's documentation indicates it should be changed in the server class, not the globals class.  That documentation is available at https://forge.puppet.com/puppetlabs/postgresql for the postgresql module.

Be aware that modifying the configuration that Satellite ships may have unintended consequences, and it's recommended to test everything in a 
non-production environment first.  


Hope that helps

Stephen

*** This bug has been marked as a duplicate of bug 1305782 ***