Service: Create join tokens with a lifetime of 1 hour#1341
Service: Create join tokens with a lifetime of 1 hour#1341roosterfish merged 1 commit intocanonical:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR increases MicroCloud service join-token lifetimes to better accommodate slow or long-running join scenarios (per issue #1339), reducing failures when nodes/services take longer to come online and complete clustering.
Changes:
- Extend MicroCloud join-token TTL from 5 minutes to 1 hour for MicroCloud, MicroOVN, and MicroCeph services.
- Update GoDoc comments to reflect the new 1-hour token lifetime and rationale.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| service/microovn.go | Increase MicroOVN join-token TTL to 1 hour and update IssueToken docs. |
| service/microcloud.go | Increase MicroCloud join-token TTL to 1 hour and update IssueToken docs. |
| service/microceph.go | Increase MicroCeph join-token TTL to 1 hour and update IssueToken docs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
95f7741 to
28f931d
Compare
|
Pipeline fails until #1338 is merged. |
This accommodates slower environments but especially join procedures with lots of necessary setup actions. An example is setting up a MicroCloud with many OSDs. Fixes canonical#1339. Signed-off-by: Julian Pelizäus <julian.pelizaeus@canonical.com>
28f931d to
5a67e54
Compare
| ) | ||
|
|
||
| // ServiceJoinTokenLifetime is the duration for which a join token issued by a service will be valid. | ||
| const ServiceJoinTokenLifetime = time.Hour |
There was a problem hiding this comment.
Just out of curiosity, why we are extending the lifetime to an hour specifically (for example are 30 mins insufficient)?
There was a problem hiding this comment.
The max session timeout for joining/discovering MicroCloud members is also capped at one hour.
So I didn't want to go beyond what we already defined to be a max limit for joining a MicroCloud.
Now equally it should be safe to say that join tokens are also permitted to last for one hour.
With one hour I suspect we can accommodate all of the scenarios in which MicroCloud gets deployed with many resources or on slower environments.
tugbataluy
left a comment
There was a problem hiding this comment.
Extending the lifetime seems reasonable to me, thanks ❇️ .
Fixes #1339