Bug 1826983 - [IPI baremetal]: machine api tries to fallback incorrectly to config map for dhcp_range
Summary: [IPI baremetal]: machine api tries to fallback incorrectly to config map for ...
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Cloud Compute
Version: 4.5
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 4.5.0
Assignee: sdasu
QA Contact: Amit Ugol
Depends On:
Blocks: 1829938 dit
TreeView+ depends on / blocked
Reported: 2020-04-22 23:06 UTC by Stephen Benjamin
Modified: 2020-07-13 17:30 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1829938 (view as bug list)
Last Closed: 2020-07-13 17:30:26 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Github openshift machine-api-operator pull 568 0 None closed Bug 1826983: Fix External DHCP range values for Baremetal configuration 2020-07-28 18:30:17 UTC
Red Hat Bugzilla 1823359 0 urgent CLOSED Openshift 4.4 Baremetal IPI install fails using external DHCP server on provisioning network 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHBA-2020:2409 0 None None None 2020-07-13 17:30:43 UTC

Description Stephen Benjamin 2020-04-22 23:06:47 UTC
Description of problem:

provisioningDHCPRange can be an empty string in the Provisioning CR if provisioningDHCPExternal is true, but MAO is still trying to fall back to the config map. It should not do that.

IMHO, it is 100% OK to assume the installer creates the Provisioning CR, there's no need for backwards compatibility here, and ideally we'd just remove all of this config map stuff, but if we don't want to do that in 4.5, this case needs to get handled.

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

How reproducible:

Steps to Reproduce:
1. Set provisioningDHCPExternal: true, and provisioningDHCPRange to ""

Actual results:

    name: metal3-dnsmasq
    ready: false
    restartCount: 0
    started: false
        message: couldn't find key dhcp_range in ConfigMap
        reason: CreateContainerConfigError

Expected results:

No error.

Comment 1 sdasu 2020-04-23 15:31:39 UTC
I would like to see the provisioning CR generated by the installer. That can be gathered by "oc get provisioning -o yaml".

Comment 2 Stephen Benjamin 2020-04-23 15:53:39 UTC
After https://github.com/openshift/installer/pull/3496 lands, the template will look like this:

apiVersion: metal3.io/v1alpha1
kind: Provisioning
  name: provisioning-configuration
  provisioningInterface: "enp4s0"
  provisioningIP: ""
  provisioningNetworkCIDR: ""
  provisioningDHCPExternal: true
  provisioningDHCPRange: ""
  provisioningOSDownloadURL: "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.4/44.81.202003110027-0/x86_64/rhcos-44.81.202003110027-0-openstack.x86_64.qcow2.gz?sha256=237b9e0af475bf318abbe8d83d5508c2c3d4cca96fdcdb16edace2cc062216d1"

Comment 3 Stephen Benjamin 2020-04-23 15:53:55 UTC
rendered template* I meant, of course

Comment 4 sdasu 2020-04-23 17:54:14 UTC
proposed fix : https://github.com/openshift/machine-api-operator/pull/568

Comment 9 errata-xmlrpc 2020-07-13 17:30:26 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, and where to find the updated
files, follow the link below.

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


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