Bug 1394619

Summary: Installer overwrites external setup
Product: Red Hat Satellite Reporter: Peter Larsen <plarsen>
Component: Docs Install GuideAssignee: Stephen Wadeley <swadeley>
Status: CLOSED CURRENTRELEASE QA Contact: Lucie Jirakova <ljirakov>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: adahms, bbuckingham, lzap, plarsen, stbenjam, swadeley
Target Milestone: Unspecified   
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: 2016-12-07 13:14:21 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:

Description Peter Larsen 2016-11-14 04:25:56 UTC
Description of problem:

After having added external support for DNS and DHCP (example) and running satellite-installer --scanario=installer  adding for instance realms or tftp, the external setup is overwritten (reset).


How reproducible:
Every time - 6.2.4

Steps to Reproduce:
1. Add external DNS
2. Add TFTP with satellite-installer

Actual results:
TFTP is installed/enabled - but DNS is removed

Expected results:
External DNS should still be working

Additional info:

Comment 1 Brad Buckingham 2016-11-15 18:44:21 UTC
Hi Peter, --scenario=installer is not a valid combination.  Did you intend for it to be satellite or capsule?

Comment 2 Peter Larsen 2016-11-15 18:50:47 UTC
(In reply to Brad Buckingham from comment #1)
> Hi Peter, --scenario=installer is not a valid combination.  Did you intend
> for it to be satellite or capsule?

Sorry, you're correct. I wrote the wrong thing. I meant --sceario=satellite. I'm trying to find the correct way to run the installer adding more features to the capsule/satellite without overwriting the external settings I've already done (and lost several times).

Comment 3 Brad Buckingham 2016-11-15 19:15:02 UTC
Hi Stephen, can you assist Peter? Thanks!

Comment 4 Stephen Benjamin 2016-11-15 19:22:18 UTC
Can you explain the external DNS setup more? How are you configuring it and what are you configuring?

Comment 5 Peter Larsen 2016-11-15 20:21:09 UTC
Not sure the BZ is the right place for this. But here's the background. I did a clean install of Sat 6.2. After installation I wanted DNS and DHCP to use the current DNS/DHCP so I set them up as external services, but when I added tftp using the satellite-installer --scenario=satellite it wiped (reset) my external settings. I also need to setup IPA integration which also requires running the satellite-installer and which will again wipe my external setup. 

Since I have to run the installer to do minor upgrades too, I don't want to loose my settings. Hence this BZ.

Comment 6 Stephen Benjamin 2016-11-15 22:18:01 UTC
I would suspect this is more a support issue and not a bug, but I'm happy to help...  I need more details by what you mean by "set them up as external services"


Are you running bind on the satellite server or external to it?


How'd you configure the external services? Are you editing files in /etc/foreamn-proxy by hand? (You shouldn't do this, there's installer options to configure all of it)

Comment 7 Peter Larsen 2016-11-15 23:00:26 UTC
(In reply to Stephen Benjamin from comment #6)
> I would suspect this is more a support issue and not a bug, but I'm happy to
> help...  I need more details by what you mean by "set them up as external
> services"

Pretty sure this is a bug - not a "how to use it". After running satellite-installer, the dhcp and dns foreman-proxy services are disabled. 

> 
> Are you running bind on the satellite server or external to it?

External. 

> 
> How'd you configure the external services?

Following: https://access.redhat.com/documentation/en/red-hat-satellite/6.2/paged/installation-guide/chapter-5-configuring-external-services


> Are you editing files in
> /etc/foreamn-proxy by hand? (You shouldn't do this, there's installer
> options to configure all of it)

Well, that's what the documentation tells us to do. Maybe that's the problem? What's the better way to do it?

Comment 8 Stephen Benjamin 2016-11-16 00:42:42 UTC
Yes, that's the problem the documentation is incorrect.

All of the DNS settings in /etc/foreman-proxy/dns.yml and any other serivces like DHCP, etc are controllable through installer flags.  Editing it directly will wipe it out on the next installer run.


The docs say:

---
:enabled: true
:dns_provider: nsupdate
:dns_key: /etc/rndc.key
:dns_server: 192.168.38.2
:dns_ttl: 86400

But really you should use

satellite-installer --foreman-proxy-dns=true
--foreman-proxy-dns-provider=nsupdate
--foreman-proxy-dns-managed=false
--foreman-proxy-keyfile=/etc/rndc.key
--foreman-proxy-dns-ttl=86400

And this will make the changes permament.

You can see the --help for any other options you might need.

Refiling this under documentation.

Comment 10 Stephen Wadeley 2016-11-29 16:00:48 UTC
Thank you for raising this bug.

Comment 12 Stephen Wadeley 2016-11-29 16:49:23 UTC
Hello Stephen

Am I correct in thinking the step "Restart the proxy. " is now redundant?

IIRC, if you run the installer script I think it restarts or reloads everything so you have a running system at the end.


Thank you

Comment 16 Peter Larsen 2016-12-05 14:46:22 UTC
(In reply to Stephen Wadeley from comment #14)
> The change I made was in:
> 
>  "Configuring Capsule Server with External DNS" [1]
> 
> 
> but now I see the same problem in:
> 
>  "Configuring Capsule Server with External DHCP" [2]
> 
> wrt the DHCP configs

My understanding and direction on this issue has been that _no_ changes should be made directly to the configuration files, but instead use the "satellite-installer" and it's options to change configuration.

Comment 20 Lukas Zapletal 2016-12-06 10:56:50 UTC
If you can, add a warning that installer can overwrite lots of configuration files and it's recommended to do --dry-run first.

Comment 21 Stephen Wadeley 2016-12-06 14:33:37 UTC
(In reply to Lukas Zapletal from comment #20)
> If you can, add a warning that installer can overwrite lots of configuration
> files and it's recommended to do --dry-run first.

there is also:

 Bug 1221217 - [RFE] Document installer's puppet nature and that changes would be overwritten

Comment 22 Stephen Wadeley 2016-12-06 14:36:20 UTC
(In reply to Lukas Zapletal from comment #20)
> If you can, add a warning that installer can overwrite lots of configuration
> files and it's recommended to do --dry-run first.

[root@rhel7-2-sat6-1 ~]# satellite-installer --foreman-proxy-dhcp=true --dry-run
[root@rhel7-2-sat6-1 ~]# satellite-installer --help | grep dry

Comment 23 Stephen Wadeley 2016-12-06 14:38:20 UTC
(In reply to Stephen Wadeley from comment #22)
> (In reply to Lukas Zapletal from comment #20)
> > If you can, add a warning that installer can overwrite lots of configuration
> > files and it's recommended to do --dry-run first.
> 
> [root@rhel7-2-sat6-1 ~]# satellite-installer --foreman-proxy-dhcp=true
> --dry-run
> [root@rhel7-2-sat6-1 ~]# satellite-installer --help | grep dry

sorry, pasted to quickly

[root@rhel7-2-sat6-1 ~]# satellite-installer --dry-run
ERROR: Unrecognised option '--dry-run'

Comment 25 Lukas Zapletal 2016-12-07 08:03:44 UTC
Sorry it's

-n, --noop                    Run puppet in noop mode? (default: false)

Comment 26 Stephen Wadeley 2016-12-07 12:04:24 UTC
(In reply to Lukas Zapletal from comment #25)
> Sorry it's
> 
> -n, --noop                    Run puppet in noop mode? (default: false)

See the second paragraph just published here:

https://access.redhat.com/documentation/en/red-hat-satellite/6.2/paged/installation-guide/chapter-3-installing-satellite-server#installing_satellite_connected_parent

Comment 27 Lukas Zapletal 2016-12-07 12:06:57 UTC
Ok, it's always good to provide -n and -v to see the changes on the console rather than finding that in logs.

Comment 31 Stephen Wadeley 2016-12-07 13:14:21 UTC
Hello


These changes are now live on the customer portal

https://access.redhat.com/documentation/en/red-hat-satellite/6.2/paged/installation-guide/chapter-5-configuring-external-services


Thank you