Uploaded image for project: 'Red Hat Advanced Cluster Management'
  1. Red Hat Advanced Cluster Management
  2. ACM-27947

Do not need to migrate dataImage to the target cluster

XMLWordPrintable

    • GH Train-35
    • Important
    • None

      Description of problem:

      Currently, we have migrated dataImage from the source cluster to the target cluster. but the iso file does not exist in the target cluster.

      Attach claude's output about dataImage in IBI:

        DataImage Lifecycle in Image-Based Installation

        1. Creation - During Installation Setup

        // controllers/imageclusterinstall_controller.go:749-768
        log.Infof("creating new dataImage for BareMetalHost (%s/%s)", bmh.Name, bmh.Namespace)
        dataImage = &bmh_v1alpha1.DataImage{
            ObjectMeta: metav1.ObjectMeta

      {           Name:      bmh.Name,           Namespace: bmh.Namespace,       }

      ,
            Spec: bmh_v1alpha1.DataImageSpec

      {           URL: url,  // Points to the configuration ISO       }

      ,
        }
        - When: Before the host boots to start installation
        - Purpose: Attach the configuration ISO containing install-config, network config, etc.

        2. Active Use - During Installation

        // Line 717: Check if DataImage is attached before rebooting
        if dataImage.Status.AttachedImage.URL == "" && !setAnnotationIfNotExists(&bmh.ObjectMeta, rebootAnnotation, rebootAnnotationValue)

      {       log.Infof("Adding reboot annotations to BareMetalHost (%s/%s)", bmh.Namespace, bmh.Name)   }

        - When: Host boots from the attached ISO
        - Purpose: The ISO provides configuration data for the installation process
        - Duration: From boot until installation completes

        3. Deletion - After Installation Completes

        // controllers/imageclusterinstall_controller.go:1354-1361 (finalizer)
        dataImage, err := r.removeBMHDataImage(ctx, log, key)
        if err != nil {
            return ctrl.Result{}, true, fmt.Errorf("failed to delete DataImage %s/%s: %w", key.Namespace, key.Name, err)
        }
        if dataImage != nil

      {       log.Infof("Waiting for DataImage %s/%s to get deleted", key.Namespace, key.Name)       return ctrl.Result\{RequeueAfter: 1 * time.Minute}

      , true, nil
        }
        - When: When ImageClusterInstall is deleted
        - Purpose: Clean up - the installed cluster doesn't need the ISO anymore

        Why DataImage Isn't Needed After Installation

        After the installation completes:

        1. Cluster is installed to disk - The SNO cluster now runs from the disk, not from the ISO
        2. Detached annotation added - The BMH is marked as detached to prevent Metal3 interference
        3. DataImage becomes unnecessary - The configuration ISO served its purpose

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

      How reproducible:

      Steps to Reproduce:

      1.  
      2.  
      3. ...

      Actual results:

      Expected results:

      Additional info:

              clyang82 Chunlin Yang
              clyang82 Chunlin Yang
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: