Repository navigation
Use timesync status to decide when to upgrade boundary NTP zones - #8616
Conversation
75b39c7 to
30a86a1
Compare
6bbc962 to
0873e92
Compare
30a86a1 to
2ded09d
Compare
0873e92 to
322598b
Compare
2ded09d to
e784b52
Compare
322598b to
bfe4c7a
Compare
e784b52 to
568a4db
Compare
bfe4c7a to
84fbbe8
Compare
568a4db to
71e2738
Compare
84fbbe8 to
e176df8
Compare
71e2738 to
91d9377
Compare
e176df8 to
d4d98cd
Compare
andrewjstone
left a comment
There was a problem hiding this comment.
Great testing. Easy to read :)
| hash: fake_hash, | ||
| }; | ||
| let artifacts = vec![ | ||
| // Omit `BoundaryNtp` because it has the same artifact name as |
There was a problem hiding this comment.
Is there an issue or anything describing this? Is it something that we need to fix?
There was a problem hiding this comment.
#8510 is closely related but doesn't talk about this specifically. I think the issue here is that BoundaryNtp and InternalNtp are critically distinct from each other in some ways, but all of those ways are exclusively runtime config things: the actual artifact for both types is identical. I don't think it's something to fix? Although maybe we should have a helper somewhere for "build me a complete fake set of artifacts", so we could stop copy-pasting this.
There was a problem hiding this comment.
I went ahead and pulled this into a helper function
| } | ||
| true | ||
| } | ||
| ZoneKind::BoundaryNtp => { |
There was a problem hiding this comment.
I love how straightforward this logic is.
|
|
||
| // Find all boundary NTP zones | ||
| let mut boundary_ntp_zones = std::collections::HashSet::new(); | ||
| for sled_agent in self.inventory.sled_agents.iter() { |
There was a problem hiding this comment.
Should this be looking at the current blueprint instead of inventory? If we have an out-of-date inventory, this might show us a boundary NTP zone that has since been expunged (and if it's also still in inventory.ntp_timesync, we'd count it as a sync'd zone).
There was a problem hiding this comment.
Sure thing, went ahead and updated this
| hash: fake_hash, | ||
| }; | ||
| let artifacts = vec![ | ||
| // Omit `BoundaryNtp` because it has the same artifact name as |
There was a problem hiding this comment.
#8510 is closely related but doesn't talk about this specifically. I think the issue here is that BoundaryNtp and InternalNtp are critically distinct from each other in some ways, but all of those ways are exclusively runtime config things: the actual artifact for both types is identical. I don't think it's something to fix? Although maybe we should have a helper somewhere for "build me a complete fake set of artifacts", so we could stop copy-pasting this.
bea6e02 to
5f2c4dd
Compare
fe7c677 to
00bfef8
Compare
| // Find all boundary NTP zones expected by our parent blueprint. | ||
| let mut boundary_ntp_zones = std::collections::HashSet::new(); | ||
| for sled_config in | ||
| self.blueprint.parent_blueprint().sleds.values() |
There was a problem hiding this comment.
I think we want the currently-being-planned blueprint, not the parent, right? Expungement planning is the first thing we do, so we could have just expunged a boundary NTP zone (or even a sled), and we wouldn't want to count those here.
There was a problem hiding this comment.
agh, yup, updated to use the "blueprint builder" methods to act on the under-construction blueprint
00bfef8 to
05c4e8f
Compare
Depends on #8603
Prevent the planner from tearing down boundary NTP zones when we are not at expected "BOUNDARY_NTP_REDUNDANCY" synchronized zones.
Adds a test which demonstrates that we'll only drop "one zone" below redundancy during an upgrade, and never
further than that.
Fixes #8547