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

Design Placement Object so that it moves VM's from one Cluster to the other just because of workload changes on the Cluster

XMLWordPrintable

    • False
    • Hide

      None

      Show
      None
    • False
    • Hide

      Provide the required acceptance criteria using this template.

      • ...
      Show
      Provide the required acceptance criteria using this template. ...
    • None

      Value Statement

      the goal is:

      I have an Applicationset containing only one VM and it is only deployed to one Cluster (but two are available).

      Now we want to check how to automatically simulate a move from one cluster to the other

      Example: Reacting to Increased VM Count

      To ensure your PlacementDecision changes when more VMs are added to a cluster, you must use a dynamic prioritizer. The built-in ResourceAllocatableCPU and ResourceAllocatableMemory are the most direct ways to achieve this without custom code.

      Initial State:

      You have two clusters, cluster1 and cluster2, both with 1000m allocatable CPU. Your Placement object selects one cluster based on available CPU. The controller places a VM on cluster1 because its score is higher (or it was chosen first).

      1. Placement object
      spec:
        numberOfClusters: 1
        prioritizerPolicy:
          configurations:
            - scoreCoordinate:
                builtIn: ResourceAllocatableCPU
              weight: 1
      

      Change Occurs:

      Another VM is manually placed on cluster1. The available CPU on cluster1 decreases to 800m. The available CPU on cluster2 remains at 1000m.

      Placement Controller Reaction:

      The controller detects this change. It re-evaluates the scores for both clusters:

      cluster1 score (based on ResourceAllocatableCPU) decreases.

      cluster2 score remains high.

      The controller now sees that cluster2 is the most suitable cluster. It updates the PlacementDecision to select cluster2 instead of cluster1.

      This new decision can be consumed by your workload automation, which can then migrate or "push" the VM from cluster1 to cluster2 to rebalance the workload. This process happens automatically without manual intervention on the Placement object itself.

      In summary, you don't need to change the Placement object to react to these events. The object's purpose is to define the rules, and the OCM placement controller's job is to enforce those rules by continuously monitoring and updating decisions as the clusters' states evolve.

      Definition of Done for Engineering Story Owner (Checklist)

      • ...

      Development Complete

      • The code is complete.
      • Functionality is working.
      • Any required downstream Docker file changes are made.

      Tests Automated

      • [ ] Unit/function tests have been automated and incorporated into the
        build.
      • [ ] 100% automated unit/function test coverage for new or changed APIs.

      Secure Design

      • [ ] Security has been assessed and incorporated into your threat model.

      Multidisciplinary Teams Readiness

      Support Readiness

      • [ ] The must-gather script has been updated.

              rh-ee-ecai Eveline Cai
              rhn-support-cstark Christian Stark
              Atif Shafi Atif Shafi
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: