Uploaded image for project: 'Product Technical Learning'
  1. Product Technical Learning
  2. PTL-13441

DO316v4.14: ch07s05 : affinity and tolerations are incorrectly specified

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • DO180 - OCP4.x NEXT
    • DO316 - OCP4.14-en-1-20240328
    • DO316
    • None
    • False
    • Hide

      None

      Show
      None
    • False
    • 7
    • ROLE
    • en-US (English)

      Please fill in the following information:


      URL: https://rol.redhat.com/rol/app/courses/do316-4.14/pages/ch07s05
      Reporter RHNID: chetan-rhls
      Section Title:      h2. Performing Virtual Machine Live Migrations                                                     

      Issue description: 

      affinity and tolerations are incorrectly specified in the following respectively:

      • spec.affinity
      • spec.toleration

      affinity and tolerations should be configured in: spec.template.spec, like:

      apiVersion: kubevirt.io/v1
      kind: VirtualMachine
      metadata:
      name: example-vm-pod-affinity
      spec:
      template:
      spec:
      affinity:
      nodeAffinity:
      requiredDuringSchedulingIgnoredDuringExecution:
      nodeSelectorTerms:

      • matchExpressions:
      • key: example.io/example-key
        operator: In
        values:
      • example-value-1
      • example-value-2

      and:

      metadata:
      name: example-vm-tolerations
      apiVersion: kubevirt.io/v1
      kind: VirtualMachine
      spec:
      template:
      spec:
      tolerations:

      • key: "key"
        operator: "Equal"
        value: "virtualization"
        effect: "NoSchedule"

      refer : https://docs.openshift.com/container-platform/4.12/virt/virtual_machines/advanced_vm_management/virt-specifying-nodes-for-vms.html#virt-example-vm-node-placement-node-affinity_virt-specifying-nodes-for-vms 

       

      Steps to reproduce:

       

      Workaround:

       

      Expected result:

        1. image-2024-05-11-00-12-56-212.png
          197 kB
          Chetan Tiwary
        2. image-2024-05-11-00-16-46-461.png
          190 kB
          Chetan Tiwary

            rht-ccaillou Christopher Caillouet
            chetan-rhls Chetan Tiwary
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: