• Icon: Sub-task Sub-task
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • None
    • None
    • None
    • None
    • False
    • Hide

      None

      Show
      None
    • False
    • None
    • None
    • None
    • None

      Summary

      Modify setBYOH() to allocate nodes from pool when available, falling back to MachineSet creation when pool is unavailable.

      Description

      Integrate node pool allocation into the existing setBYOH() function in test/extended/winc/utils.go. This enables BYOH tests to reuse pre-provisioned Windows nodes, reducing test execution time by ~15 minutes per test.

      Key changes: - Check if node pool is available before creating MachineSet - Allocate from pool using allocateNodeFromPool()when available - Fall back to traditional MachineSet creation when pool unavailable - Maintain full backward compatibility

       

      Acceptance Criteria

      1. setBYOH() checks for pool availability before creating MachineSet
      2. ✅ Successfully allocates from pool when available
      3. ✅ Falls back to MachineSet when pool unavailable/exhausted
      4. ✅ Maintains backward compatibility (same function signature)
      5. ✅ At least one BYOH test (OCP-42484) successfully uses pool
      6. ✅ Time savings measured (~15 min per test)

      Implementation

      Code Location

      test/extended/winc/utils.go - setBYOH() function (around line 1200-1400)

      Key Changes

      {{func setBYOH(oc *exutil.CLI, iaasPlatform string, addressesType []string,
      machinesetName string, winVersion string) []string {

      testID := fmt.Sprintf("test-%s-%d", machinesetName, time.Now().Unix())

      // Try pool allocation first
      if isNodePoolEnabled(oc) {
      e2e.Logf("✅ Node pool available, attempting allocation")

      address, entry, err := allocateNodeFromPool(oc, testID, iaasPlatform)
      if err != nil

      { e2e.Logf("⚠️ Pool allocation failed: %v, falling back to MachineSet", err) }

      else {
      e2e.Logf("🎯 Allocated node %s from pool (saved ~15 min)", address)
      return []string

      {address}

      }
      }

      // Fall back to traditional MachineSet creation
      e2e.Logf("📋 Creating MachineSet: %s", machinesetName)
      // ... existing MachineSet code unchanged ...
      }}}

      Testing

      Test 1: With pool ```bash ./test/extended/testdata/winc/test-node-pool.sh # Create pool ./bin/extended-platform-tests run all --dry-run | grep "OCP-42484" | ./bin/extended-platform-tests run -f -

      Expected: Uses pool, ~15 min faster

      {{*Test 2: Without pool*
      ```bash
      oc delete configmap windows-node-pool -n openshift-windows-machine-config-operator
      ./bin/extended-platform-tests run all --dry-run | grep "OCP-42484" | ./bin/extended-platform-tests run -f -

      1. Expected: Falls back to MachineSet, normal time}}

        Affected Test Cases

      • OCP-42484: Configure BYOH with IP
      • OCP-42496: Configure BYOH with DNS
      • OCP-44099: SSH key rotation
      • OCP-82694: Container image mirroring

      Success Metrics

      • ✅ Code committed to WINC-1508-optimize-byoh-tests branch
      • ✅ OCP-42484 passes with pool (~2 min vs ~17 min)
      • ✅ OCP-42484 passes without pool (backward compatible)
      • ✅ golint and gofmt clean

      Deliverables

      1. Modified setBYOH() in test/extended/winc/utils.go
      2. Test execution logs showing pool usage
      3. Performance metrics (before/after times)

              rhn-support-weinliu Weinan Liu
              rhn-support-weinliu Weinan Liu
              None
              None
              None
              None
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: