Skip to content

elastic_kubernetes_service: add management plane operations - #6

Open
ashishsuneja wants to merge 4 commits into
Management_Plane_Combinedfrom
pr_2_eks_implementation
Open

ashishsuneja wants to merge 4 commits into
Management_Plane_Combinedfrom
pr_2_eks_implementation

Conversation

@ashishsuneja

Copy link
Copy Markdown
Owner

Summary
Adds EKS-specific implementations of management plane async methods,
replacing manual retry loops with structured retry logic.

Main changes

  • elastic_kubernetes_service.py: CreateNodePoolAsync, DeleteNodePoolAsync,
    UpgradeNodePoolAsync, UpdateClusterAsync, WaitForOperation,
    ResolveNodePoolVersions; manual retry loops replaced; _DiscoverSubnetsPerAZ
    gated behind --eks_reserve_capacity_per_az flag (default off)
  • elastic_kubernetes_service_test.py: time.sleep mocked; 4 new management
    plane tests

What for
Provides EKS backend for the kubernetes_management benchmark. Capacity
reservation support is flag-gated (default off) to avoid changing existing
benchmark behavior per cagataygurturk's review comment.

How the change was tested

  • 43/44 tests passing (1 pre-existing failure unrelated to this PR)
  • End-to-end EKS run: 99 pools, 100% success all 7 scenarios, run 3b2bfb59
  • Flags: --zone=us-east-1a --k8s_mgmt_concurrent_nodepools=99
  • pyink clean

- GetNodePoolNames: logging.warning → raise GetError
- CreateNodePoolAsync: replace manual retry loop with vm_util.Retry
  (max 5 retries, exponential backoff from 10s)
- UpdateClusterAsync: replace manual retry loop with vm_util.Retry
  (max 10 retries, 30s interval)

Addresses hubatish feedback — use vm_util.Retry, let things fail.
elastic_kubernetes_service.py:
- Add import time
- Gate _DiscoverSubnetsPerAZ behind eks_reserve_capacity_per_az flag
- Replace vm_util.Retry decorators with simple retry loops
- Fix vm_util.Retry params (exponential_sleep_multiplier not valid)

elastic_kubernetes_service_test.py:
- Mock time.sleep in EksManagementPlaneTest.setUp to prevent hangs
- Update testUpgradeNodePoolAsyncReturnsNgActiveHandle to mock subnets

kubernetes_management_benchmark_test.py:
- testRunCallsCleanStartSweep: expect 2 calls (Run + before Scenario C)
- Add __iter__ to _OpResult for tuple unpacking in tests
- Add _OpSamples tuple support for backward compat with tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants