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 1371221

Summary: [RFE] Improve granularity of the ability to remaster the foreman-discovery-image (enhance semi-automatic pxe-less provisioning with discovery)
Product: Red Hat Satellite Reporter: Reartes Guillermo <greartes>
Component: Discovery ImageAssignee: Lukas Zapletal <lzap>
Status: CLOSED NOTABUG QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: 6.2.0CC: bbuckingham, greartes, jcallaha
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-05-24 08:15:15 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
screenshot of a remastered image with: "proxy.url=https://sixthsat1.example.com:9090 proxy.type=proxy fdi.pxauto=1" none

Description Reartes Guillermo 2016-08-29 15:45:52 UTC
Created attachment 1195421 [details]
screenshot of a remastered image with: "proxy.url=https://sixthsat1.example.com:9090 proxy.type=proxy fdi.pxauto=1"

Description of problem:

When remastering the iso, i noticed that i could not set some parameters, either i set all of them or none.

fdi.pxauto=0 -> ask everything, it is annoying to type the satellite FQDN:PORT and set it to PROXY every-time.
fdi.pxauto=1 -> must set every parameters, so it ends up being one iso per server/vm.

I suggest to add a new option: fdi.pxauto=2 
This RFE is to enhance the semi-automatic mode.

Example where fdi.pxauto=0 and fdi.pxauto=1 are painfull to use:

On the Satellite Server, the customer defined a Discovery Rule:
* Search   ->  "facts.discovery_bootif = $MAC"
* Hostname ->  <%= host.facts['companyhostname'] %>

The customer wants to hard-code the Satellite Capsule url and port.
The customer wants to hard-code the type as PROXY.
The customer wants to select the nic and setup the network manually.
The customer wants to pass the hostname as a custom fact. "companyhostname=server1"
the customer wants to set fdi.pxauto=1, because he expect to enter SOME fields only (nic setup + custom fact)

The customer wants to:
 * boot the same remastered iso on all servers/vm (or a subset of those) 
 * but the customer does not want to have one different iso per server/vm and neither wants to use the same iso but answering all questions, the customer wants to answer SOME questions only and hardcode the rest.
 * select the a nic manually
 * configure the selected nic manually (selecting either dhcp or static)
 * set a custom fact: companyhostname=server1
 * and nothing more, a discovery rule is already in place. From this point on, everything should be automated.
 

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


How reproducible:
always

Steps to Reproduce:
# discovery-remaster /usr/share/foreman-discovery-image/ "proxy.url=https://sixthsat1.example.com:9090 proxy.type=proxy fdi.pxauto=1"

Actual results:
The parameters are set, but all the other parameters are 0 and the image will not work at all.
I was not asked for neither the nic nor the nic network configuration and it was not able to connect to the Satellite Capsule.


Expected results:
I expect to be asked only:
 * which nic to use
 * static/dhcp for selected nic
 * custom facts

After entering this, i expect the discovery image to connect to the Satellite Capsule automatically and if the discovery rule is properly setup, start the provisioning process automatically.


URL: https://access.redhat.com/documentation/en/red-hat-satellite/6.2/paged/provisioning-guide/chapter-6-provisioning-bare-metal-hosts
* "Chapter 6. Provisioning Bare Metal Hosts"
* "6.7. Implementing PXE-less Discovery"

"Unattended Use and Customization"

These parameters can be customized with the command "discovery-remaster":

* proxy.url
* proxy.type
* fdi.pxmac
* fdi.pxip, fdi.pxgw, fdi.pxdns
* fdi.pxfactname1, fdi.pxfactname2 …​ fdi.pxfactnameN
* fdi.pxfactvalue1, fdi.pxfactvalue2 …​ fdi.pxfactvalueN
* fdi.pxauto

However, one must set them all or none.

"fdi.pxauto"
"Defines whether to use 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."

Comment 1 Lukas Zapletal 2016-09-06 12:52:18 UTC
Hello, I believe this is already possible. When you don't set fdi.pxauto and still provide some details like URL, type, IP/GW/DNS and few facts, discovery will do interactive mode. Please try that and if it does not work, specify exactly how you remastered it and what does not work.

Comment 2 Reartes Guillermo 2016-09-09 18:53:45 UTC
Thanks, 

It worked exacly as you described.

# discovery-remaster /usr/share/foreman-discovery-image/foreman-discovery-image-3.1.1-16.iso "proxy.url=https://sixthsat1.example.com:9090 proxy.type=proxy"

Please keep the RFE open for a while, as i had almost no time to test.

I intend to check if there are some paragraphs in the provisioning guide to tweak. Give me some time to check if some docs need to be enhanced.


Cheers.

Comment 3 Lukas Zapletal 2017-05-24 08:15:15 UTC
I believe this is sorted out, we support that from 6.2.5+ also focus is on buttons so you can quickly skip pages.