Bug 1371221 - [RFE] Improve granularity of the ability to remaster the foreman-discovery-image (enhance semi-automatic pxe-less provisioning with discovery)
Summary: [RFE] Improve granularity of the ability to remaster the foreman-discovery-im...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Discovery Image
Version: 6.2.0
Hardware: x86_64
OS: Linux
low
low vote
Target Milestone: Unspecified
Assignee: Lukas Zapletal
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-29 15:45 UTC by Reartes Guillermo
Modified: 2017-05-24 08:15 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-05-24 08:15:15 UTC
Target Upstream Version:


Attachments (Terms of Use)
screenshot of a remastered image with: "proxy.url=https://sixthsat1.example.com:9090 proxy.type=proxy fdi.pxauto=1" (39.43 KB, image/png)
2016-08-29 15:45 UTC, Reartes Guillermo
no flags Details

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.


Note You need to log in before you can comment on or make changes to this bug.