-
Sub-task
-
Resolution: Unresolved
-
Undefined
-
None
-
None
-
None
-
None
-
None
-
False
-
-
False
-
None
-
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
- ✅ setBYOH() checks for pool availability before creating MachineSet
- ✅ Successfully allocates from pool when available
- ✅ Falls back to MachineSet when pool unavailable/exhausted
- ✅ Maintains backward compatibility (same function signature)
- ✅ At least one BYOH test (OCP-42484) successfully uses pool
- ✅ 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
else {
e2e.Logf("🎯 Allocated node %s from pool (saved ~15 min)", address)
return []string
}
}
// 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 -
- 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
- Modified setBYOH() in test/extended/winc/utils.go
- Test execution logs showing pool usage
- Performance metrics (before/after times)