Bug 1720725

Summary: [RFE] Ability to override DHCP options and wait_after_restart option for race condition
Product: Red Hat Satellite Reporter: Sayan Das <saydas>
Component: Infoblox integrationAssignee: Lukas Zapletal <lzap>
Status: CLOSED ERRATA QA Contact: Radovan Drazny <rdrazny>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.5.0CC: alexander.lackner, bkearney, egolov, ehelms, lzap, pcreech
Target Milestone: 6.8.0Keywords: FutureFeature, Triaged
Target Release: Unused   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: tfm-rubygem-smart_proxy_dhcp_infoblox-0.0.16 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-27 12:58:39 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:

Comment 3 Lukas Zapletal 2019-06-17 07:13:46 UTC
A customer needs to provide custom options. Currently the workaround is:

def build_host(options)
      host = ::Infoblox::Fixedaddress.new(:connection => @connection)
      host.name = options[:hostname]
      host.ipv4addr = options[:ip]
      host.mac = options[:mac]
      host.nextserver = options[:nextServer]
      host.use_nextserver = true
      host.bootfile = options[:filename]
      host.use_bootfile = true
      host.network_view = network_view
      host.options = [{"name"=> "PXE_menu_prompt","num"=> 10,"value"=> "-","vendor_class"=> "EmpirumPXE"},{"name"=> "PXE_discovery_control","num"=> 6,"value"=> "-","vendor_class"=> "EmpirumPXE"},{"name"=> "PXE_boot_menu","num"=> 9,"value"=> "-","vendor_class"=> "EmpirumPXE"},{"name"=> "PXE_boot_servers","num"=> 8,"value"=> "-","vendor_class"=> "EmpirumPXE"}]
      host
end

Additionally, it looks like their Infoblox instance processes the DHCP change for about 1-2 minute and they would like to be able to delay launch of the VM in Satellite.

Comment 4 Lukas Zapletal 2019-06-17 07:29:36 UTC
ANALYSIS:

Adding new fields to the UI/CLI/API is a bigger change which will unlikely to happen in a reasonable timeframe, but if these DHCP options do not change very often, I think I should be able to squeeze in a small feature - configurable option via infoblox.yml file. These options could be set via configuration file during deployment. Limitation is obvious, cannot be different for a single host or a host group.

For the 1-2 minutes delay I filed a PR - new global setting to do explicit delay. Note in this case browser and/or hammer timeout will need to be increased as well: https://github.com/theforeman/foreman/pull/6846

Comment 10 Bryan Kearney 2019-06-26 12:08:03 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/27060 has been resolved.

Comment 11 Lukas Zapletal 2019-06-26 14:18:43 UTC
The delay is being implemented in a different BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1724228

Comment 12 Lukas Zapletal 2019-06-26 14:19:43 UTC
Please disregard my last comment, the referenced BZ is installer change.

Comment 13 Lukas Zapletal 2019-07-24 14:50:29 UTC
Backlog only, no errata.

Waiit_after_restart already implemented upstream, but the DHCP options not merged yet.

Comment 14 Bryan Kearney 2019-07-24 16:08:23 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/27060 has been resolved.

Comment 17 Bryan Kearney 2019-12-16 09:01:49 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue https://projects.theforeman.org/issues/28328 has been resolved.

Comment 22 Radovan Drazny 2020-10-02 11:16:01 UTC
Tested on Satellite 6.8 Snap 17, tfm-rubygem-smart_proxy_dhcp_infoblox-0.0.16-3.el7sat.noarch.
The feature functionality is as described in the comment #4. Custom dhcp options can be added to /etc/foreman-proxy/settings.d/dhcp_infoblox.yml in the following format:

 :options:
  -
    name: "DHCP option name"
    num: 1234
    value: "A value"
    vendor_class: "A vendor class"


During the host creation, custom DHCP options are sent along to the Infoblox and added to the host record. If vendor_class is used, the option is correctly assigned to the pre-existing Options Space on Infoblox.

Comment 25 errata-xmlrpc 2020-10-27 12:58:39 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: Satellite 6.8 release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:4366