Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-3435

Support creating a BMH and a machine for an AI day-2 node

XMLWordPrintable

    • Moderate
    • None
    • 1
    • Metal Platform 235
    • 1
    • False
    • Hide

      None

      Show
      None

      When adding a day-2 node using AI, it has no BareMetalHost associated with it and it is not in the machine pool. When we try to create them - we end up deleting the node.

      To recreate:

      1) Install a day-1 cluster with assisted installer (I used the SaaS)

      2) Add a day-2 node using AI as well

      3) To create the BMH for the node, first create a secret with the BMC credentials:
      kubectl create secret generic worker-0-3-secret --from-literal=username=admin --from-literal=password=password -n openshift-machine-api
      4) Create the BMH as an "externally provisioned" host and disable introspection (since it was already up and running thanks to AI day-2):
      apiVersion: metal3.io/v1alpha1
      kind: BareMetalHost
      metadata:
      annotations:
      inspect.metal3.io: disabled
      name: openshift-worker-0-3
      namespace: openshift-machine-api
      spec:
      bmc:
      address: redfish-virtualmedia://192.168.123.1:8000/redfish/v1/Systems/9b72c048-2e2a-43ef-a77a-aef8f12ad44d
      credentialsName: worker-0-3-secret
      disableCertificateVerification: true
      bootMACAddress: 52:54:00:3e:64:24
      online: true
      externallyProvisioned: true
      5) Patch the node to point to the BMH:
      oc patch node worker-0-3 --type merge --patch '{"spec":{"providerID":"baremetalhost:///openshift-machine-api/openshift-worker-0-3"}}'
      6) Create the machine (this is where things go wrong):
      apiVersion: machine.openshift.io/v1beta1
      kind: Machine
      metadata:
      annotations:
      metal3.io/BareMetalHost: openshift-machine-api/openshift-worker-0-3
      finalizers:

      • machine.machine.openshift.io
        labels:
        machine.openshift.io/cluster-api-cluster: titan91cluster-0-zfrdz
        machine.openshift.io/cluster-api-machine-role: worker
        machine.openshift.io/cluster-api-machine-type: worker
        machine.openshift.io/cluster-api-machineset: titan91cluster-0-zfrdz-worker-0
        name: titan91cluster-0-zfrdz-worker-0-3
        namespace: openshift-machine-api
        spec:
        metadata: {}
        providerID: baremetalhost:///openshift-machine-api/openshift-worker-0-3
        providerSpec:
        value:
        apiVersion: baremetal.cluster.k8s.io/v1alpha1
        hostSelector: {}
        kind: BareMetalMachineProviderSpec
        => The day-2 node and the BMH disappear! A new machine object is created but it is stuck in "provisioning" state and is not connected with any real host.

              dhiggins@redhat.com Derek Higgins
              ukalifon@redhat.com Udi Kalifon (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              10 Start watching this issue

                Created:
                Updated:
                Resolved: