From 2b55444f37c4b1cb93064589e38bc498a942720e Mon Sep 17 00:00:00 2001 From: Steve Baker Date: Wed, 15 Jun 2022 10:50:36 +1200 Subject: Allocation candidates prefer matching name This change finds a node with the same name as the allocation and moves it to the beginning of the shuffled candidate list so that node is the first allocation attempt. It is common for node naming scheme to match the node's role (such as compute-1, compute-2). Also this often matches the hostname (allocation name) scheme. Without this change, this scenario will generally result in swapped names (node compute-1 having hostname compute-2, etc). By preferring matching names this situation can be avoided in the majority of cases, while not otherwise affecting the candidiate allocation approach. Change-Id: Ie990bfc209959d58852b9080778602eab5aa30af --- api-ref/source/baremetal-api-v1-allocation.inc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'api-ref') diff --git a/api-ref/source/baremetal-api-v1-allocation.inc b/api-ref/source/baremetal-api-v1-allocation.inc index 808005dba..fe699efae 100644 --- a/api-ref/source/baremetal-api-v1-allocation.inc +++ b/api-ref/source/baremetal-api-v1-allocation.inc @@ -48,7 +48,11 @@ parameters must be missing or match the provided node. Added support for backfilling allocations. .. versionadded:: 1.60 - Introduced the ``owner`` field. + Introduced the ``owner`` field. + +.. versionadded:: 1.79 + A node with the same name as the allocation ``name`` is moved to the + start of the derived candidiate list. Normal response codes: 201 -- cgit v1.2.1