Repository navigation
Conversation
- Azure cloud-node-manager can drop ExternalIP from Node.status.addresses for one 5 minute reconcile cycle while the public IP keeps working - When a GameServer on the same Node was given that ExternalIP and the Node has no ExternalIP, wait 15 minutes before treating it as migrated - When a GameServer was given an internal address while the Node had no external address and the Node has one again, re-apply the address before Ready and move Ready/Reserved GameServers to Unhealthy, keeping Allocated ones - ExternalIP changes to a different value and NodeName changes are handled as before Refs: PDO-1305
There was a problem hiding this comment.
🟡 Changes recommended
Controller image builds fail with the existing build context, the image omits dependency distribution artifacts, and migration handling can misclassify servers or mishandle grace periods.
7 open issues
Fix controller image build contexts and forward version/build tags · New Include dependency notices and source archive in the final image · New Reset migration timers when Node ExternalIP returns · New Preserve migration deadline until the API update succeeds · New Prevent stale migration timers from carrying over to replacement Pods · New Match address types using address() precedence and validity rules · New Validate ExternalIP entries before treating them as available · New
What changed in this PR
This PR aims to prevent transient Node ExternalIP omissions from terminating running GameServers, while correcting internal addresses when external connectivity returns.
Changes:
- Adds a 15-minute migration grace period with per-Pod tracking and delayed retries.
- Handles restored external addresses according to GameServer state, with tests for deferral, expiry, and recovery.
- Switches the controller image to a multi-stage source build and expands the image workflow to include it.
| File | Description |
|---|---|
pkg/gameservers/migration.go |
Adds grace-period tracking and external-address recovery handling. |
pkg/gameservers/migration_test.go |
Tests missing and restored addresses, state transitions, and grace-period timing. |
cmd/controller/Dockerfile |
Builds the controller from source in a multi-stage image. |
.github/workflows/build-images.yml |
Builds and publishes allocator and controller images through a matrix. |
Review effort: Balanced
|
엣지케이스나 상태관리 찌꺼기 피드백들 좀 있네요, 체크해보면 좋을 것 같아요 그리고 언헬시 노드에 Pod을 받는게 아니라 ExtenralIP 없으면 안받고있다가 풀리면 받는게 나을 것 같긴 한데, 주소가 있는걸로 판단해서 어려운거죠? |
- Generate LICENSES and dependencies-src.tgz in the builder stage of the allocator and controller Dockerfiles, as the prebuilt-binary images did - Allow the two build scripts through .dockerignore - Build the allocator and controller images from the repository root in build/Makefile, forwarding VERSION and GO_BUILD_TAGS
- Resolve GameServer and Node address types with address() precedence and IP validity, so equal InternalIP/ExternalIP values or invalid ExternalIP entries do not trigger repeated recreation - Treat a Node as restored only when address() would now pick an external address - Clear the grace period record only after a successful update, on Pod not-found, and on Node updates that bring the ExternalIP back - Key the record by Pod UID so a replacement Pod gets its own grace period
Copilot 리뷰 기반으로 수정했습니다.
문제점은 버그 수정 이외에 추가적인 분기를 만드는건 원본 소스에서 기능이 달라지는 것이라 검토를 좀 더 하면 좋겠습니다 |


Background
cloud-node-managercan drop the ExternalIP from a Node'sstatus.addressesfor one of its 5-minute reconcile cyclesUnhealthyChanges
status.addresses), and the Node has no ExternalIPEnqueueAfterfor 15 minutesUnhealthyso it is recreated