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 2214821

Summary: The "fdi.pxauto" option always works in automatic mode even if we oass the value as 0
Product: Red Hat Satellite Reporter: Sayan Das <saydas>
Component: Discovery ImageAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED MIGRATED QA Contact: addubey
Severity: high Docs Contact:
Priority: high    
Version: 6.13.1CC: gtalreja, shwsingh
Target Milestone: UnspecifiedKeywords: MigratedToJIRA, 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: 2024-06-06 16:22:00 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 Sayan Das 2023-06-13 18:06:12 UTC
Description of problem:

Going through https://access.redhat.com/documentation/en-us/red_hat_satellite/6.13/html-single/provisioning_hosts/index#Unattended_Use_Customization_and_Image_Remastering_provisioning , I assumed that , I will be able to customize the discovery ISO with some options but still be able to control few things while discovery starts but It seems the "fdi.pxauto" option does not works exactly the same way as explained in the documentation. 


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

Satellite 6.13 ( and 6.12\6.11\6.10\6.9 )

How reproducible:

100%

Steps to Reproduce:
1. Install a Satellite 6.13 and configure discovery service on the same
2. Install foreman-discovery-image package
3. Execute the following steps to remaster the ISO:

# cd /usr/share/foreman-discovery-image
# discovery-remaster foreman-discovery-image-x86_64-4.1.0-10.el8sat.iso "proxy.url=https://satellite.example.com:9090 proxy.type=proxy fdi.pxauto=0 fdi.ipv6.method=ignore" my_discovery_image.iso

4. Use that my_discovery_image.iso image discover a system i.e. attach the ISO to a system and boot with it.


Actual results:

The discovery ISO boots up and starts performing Automatic Discovery on it's own. There are no menu\seletable options provided to mention any custom facts or perhaps switch to a different smart-proxy discovery server.


Expected results:

Either "fdi.pxauto=0" should deliver a semi-automatic mode of Discovery process or We should correct our documentation about 

A) How fdi.pxauto is actually expected to work ?
B) Under which specific circumstances, The discovery-remaster is expected to be used
C) Is it mandatory to pass the "proxy.url" and "proxy.type" with discovery-remaster while using "fdi.pxauto" option ?

   ( Without that, Discovery will even not begun and say proxy_url declaration is missing or something like that )

Additional info:

From Documentation:

fdi.pxauto:

To set automatic or semi-automatic mode. If set to 0, the image uses semi-automatic mode, which allows you to confirm your choices through a set of dialog options. If set to 1, the image uses automatic mode and proceeds without any confirmation.

fdi.pxmac:

The MAC address of the primary interface in the format of AA:BB:CC:DD:EE:FF. This is the interface you aim to use for communicating with Capsule Server. In automated mode, the first NIC (using network identifiers in alphabetical order) with a link is used. In semi-automated mode, a screen appears and requests you to select the correct interface.


But I don't see that happening at all.

Moreover https://github.com/theforeman/foreman-discovery-image/blob/master/root/usr/share/ruby/vendor_ruby/discovery/menu.rb#L169-L208 tells me, 

* We don't need to pass 0 or 1 as a value. Just using "fdi.pxauto" option is good enough to start completely unattended PXEless provisioning. No semi-automatic mode at all.

* Following tells me that It will either use the interface whose MAC is defined by pxmac or else the first interface that has a link

mac = cmdline('fdi.pxmac') || detect_first_nic_with_link

So even here also, I don't see how the semi-automatic mode works ( as mentioned in the definition of fdi.pxmac ).

Comment 1 Sayan Das 2023-06-13 18:07:27 UTC
This is not a regression as I can reproduce this exact same behavior from Satellite 6.9 to 6.13. I am just wondering why this was never reported.

Comment 2 Sayan Das 2023-06-14 07:30:47 UTC
One more thing to add:

If I don't use fdi.pxauto and just use these args to remaster the image i.e. 

'proxy.url=https://satellite.example.com:9090 proxy.type=proxy fdi.ipv6.method=ignore fdi.ipv4.method=auto'

I would hope that booting from resulted in ISO, would not ask me to choose if I want to do manual IP addressing or DHCP-based discovery and will use DHCP-based discovery by default but it's not the case. 

So if "fdi.ipv4.method" or "fdi.ipv6.method" depends on "fdi.pxauto" somehow, then that should be clearly mentioned.

Comment 4 Eric Helms 2024-06-06 16:22:00 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "SAT-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.