Repository navigation
fix(pool): keep pooled sessions claimable across pier upgrades - #44
Merged
Merged
Conversation
A claim never reinstalled the in-VM supervisor, so pooled sessions were fingerprinted with the pier build that filled them and every upgrade turned the whole pool stale: the next session always started cold. The claim now installs the claiming pier's supervisor the same way a create does, and the build is no longer part of the pool generation.
Contributor
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do and why?
A claim never reinstalled the in-VM supervisor, so the pool generation included the pier build that filled each member. Every pier upgrade therefore invalidated every pooled session. The first session after an upgrade found nothing claimable and started cold, and only its refill rebuilt the pool. Now the claim installs the claiming pier's supervisor and its units, with the same install block a create uses, and the build is no longer part of the generation. A pier upgrade leaves pools claimable. Image, disk, instance type and setup-script changes still recycle members.
The claim pushes one more file, the supervisor binary (about 5 MB), which every create already sends.
Related issue
None.
Tests
TestFreshenInstallsTheClaimingSupervisor: freshen installs the supervisor after dropping the restored layout, restarts the running one, and uses the same block as bootstrap.TestGenerationno longer takes a build input.go test ./...,go vet ./...,gofmt -landmake buildall pass.Checklist
gofmt -l .produces no output andgo vet ./...passesmake buildsucceeds (if this touches supervisor/session code)