storcon: fix AZ-driven tenant selection in chaos (#10443)

## Problem

In https://github.com/neondatabase/neon/pull/10438 I had got the
function for picking tenants backwards, and it was preferring to move
things _away_ from their preferred AZ.

## Summary of changes

- Fix condition in `is_attached_outside_preferred_az`
This commit is contained in:
John Spray
2025-01-30 22:17:07 +00:00
committed by GitHub
parent 6da7c556c2
commit d18f6198e1

View File

@@ -1806,7 +1806,7 @@ impl TenantShard {
.get(&node_id)
.expect("referenced node exists")
.get_availability_zone_id(),
) == self.intent.preferred_az_id.as_ref()
) != self.intent.preferred_az_id.as_ref()
})
.unwrap_or(false)
}