harvester / tests

Harvester test cases
Apache License 2.0
10 stars 31 forks source link

[TEST] v1.3.2 Release Testing: Three node upgrade w/ 2 MGMT/Default Nodes & 1 Witness Node #1493

Closed albinsun closed 1 month ago

albinsun commented 1 month ago

What's the test to develop? Please describe

Three node upgrade w/ 2 MGMT/Default Nodes & 1 Witness Node

Prerequisite and dependency of test

  1. Setup three nodes cluster w/ witness node
  2. VLAN 1 network on mgmt and 1 network on other NICs
  3. 2 Virtual machines with data and md5sum computed- 1 running, 1 stopped
  4. 2 VM backup, snapshots - 1 backup when VM is running and 1 backup when VM is stooped
  5. Create a new storage class apart from default one. Use the new storage class for some basic operations.
  6. Import to Rancher and create an RKE2 guest cluster provisioned on Harvester VM before the upgrade.
  7. Deploy Harvester cloud provider to RKE1 Cluster (prior to latest version)
  8. Verify DHCP load balancer service
  9. Install Harvester CSI Driver (prior to latest version)
  10. Create a new Harvester PVC for nginx deployment
  11. Upgrade Rancher
  12. Upgrade Harvester

Describe the items of the test development (DoD, definition of done) you'd like

  1. Dependencies Check
  2. Virtual machines are in same state as before and accessible.
  3. Restore the backups, check the data
  4. Image and volume status
  5. Monitoring chart status
  6. VM operations are highlighted and working fine.
  7. Import Harvester into a Rancher cluster
  8. Add a node after the upgrade
  9. Upgrade the RKE2 guest cluster to 1.27 or above
  10. Upgrade cloud provider and CSI driver
  11. Verify DHCP load balancer service and create a new Harvester PVC
  12. Shutting off VM and then restarting VM

Additional context

albinsun commented 1 month ago

