Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2210256

Summary: Installer fails when disabling Infoblox plugin but plugin is eventually disabled
Product: Red Hat Satellite Reporter: sganar
Component: InstallationAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED NOTABUG QA Contact: Satellite QE Team <sat-qe-bz-list>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.14.0CC: ahumbe, egolov, ehelms, ekohlvan, gtalreja, nalfassi, rlavi
Target Milestone: UnspecifiedKeywords: Documentation, 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: 2023-08-08 11:00:20 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 sganar 2023-05-26 09:57:00 UTC
Description of problem:
Installer fails when disabling the Infoblox plugin but the plugin is eventually disabled

Version-Release number of selected component (if applicable):
Satellite stream snap 15

How reproducible:
always

Steps to Reproduce:
1. Enable Infoblox dhcp and dns plugin (https://access.redhat.com/documentation/en-us/red_hat_satellite/6.13/html/provisioning_hosts/using_infoblox_as_dhcp_and_dns_providers_provisioning)
2. Disable the dns and dhcp plugin 
satellite-installer --no-enable-foreman-proxy-plugin-dhcp-infoblox --no-enable-foreman-proxy-plugin-dns-infoblox

Actual results:
Installer Fails but plugin is disabled.
# satellite-installer --no-enable-foreman-proxy-plugin-dhcp-infoblox --no-enable-foreman-proxy-plugin-dns-infoblox 
2023-05-26 05:14:15 [NOTICE] [root] Loading installer configuration. This will take some time.
2023-05-26 05:14:18 [NOTICE] [root] Running installer with log based terminal output at level NOTICE.
2023-05-26 05:14:18 [NOTICE] [root] Use -l to set the terminal output log level to ERROR, WARN, NOTICE, INFO, or DEBUG. See --full-help for definitions.
Package versions are locked. Continuing with unlock.
2023-05-26 05:14:24 [NOTICE] [configure] Starting system configuration.
2023-05-26 05:14:28 [ERROR ] [configure] Evaluation Error: Error while evaluating a Function Call, Class[Foreman_proxy::Plugin::Dns::Infoblox]:
2023-05-26 05:14:28 [ERROR ] [configure] expects a value for parameter 'dns_server'
2023-05-26 05:14:28 [ERROR ] [configure] expects a value for parameter 'username'
2023-05-26 05:14:28 [ERROR ] [configure] expects a value for parameter 'password' (file: /usr/share/foreman-installer/modules/foreman_proxy/manifests/config.pp, line: 28, column: 5) on node satellite.example.com
2023-05-26 05:14:28 [NOTICE] [configure] System configuration has finished.

It asks for dns_server,username and password but still fails after entering all of them

Expected results:
Installer should pass

Additional info:

Comment 1 Evgeni Golov 2023-07-26 08:46:01 UTC
This is most probably a result of https://github.com/theforeman/puppet-foreman_proxy/commit/ae3f5760ca238e4352e422649155979d23950837

Comment 2 Evgeni Golov 2023-07-26 08:47:13 UTC
or, more generally speaking, https://github.com/theforeman/puppet-foreman_proxy/pull/779

Comment 3 Evgeni Golov 2023-07-26 09:01:47 UTC
couple more observations (sorry for the spam):
1. this does only happen for DNS, not DHCP!
2. the problem is that while you pass --no-enable-foreman-proxy-plugin-dns-infoblox to disable the plugin, the value of foreman-proxy-dns-provider is still "infoblox" and the infoblox module is still evaluated
3. it works fine if one does --no-enable-foreman-proxy-plugin-dns-infoblox --reset-foreman-proxy-dns-provider (as this resets the provider to nsupdate)

I am torn between "you're disabling the plugin wrongly" (= doc bug) and "the installer should handle this smarter"

cc @ekohlvan

Comment 4 Ewoud Kohl van Wijngaarden 2023-07-26 09:18:50 UTC
I'm leaning to "you're disabling the plugin wrongly", which we don't document today.

Some more observations:

* Just passing --no-enable-foreman-proxy-plugin-dns-infoblox stops managing it, but doesn't clean up anything.
* Disabling the dns module entirely is probably better than resetting the provider to nsupdate, because that may install ISC BIND.
* The same is true for DHCP, but there we don't expose it clearly

So from the top of my head I think these commands should be the correct way to remove it:

satellite-installer --foreman-proxy-dns false --reset-foreman-proxy-dns-provider --no-enable-foreman-proxy-plugin-dns-infoblox
dnf remove rubygem-smart_proxy_dns_infoblox

We could look at implementing ensure=absent to make this easier, but don't do this today.

Comment 7 Ewoud Kohl van Wijngaarden 2023-08-04 13:30:12 UTC
It may not be obvious, but to trace the version it was included:

$ cd ~/dev/puppet-foreman_proxy
$ git tag --contains ae3f5760ca238e4352e422649155979d23950837 --sort=version:refname | head -n 1
24.0.0
$ cd ~/dev/foreman-installer
$ git checkout 3.5-stable
$ ./bin/module-versions | grep 'puppet-foreman_proxy '
puppet-foreman_proxy 24.1.0 24.1-stable

A bit further digging (inspecting git log of Puppetfile.lock) shows it was first included in foreman-installer 3.5.0-rc1, which means it's also present in Satellite 6.13.