mirror of
https://github.com/dsx-ai-factory/nvke.git
synced 2026-12-07 04:35:58 +08:00
* feat(controller): let a node pool update set its NVLink logical partition
PATCH /api/nodePools/{id} now accepts nico.nvLinkLogicalPartitionID. It sets
or replaces the pool's NVLink logical partition; the all-zero UUID is
rejected, so the partition cannot be cleared. Nodes the pool creates after
the update attach to the new partition. A partition change does not create a
new node set, so no existing node is replaced.
A NicoMachine that already exists keeps the partition it was created with
when its create is retried, because CAPNICo rejects a partition change once
the instance exists.
The NICo provider guide shows how to attach a pool's existing nodes by
updating their NICo instances directly.
Signed-off-by: Aaron Patten <apatten@nvidia.com>
* docs(nico): set the NICo token and check each instance after an NVLink update
Read the NICo API path and token from the nico-credentials Secret, list pool
machines that have no instance yet, and add a step that confirms each instance
reports the partition on every GPU.
Signed-off-by: Aaron Patten <apatten@nvidia.com>
* fix(controller): create a node set when a pool's NVLink partition changes
Treat the NVLink logical partition like the other editable node
configuration: a change creates a new current node set, and each node gets
the partition of its own node set instead of the pool's live value. Nodes
created after the change attach to the new partition; existing nodes stay in
the earlier node set until they are replaced or patched in NICo.
A retried create renders from the same node set, so the separate retry guard
is no longer needed and is removed.
Node sets backfilled when the nico payload columns were added never carried
the partition. A migration copies each pool's partition into its node sets
that lack it, so the upgrade creates no node sets and new nodes keep their
partition. Before this change the partition was fixed at creation, so the
pool's value is the one every node set was created with.
The node set API reports the partition, and the NICo provider guide describes
the node set and recycling behavior.
Signed-off-by: Aaron Patten <apatten@nvidia.com>
* test(nico): render a node's NVLink partition from its node set across retries
Signed-off-by: Aaron Patten <apatten@nvidia.com>
* docs(nico): keep the NICo token off the curl command line in the NVLink procedure
Read the Authorization header from a file only the operator can read, build
the request body once and reject a GPU count below 1, print the response body
of a failed update and say which failures a retry can fix.
Signed-off-by: Aaron Patten <apatten@nvidia.com>
* docs: move the NVLink partition procedure to its own operate page
Changing a node pool's NVLink partition and attaching its existing nodes is an
operational task, not part of configuring the NICo provider at install. Give it
a how-to page in the Operate section that also shows the pool update itself,
and link to it from the NICo identifiers table.
Signed-off-by: Aaron Patten <apatten@nvidia.com>
* docs: stop on a failed pool update and skip attached instances
Signed-off-by: Aaron Patten <apatten@nvidia.com>
---------
Signed-off-by: Aaron Patten <apatten@nvidia.com>
27 lines
819 B
Go
27 lines
819 B
Go
// SPDX-FileCopyrightText: Copyright (c) 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
|
// SPDX-License-Identifier: Apache-2.0
|
|
|
|
package server
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/google/uuid"
|
|
"github.com/stretchr/testify/assert"
|
|
"github.com/stretchr/testify/require"
|
|
|
|
"github.com/dsx-ai-factory/nvke/controller/internal/db"
|
|
)
|
|
|
|
func TestAPINicoNodeSetProviderFromDB_NVLinkLogicalPartition(t *testing.T) {
|
|
t.Parallel()
|
|
partitionID := uuid.New()
|
|
|
|
got := apiNicoNodeSetProviderFromDB(&db.NicoNodePoolProvider{Release: "os-v1", NvLinkLogicalPartitionID: &partitionID})
|
|
require.NotNil(t, got.NvLinkLogicalPartitionID)
|
|
assert.Equal(t, partitionID, *got.NvLinkLogicalPartitionID)
|
|
|
|
got = apiNicoNodeSetProviderFromDB(&db.NicoNodePoolProvider{Release: "os-v1"})
|
|
assert.Nil(t, got.NvLinkLogicalPartitionID)
|
|
}
|