diff --git a/nexus/db-queries/src/db/queries/virtual_provisioning_collection_update.rs b/nexus/db-queries/src/db/queries/virtual_provisioning_collection_update.rs index 7cb2f340d4..0d44b5f45c 100644 --- a/nexus/db-queries/src/db/queries/virtual_provisioning_collection_update.rs +++ b/nexus/db-queries/src/db/queries/virtual_provisioning_collection_update.rs @@ -183,15 +183,19 @@ impl DoUpdate { >( not_allocted .and(TrueOrCastError::new( - has_sufficient_cpus, + cpus_provisioned_delta.eq(0).or(has_sufficient_cpus), NOT_ENOUGH_CPUS_SENTINEL, )) .and(TrueOrCastError::new( - has_sufficient_memory, + memory_provisioned_delta + .eq(0) + .or(has_sufficient_memory), NOT_ENOUGH_MEMORY_SENTINEL, )) .and(TrueOrCastError::new( - has_sufficient_storage, + storage_provisioned_delta + .eq(0) + .or(has_sufficient_storage), NOT_ENOUGH_STORAGE_SENTINEL, )), ),))),