Prerequisite and dependency of test

  1. :green_circle: Setup three nodes v1.3.1 cluster w/ witness node * hosts ![image](https://github.com/user-attachments/assets/83e19f48-9b4b-4a03-9c9e-66045e1fc8e0) * node-0 ![image](https://github.com/user-attachments/assets/619c0a55-f9f9-4194-b071-cf09de0a206a) * node-1 ![image](https://github.com/user-attachments/assets/5fcda30d-a972-4599-91ff-ed37d2567b02) * node-2 ![image](https://github.com/user-attachments/assets/c283f575-94e9-4dd4-87ba-7d6da6e70dab)
  2. :green_circle: Create new storage class w/ replica 2 and set as default ![image](https://github.com/user-attachments/assets/856fe5be-9ab9-45de-b9ee-e36ab200fb33)
  3. :green_circle: VLAN 1 network on mgmt and 1 network on other NICs * Cluster Network ![image](https://github.com/user-attachments/assets/59b62467-3f12-4e04-8f14-ed8baf34e961) ![image](https://github.com/user-attachments/assets/0c5dad12-5e2b-4958-90c6-b83e4bd6febc) * VM Network ![image](https://github.com/user-attachments/assets/266b4cd7-9f2e-48e1-aad4-60d772b322ce)
  4. :green_circle: 4 Virtual machines with data and md5sum computed- 2 running, 2 stopped * Images ![image](https://github.com/user-attachments/assets/bc9ac66b-0866-467d-9a48-47377e888c48) * VMs ![image](https://github.com/user-attachments/assets/8afdf971-4234-4878-9c4e-a0090bd6e6eb) * SLES 15 SP6 (sles@ipv4): Running, mgmt-vlan1, extra disk. ![image](https://github.com/user-attachments/assets/9f63ade0-de4f-4d2d-83ea-97ec56652d7f) * SLES 15 SP4 (sles@ipv4): Stopped, ens5-vlan1 ![image](https://github.com/user-attachments/assets/8b4ab70d-29b2-40c6-b16c-d86144534e70) * Ubuntu 24.04 (ubuntu@ipv4): Running, ens5-vlan1 ![image](https://github.com/user-attachments/assets/23679eb5-c3cb-4f56-853e-8526788e258d) * RHEL 9.4 (cloud-user@ipv4): Stopped, mgmt-vlan1, extra disk. ![image](https://github.com/user-attachments/assets/1f54019a-47b0-4691-94df-6f5c715f2cd9)
  5. :green_circle: 2 VM backup, snapshots - 1 when VM is running and 1 when VM is stooped * SLES 15 SP6 (sles@ipv4): Running - Backup * SLES 15 SP4 (sles@ipv4): Stopped - Snapshot * Ubuntu 24.04 (ubuntu@ipv4): Running - Snapshot * RHEL 9.4 (cloud-user@ipv4): Stopped - Backup * Snapshot ![image](https://github.com/user-attachments/assets/8ee5398e-ed07-47d5-82a2-f9407250031f) * Backup ![image](https://github.com/user-attachments/assets/ae3729ee-fcd1-4141-9e8e-13d80021de55)
  6. :green_circle: Import to Rancher and create an RKE2 (v1.28) guest cluster provisioned on Harvester VM before the upgrade. * Import Harvester to Rancher ![image](https://github.com/user-attachments/assets/5131553c-fed7-4a76-96dc-66bac72dec5d) * Provision RKE2 guest cluster ![image](https://github.com/user-attachments/assets/9dbf269d-1062-48ff-b364-bca432c53b40)
  7. :green_circle: Deploy Harvester cloud provider to RKE2 Cluster (prior to latest version) ![image](https://github.com/user-attachments/assets/ea036a27-145d-4162-898e-95a994acc131)
  8. :green_circle: Install Harvester CSI Driver (prior to latest version) ![image](https://github.com/user-attachments/assets/b3ae57d7-73f1-4723-9b73-3d9e79d4f0ca)
  9. :green_circle: Create a new Harvester PVC for nginx deployment * Default storage class ![image](https://github.com/user-attachments/assets/fba6cdf5-90f0-4781-be6c-46d342e4f89d) * Create PVC ![image](https://github.com/user-attachments/assets/3d43d9ad-87fd-4679-8c91-c6f266ab2746)
  10. :green_circle: Verify DHCP load balancer service * Nginx deployment ![image](https://github.com/user-attachments/assets/73f30980-428c-423c-a9c9-cac798ba6d45) * DHCP load balancer ![image](https://github.com/user-attachments/assets/dee61a78-6c40-447d-bc77-c1d049d11b71) ![image](https://github.com/user-attachments/assets/bd20bb37-83f9-4626-8755-632e6d44a2d3)
  11. :green_circle: Upgrade to Rancher v2.9.0 * upgrade rancher ![image](https://github.com/user-attachments/assets/d67aae01-c12a-45a0-bd8a-9e60cf6ed04c) * RKE2 cluster still running ![image](https://github.com/user-attachments/assets/15a898dd-4b8e-411e-b2d3-b3e36c3d248e) * nginx still works ![image](https://github.com/user-attachments/assets/45af1088-5325-4a01-9250-f9c29a336e21) ![image](https://github.com/user-attachments/assets/93f45182-7933-4602-b21f-dc6a6b1dce48)

    Ref. https://ranchermanager.docs.rancher.com/getting-started/installation-and-upgrade/install-upgrade-on-a-kubernetes-cluster/upgrades

  12. :green_circle: Upgrade to RKE2 v1.29 * upgrade RKE2 version ![image](https://github.com/user-attachments/assets/b978f9ff-56ea-4893-864e-50f0cca4111c) * RKE2 cluster still running ![image](https://github.com/user-attachments/assets/d766fcde-dab1-418f-a0ea-04b58d1a9017) * nginx still works ![image](https://github.com/user-attachments/assets/1ad4cdf7-1ad4-4cbf-bc04-19b9b79a9748) ![image](https://github.com/user-attachments/assets/deb248b0-fe60-47b1-916f-f67bd4b75eba)
albinsun commented 1 month ago

Upgrade to harvester-v1.3.1 to harvester-v1.3.2-rc2

  1. :green_circle: Prepare an airgapped upgrade ![image](https://github.com/user-attachments/assets/d4b82d63-aaea-4430-9141-c10ea5f87722)

    Ref. https://docs.harvesterhci.io/v1.3/upgrade/index/#prepare-an-air-gapped-upgrade

  2. :green_circle: Trigger Upgrade ![image](https://github.com/user-attachments/assets/2064b617-baab-4136-bd08-6cbf165b2583) ![image](https://github.com/user-attachments/assets/84c24bab-8640-45f4-8583-28e96ed7bf41)
  3. :green_circle: Successfully upgrade ![image](https://github.com/user-attachments/assets/e15dd16f-d90d-428a-8af5-e2ed6ac9d2b9)
albinsun commented 1 month ago

Post-upgrade Checks

  1. Dependencies Check Chart: https://github.com/harvester/harvester/tree/v1.3/deploy/charts/harvester/dependency_charts Values: https://github.com/harvester/harvester/blob/v1.3/deploy/charts/harvester/values.yaml

    • :green_circle: csi-snapshotter ![image](https://github.com/user-attachments/assets/039accf9-4b65-4ecf-8ce5-6325357e26af)
    • :green_circle: kubevirt-operator ![image](https://github.com/user-attachments/assets/6d25d16f-7b3f-409d-b892-d9781c8e5f41)
    • :green_circle: kubevirt ![image](https://github.com/user-attachments/assets/2c3e1c47-473f-4363-939c-c8683ed5cfb0)
    • :green_circle: snapshot-validation-webhook ![image](https://github.com/user-attachments/assets/7032eb2d-3fe1-4f6f-980a-eff4a6e02b0d)
    • :green_circle: whereabouts ![image](https://github.com/user-attachments/assets/08910d10-73f3-432b-8b18-402083a83287)
  2. Check dependency_charts version https://github.com/harvester/harvester/tree/v1.3/deploy/charts/harvester-crd/templates

    • :green_circle: csi-snapshotter * volumesnapshotclasses ![image](https://github.com/user-attachments/assets/05a90854-2df0-4cd5-b196-264cca5fd1d1) * volumesnapshotcontents ![image](https://github.com/user-attachments/assets/f497e620-c5ff-43d4-bc71-fbd77f676143) * volumesnapshots ![image](https://github.com/user-attachments/assets/d04b3557-c5c2-42ab-80e6-b19508ab833b)
    • :green_circle: kubevirt-operator ![image](https://github.com/user-attachments/assets/2df91344-9ed9-4796-88cf-8c6ac071bb08)
    • :green_circle: whereabouts * whereabouts.cni.cncf.io_ippools ![image](https://github.com/user-attachments/assets/4995c47b-1b31-42f6-9385-c2ae14728c8d) * whereabouts.cni.cncf.io_overlappingrangeipreservations ![image](https://github.com/user-attachments/assets/5c4b5cbd-e770-4695-8e90-29bb4a2cd4b4)
  3. Check harvester_crd version https://github.com/harvester/harvester/tree/v1.3/deploy/charts/harvester-crd/templates

    • :green_circle: harvesterhci.io_addons.yaml ![image](https://github.com/user-attachments/assets/a91ac0b2-4dca-4045-b410-f0b7271e9e3d)
    • :green_circle: harvesterhci.io_keypairs.yaml ![image](https://github.com/user-attachments/assets/50950e2b-c560-4ca2-b0a7-290b3914f889)
    • :green_circle: harvesterhci.io_preferences.yaml ![image](https://github.com/user-attachments/assets/971136e2-334e-4659-8e40-b2878819d7d1)
    • :green_circle: harvesterhci.io_settings.yaml ![image](https://github.com/user-attachments/assets/8c214788-a4b0-4bc0-9d33-f045df65ba1d)
    • :green_circle: harvesterhci.io_supportbundles.yaml ![image](https://github.com/user-attachments/assets/d11a8d32-7e05-4ddf-aa5c-45f430d3e896)
    • :green_circle: harvesterhci.io_upgradelogs.yaml ![image](https://github.com/user-attachments/assets/f8548b61-7d17-4c56-8d23-edb004093c90)
    • :green_circle: harvesterhci.io_upgrades.yaml ![image](https://github.com/user-attachments/assets/44f30072-711f-43cb-8e85-3225173f3d50)
    • :green_circle: harvesterhci.io_versions.yaml ![image](https://github.com/user-attachments/assets/ecc65e11-3484-49a2-ab35-2fe27ae6eea0)
    • :green_circle: harvesterhci.io_virtualmachinebackups.yaml ![image](https://github.com/user-attachments/assets/05a59ee0-0871-4c16-be8f-109535127000)
    • :green_circle: harvesterhci.io_virtualmachineimages.yaml ![image](https://github.com/user-attachments/assets/1c258525-47da-4a7d-a453-e6192fd76751)
    • :green_circle: harvesterhci.io_virtualmachinerestores.yaml ![image](https://github.com/user-attachments/assets/55a78a6c-af09-47da-97aa-d1aa323c6284)
    • :green_circle: harvesterhci.io_virtualmachinetemplates.yaml ![image](https://github.com/user-attachments/assets/33c22189-1c3a-4ac3-b255-cdc594da10e8)
    • :green_circle: harvesterhci.io_virtualmachinetemplateversions.yaml ![image](https://github.com/user-attachments/assets/63acb139-189a-4eca-bc9c-221c856ca567)
  4. :green_circle: Virtual machines are in same state as before and accessible. * VMs ![image](https://github.com/user-attachments/assets/4e623b89-0bff-4990-a089-e09f29ab4e23) * sles15sp6 ![image](https://github.com/user-attachments/assets/78800b1d-91d4-483e-9e32-95c83b5e9381) * ubuntu24 ![image](https://github.com/user-attachments/assets/12a537e2-4f6f-443e-9872-56ea472645ef) * rhel9: Off
  5. :green_circle: Restore the backups, check the data Restore New * sles15sp6 ![image](https://github.com/user-attachments/assets/e5cb3b24-398d-4c92-8caf-b1330ad8c910) * rhel9 ![image](https://github.com/user-attachments/assets/576d3666-b6b4-4d5a-8fae-a067a2006f49) Restore Replace * rhel9 ![image](https://github.com/user-attachments/assets/d889d15e-4a9b-467c-9de3-f2dced89082a) ![image](https://github.com/user-attachments/assets/826c4181-46a3-46d9-a301-252bd7ed2c5d)
  6. :green_circle: Image and volume status * Image ![image](https://github.com/user-attachments/assets/525640bc-6aa3-4a8a-aa54-3c6ed487e5b8) * Volume ![image](https://github.com/user-attachments/assets/1a14e676-dbf8-4021-8cff-09f33f208338)
  7. :green_circle: Monitoring chart status ![image](https://github.com/user-attachments/assets/fe381434-073c-470b-a9a0-e9ce064a6a3b)
  8. :green_circle: VM operations are highlighted and working fine. - [x] Stop ![image](https://github.com/user-attachments/assets/daf8c259-49d7-47f6-ab68-c3f35eca3ad2) - [x] Start ![image](https://github.com/user-attachments/assets/6be61d4e-de4f-48dd-a243-df11ffe1adbe) - [x] Restart - [x] Soft Reboot - [x] Migrate to witness node should fail ![image](https://github.com/user-attachments/assets/e3acc513-52b3-4e2a-a49f-a9e16ef20316) - [x] Migrate to default node - [x] Add Volume
  9. :green_circle: RKE2 guest cluster still works * cluster ![image](https://github.com/user-attachments/assets/c90b9c84-1682-4ee9-97b3-511739ee80bb) * LB ![image](https://github.com/user-attachments/assets/3043bf05-bba3-4440-837d-5c30137f925d)
  10. :green_circle: Upgrade the RKE2 guest cluster to 1.30 ![image](https://github.com/user-attachments/assets/7373b48d-9806-4917-901c-069c4d0f8045)
  11. :green_circle: Upgrade cloud provider and CSI driver ![image](https://github.com/user-attachments/assets/05a0aecb-db55-4286-837f-f600f8a41427) * cloud-provider ![image](https://github.com/user-attachments/assets/7acfc9a0-367a-4f7f-9ad0-20821a8b0e5e) * csi-driver ![image](https://github.com/user-attachments/assets/044a0e3d-6c2c-4aeb-8b27-d431df691c29) > cloud-provider > ![image](https://github.com/user-attachments/assets/c4f40765-e1b5-4fa3-b3b1-a6b542a0f578) > csi-driver > ![image](https://github.com/user-attachments/assets/11281276-71e1-4616-a1c3-a9c48674d265)
  12. :green_circle: Verify DHCP load balancer service and create a new Harvester PVC * LB ![image](https://github.com/user-attachments/assets/5d70f18f-0359-4b7c-a83d-a2b8343a6a0a) * New PVC ![image](https://github.com/user-attachments/assets/19e1e183-766d-4eee-965a-db48ab34490c)
  13. :green_circle: Shutting off VM and then restarting VM - [x] Stop ![image](https://github.com/user-attachments/assets/daf8c259-49d7-47f6-ab68-c3f35eca3ad2) - [x] Start ![image](https://github.com/user-attachments/assets/6be61d4e-de4f-48dd-a243-df11ffe1adbe)
  14. :green_circle: Add a (Compute) node after the upgrade ![image](https://github.com/user-attachments/assets/7d1d9412-29c3-4b91-8ca8-93b34a31568f) ![image](https://github.com/user-attachments/assets/831aaa1e-fca4-4d71-8729-806aebdf5123)