Skip to content

Commit 47b59d3

Browse files
committed
<fix>[ai]: add clusterId column to ModelServiceInstanceVO for node restart recovery
Add flyway migration to persist clusterId on ModelServiceInstanceVO so that inference service restart can locate the K8s cluster even after Pod eviction. Includes backfill of existing data from PodVO. Resolves: ZSTAC-81566 Change-Id: I3136b558d35bf723b49203e4cdcf351c0cd33a37
1 parent ce1fd9a commit 47b59d3

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

conf/db/upgrade/V5.5.6__schema.sql

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,3 +190,12 @@ WHERE p.type NOT IN (
190190
'GPU_Co_Processor',
191191
'GPU_Communication_Controller'
192192
);
193+
194+
-- ZSTAC-81566: Persist clusterId on ModelServiceInstanceVO to survive node restart
195+
CALL ADD_COLUMN('ModelServiceInstanceVO', 'clusterId', 'BIGINT', 1, NULL);
196+
197+
-- Backfill existing data from PodVO
198+
UPDATE ModelServiceInstanceVO msi
199+
INNER JOIN PodVO p ON msi.vmInstanceUuid = p.uuid
200+
SET msi.clusterId = p.clusterId
201+
WHERE msi.clusterId IS NULL AND p.clusterId IS NOT NULL;

0 commit comments

Comments
 (0)