Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions conf/db/upgrade/V5.5.32__schema.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
CALL ADD_COLUMN('ModelServiceInstanceVO', 'placementMode', 'VARCHAR(32)', 1, NULL);
CALL ADD_COLUMN('ModelServiceInstanceVO', 'targetUuid', 'VARCHAR(32)', 1, NULL);
CALL ADD_COLUMN('ModelServiceInstanceVO', 'gpuSpecUuid', 'VARCHAR(32)', 1, NULL);
CALL ADD_COLUMN('ModelServiceInstanceVO', 'gpuCount', 'INT(10)', 1, NULL);
CALL ADD_COLUMN('ModelServiceInstanceVO', 'runtimeCpuNum', 'INT(10)', 1, NULL);
CALL ADD_COLUMN('ModelServiceInstanceVO', 'runtimeMemorySize', 'BIGINT', 1, NULL);
CALL ADD_COLUMN('ModelServiceInstanceVO', 'runtimeUid', 'BIGINT', 1, NULL);
CALL ADD_COLUMN('ModelServiceInstanceVO', 'runtimeGid', 'BIGINT', 1, NULL);
CALL ADD_COLUMN('ModelServiceInstanceVO', 'topologyRequirement', 'VARCHAR(32)', 1, NULL);
CALL ADD_COLUMN('ModelServiceInstanceVO', 'distributionStrategy', 'VARCHAR(32)', 1, NULL);
CALL ADD_COLUMN('ModelServiceInstanceVO', 'allocationUuid', 'VARCHAR(32)', 1, NULL);
CALL ADD_COLUMN('ModelServiceInstanceVO', 'allocationGeneration', 'BIGINT', 1, NULL);
CALL ADD_COLUMN('ModelServiceInstanceVO', 'gpuBindings', 'MEDIUMTEXT', 1, NULL);
CALL ADD_COLUMN('ModelServiceInstanceVO', 'portBindings', 'MEDIUMTEXT', 1, NULL);
CALL ADD_COLUMN('ModelServiceInstanceVO', 'desiredState', 'VARCHAR(32)', 1, NULL);
CALL ADD_COLUMN('ModelServiceInstanceVO', 'runtimePhase', 'VARCHAR(32)', 1, NULL);
CALL ADD_COLUMN('ModelServiceInstanceVO', 'healthStatus', 'VARCHAR(32)', 1, NULL);
CALL ADD_COLUMN('ModelServiceInstanceVO', 'runtimeConditions', 'MEDIUMTEXT', 1, NULL);
CALL CREATE_INDEX('ModelServiceInstanceVO', 'idx_ModelServiceInstanceVO_targetUuid', 'targetUuid');
CALL CREATE_INDEX('ModelServiceInstanceVO', 'idx_ModelServiceInstanceVO_allocationUuid', 'allocationUuid');

CALL ADD_COLUMN('BareMetal2ChassisGpuDeviceVO', 'hardwareId', 'VARCHAR(255)', 1, NULL);
CALL ADD_COLUMN('BareMetal2ChassisGpuDeviceVO', 'inventoryGeneration', 'BIGINT', 1, NULL);
CALL ADD_COLUMN('BareMetal2ChassisGpuDeviceVO', 'visibility', 'MEDIUMTEXT', 1, NULL);
CALL ADD_COLUMN('BareMetal2ChassisGpuDeviceVO', 'driverReady', 'TINYINT(1)', 1, NULL);
CALL ADD_COLUMN('BareMetal2ChassisGpuDeviceVO', 'driverVersion', 'VARCHAR(255)', 1, NULL);
CALL ADD_COLUMN('BareMetal2ChassisGpuDeviceVO', 'authoritativeIdentity', 'MEDIUMTEXT', 1, NULL);
CALL ADD_COLUMN('BareMetal2ChassisGpuDeviceVO', 'dedicatedDeviceNodes', 'MEDIUMTEXT', 1, NULL);
CALL ADD_COLUMN('BareMetal2ChassisGpuDeviceVO', 'sharedDeviceNodes', 'MEDIUMTEXT', 1, NULL);
CALL ADD_COLUMN('BareMetal2ChassisGpuDeviceVO', 'numaNode', 'INT', 1, NULL);
CALL ADD_COLUMN('BareMetal2ChassisGpuDeviceVO', 'topology', 'MEDIUMTEXT', 1, NULL);
CALL ADD_COLUMN('BareMetal2ChassisGpuDeviceVO', 'topologyStatus', 'VARCHAR(32)', 1, NULL);
CALL ADD_COLUMN('BareMetal2ChassisGpuDeviceVO', 'topologySource', 'VARCHAR(255)', 1, NULL);
CALL ADD_COLUMN('BareMetal2ChassisGpuDeviceVO', 'topologyObservedAt', 'VARCHAR(64)', 1, NULL);
CALL ADD_COLUMN('BareMetal2ChassisGpuDeviceVO', 'topologyValidUntil', 'VARCHAR(64)', 1, NULL);
CALL CREATE_INDEX('BareMetal2ChassisGpuDeviceVO', 'idx_Bm2ChassisGpuDevice_hardwareId', 'hardwareId');
26 changes: 26 additions & 0 deletions conf/i18n/globalErrorCodeMapping/global-error-en_US.json
Original file line number Diff line number Diff line change
Expand Up @@ -4745,6 +4745,32 @@
"ORG_ZSTACK_AI_10164": "Model[name:%s, uuid:%s] is not shared to the account that owns this VM (or to public). Mount requires the model to be accessible under the same sharing rules as the VM.",
"ORG_ZSTACK_AI_10165": "ModelCenter[uuid:%s] not found for Model[name:%s, uuid:%s]",
"ORG_ZSTACK_AI_10167": "Model service instance group[uuid:%s] is being deleted; stop waiting for service boot up",
"ORG_ZSTACK_AI_10168": "BareMetal2 deployment requires gpuSpecUuid",
"ORG_ZSTACK_AI_10169": "BareMetal2 deployment requires gpuCount > 0",
"ORG_ZSTACK_AI_10170": "Pinned BareMetal2 placement requires targetUuid",
"ORG_ZSTACK_AI_10171": "Auto BareMetal2 placement must not specify targetUuid",
"ORG_ZSTACK_AI_10172": "BareMetal2 deployment currently supports exactly one model service per group",
"ORG_ZSTACK_AI_10173": "BareMetal2 deployment requires a non-empty service YAML",
"ORG_ZSTACK_AI_10174": "BareMetal2 deployment requires service.startCommand in model service YAML",
"ORG_ZSTACK_AI_10175": "BareMetal2 model service tasks are not supported in this slice",
"ORG_ZSTACK_AI_10176": "BareMetal2 model service restart is not implemented in this slice",
"ORG_ZSTACK_AI_10177": "No eligible BareMetal2 target satisfied placement, specification, or resource constraints: %s",
"ORG_ZSTACK_AI_10178": "BareMetal2 target[uuid:%s] not found",
"ORG_ZSTACK_AI_10179": "BareMetal2 target[uuid:%s] must be Running and Connected, current state/status: %s/%s",
"ORG_ZSTACK_AI_10180": "BareMetal2 target[uuid:%s] has no chassis binding",
"ORG_ZSTACK_AI_10181": "Model service instance group[uuid:%s] not found",
"ORG_ZSTACK_AI_10182": "gpuSpecUuid[%s] not found",
"ORG_ZSTACK_AI_10183": "BareMetal2 runtime client is not configured for allocationUuid[%s]",
"ORG_ZSTACK_AI_10184": "prepare request allocationUuid[%s] mismatches workloadSpec allocationUuid[%s]",
"ORG_ZSTACK_AI_10185": "prepare request generation[%s] mismatches workloadSpec generation[%s]",
"ORG_ZSTACK_AI_10186": "generation payload mismatch for allocationUuid[%s] generation[%s]",
"ORG_ZSTACK_AI_10187": "allocationUuid[%s] is not prepared",
"ORG_ZSTACK_AI_10188": "allocationUuid[%s] generation[%s] has not been prepared locally",
"ORG_ZSTACK_AI_10189": "allocationUuid[%s] was not found locally",
"ORG_ZSTACK_AI_10190": "allocationUuid[%s] must be stopped before release, current phase[%s]",
"ORG_ZSTACK_AI_10191": "generation %s is older than local generation %s for allocationUuid[%s]",
"ORG_ZSTACK_AI_10192": "BareMetal2 workload-spec rendering failed: %s",
"ORG_ZSTACK_AI_10193": "BareMetal2 deploy validation failed: %s",
"ORG_ZSTACK_NETWORK_ZNS_10043": "failed to allocate DHCPv4 server IP for ZNS L3[uuid:%s]",
"ORG_ZSTACK_NETWORK_ZNS_10044": "cannot enable DHCP: L3[uuid:%s] has no eligible IpRange (SLAAC excluded)",
"ORG_ZSTACK_NETWORK_ZNS_10045": "cannot enable DHCP: L3[uuid:%s] has no Cloud-reserved DHCPv4 server IP",
Expand Down
26 changes: 26 additions & 0 deletions conf/i18n/globalErrorCodeMapping/global-error-zh_CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -4752,6 +4752,32 @@
"ORG_ZSTACK_AI_10164": "模型「%s」(UUID: %s) 与该虚拟机所属账户的共享规则不匹配,无法挂载。\n请确认模型已共享给该账户或设为公开。",
"ORG_ZSTACK_AI_10165": "模型中心 (UUID: %s) 未找到(关联模型: 「%s」UUID: %s)。\n请检查模型中心是否已被删除。",
"ORG_ZSTACK_AI_10167": "推理服务实例组[uuid:%s]正在删除,停止等待服务启动",
"ORG_ZSTACK_AI_10168": "BareMetal2 部署要求指定 gpuSpecUuid",
"ORG_ZSTACK_AI_10169": "BareMetal2 部署要求 gpuCount > 0",
"ORG_ZSTACK_AI_10170": "Pinned BareMetal2 放置模式要求指定 targetUuid",
"ORG_ZSTACK_AI_10171": "Auto BareMetal2 放置模式不能指定 targetUuid",
"ORG_ZSTACK_AI_10172": "BareMetal2 当前每个服务组只支持部署一个模型服务",
"ORG_ZSTACK_AI_10173": "BareMetal2 部署要求非空的 service YAML",
"ORG_ZSTACK_AI_10174": "BareMetal2 部署要求模型服务 YAML 中包含 service.startCommand",
"ORG_ZSTACK_AI_10175": "当前切片不支持 BareMetal2 模型服务任务",
"ORG_ZSTACK_AI_10176": "当前切片未实现 BareMetal2 模型服务重启",
"ORG_ZSTACK_AI_10177": "没有符合放置、规格或资源约束的 BareMetal2 目标: %s",
"ORG_ZSTACK_AI_10178": "BareMetal2 目标[uuid:%s]不存在",
"ORG_ZSTACK_AI_10179": "BareMetal2 目标[uuid:%s]必须处于 Running 且 Connected,当前 state/status: %s/%s",
"ORG_ZSTACK_AI_10180": "BareMetal2 目标[uuid:%s]没有 chassis 绑定",
"ORG_ZSTACK_AI_10181": "模型服务实例组[uuid:%s]不存在",
"ORG_ZSTACK_AI_10182": "gpuSpecUuid[%s]不存在",
"ORG_ZSTACK_AI_10183": "allocationUuid[%s] 未配置 BareMetal2 runtime client",
"ORG_ZSTACK_AI_10184": "prepare 请求 allocationUuid[%s] 与 workloadSpec allocationUuid[%s] 不匹配",
"ORG_ZSTACK_AI_10185": "prepare 请求 generation[%s] 与 workloadSpec generation[%s] 不匹配",
"ORG_ZSTACK_AI_10186": "allocationUuid[%s] generation[%s] 的请求负载不匹配",
"ORG_ZSTACK_AI_10187": "allocationUuid[%s] 尚未 prepare",
"ORG_ZSTACK_AI_10188": "allocationUuid[%s] generation[%s] 尚未在本地 prepare",
"ORG_ZSTACK_AI_10189": "本地不存在 allocationUuid[%s]",
"ORG_ZSTACK_AI_10190": "allocationUuid[%s] 在 release 前必须先停止,当前 phase[%s]",
"ORG_ZSTACK_AI_10191": "allocationUuid[%3$s] 请求 generation[%1$s] 落后于本地 generation[%2$s]",
"ORG_ZSTACK_AI_10192": "BareMetal2 workload-spec 渲染失败: %s",
"ORG_ZSTACK_AI_10193": "BareMetal2 部署校验失败: %s",
"ORG_ZSTACK_NETWORK_ZNS_10043": "为 ZNS 三层网络[uuid:%s]分配 DHCPv4 服务 IP 失败",
"ORG_ZSTACK_NETWORK_ZNS_10044": "无法启用 DHCP:三层网络[uuid:%s]没有可用的 IP 范围(不包含 SLAAC)",
"ORG_ZSTACK_NETWORK_ZNS_10045": "无法启用 DHCP:三层网络[uuid:%s]没有云端预留的 DHCPv4 服务 IP",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,116 @@ public boolean getIsDriverLoaded() {
return this.isDriverLoaded;
}

public java.lang.String hardwareId;
public void setHardwareId(java.lang.String hardwareId) {
this.hardwareId = hardwareId;
}
public java.lang.String getHardwareId() {
return this.hardwareId;
}

public java.lang.Long inventoryGeneration;
public void setInventoryGeneration(java.lang.Long inventoryGeneration) {
this.inventoryGeneration = inventoryGeneration;
}
public java.lang.Long getInventoryGeneration() {
return this.inventoryGeneration;
}

public java.lang.String visibility;
public void setVisibility(java.lang.String visibility) {
this.visibility = visibility;
}
public java.lang.String getVisibility() {
return this.visibility;
}

public java.lang.Boolean driverReady;
public void setDriverReady(java.lang.Boolean driverReady) {
this.driverReady = driverReady;
}
public java.lang.Boolean getDriverReady() {
return this.driverReady;
}

public java.lang.String driverVersion;
public void setDriverVersion(java.lang.String driverVersion) {
this.driverVersion = driverVersion;
}
public java.lang.String getDriverVersion() {
return this.driverVersion;
}

public java.lang.String authoritativeIdentity;
public void setAuthoritativeIdentity(java.lang.String authoritativeIdentity) {
this.authoritativeIdentity = authoritativeIdentity;
}
public java.lang.String getAuthoritativeIdentity() {
return this.authoritativeIdentity;
}

public java.lang.String dedicatedDeviceNodes;
public void setDedicatedDeviceNodes(java.lang.String dedicatedDeviceNodes) {
this.dedicatedDeviceNodes = dedicatedDeviceNodes;
}
public java.lang.String getDedicatedDeviceNodes() {
return this.dedicatedDeviceNodes;
}

public java.lang.String sharedDeviceNodes;
public void setSharedDeviceNodes(java.lang.String sharedDeviceNodes) {
this.sharedDeviceNodes = sharedDeviceNodes;
}
public java.lang.String getSharedDeviceNodes() {
return this.sharedDeviceNodes;
}

public java.lang.Integer numaNode;
public void setNumaNode(java.lang.Integer numaNode) {
this.numaNode = numaNode;
}
public java.lang.Integer getNumaNode() {
return this.numaNode;
}

public java.lang.String topology;
public void setTopology(java.lang.String topology) {
this.topology = topology;
}
public java.lang.String getTopology() {
return this.topology;
}

public java.lang.String topologyStatus;
public void setTopologyStatus(java.lang.String topologyStatus) {
this.topologyStatus = topologyStatus;
}
public java.lang.String getTopologyStatus() {
return this.topologyStatus;
}

public java.lang.String topologySource;
public void setTopologySource(java.lang.String topologySource) {
this.topologySource = topologySource;
}
public java.lang.String getTopologySource() {
return this.topologySource;
}

public java.lang.String topologyObservedAt;
public void setTopologyObservedAt(java.lang.String topologyObservedAt) {
this.topologyObservedAt = topologyObservedAt;
}
public java.lang.String getTopologyObservedAt() {
return this.topologyObservedAt;
}

public java.lang.String topologyValidUntil;
public void setTopologyValidUntil(java.lang.String topologyValidUntil) {
this.topologyValidUntil = topologyValidUntil;
}
public java.lang.String getTopologyValidUntil() {
return this.topologyValidUntil;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public Result throwExceptionIfError() {
@Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false)
public java.util.Map startupParameters;

@Param(required = true, validValues = {"VirtualMachine","Container"}, nonempty = false, nullElements = false, emptyString = true, noTrim = false)
@Param(required = true, validValues = {"VirtualMachine","Container","BareMetal2"}, nonempty = false, nullElements = false, emptyString = true, noTrim = false)
public java.lang.String type;

@Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false)
Expand Down Expand Up @@ -100,6 +100,18 @@ public Result throwExceptionIfError() {
@Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false)
public java.lang.String projectUuid;

@Param(required = false, validValues = {"Auto","Pinned"}, nonempty = false, nullElements = false, emptyString = true, noTrim = false)
public java.lang.String placementMode;

@Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false)
public java.lang.String targetUuid;

@Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false)
public java.lang.String gpuSpecUuid;

@Param(required = false, nonempty = false, nullElements = false, emptyString = true, numberRange = {1L,2147483647L}, noTrim = false)
public java.lang.Integer gpuCount;

@Param(required = false)
public java.lang.String resourceUuid;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public Result throwExceptionIfError() {
@Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false)
public java.util.Map startupParameters;

@Param(required = true, validValues = {"VirtualMachine","Container"}, nonempty = false, nullElements = false, emptyString = true, noTrim = false)
@Param(required = true, validValues = {"VirtualMachine","Container","BareMetal2"}, nonempty = false, nullElements = false, emptyString = true, noTrim = false)
public java.lang.String type;

@Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false)
Expand Down Expand Up @@ -151,6 +151,18 @@ public Result throwExceptionIfError() {
@Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false)
public java.lang.String projectUuid;

@Param(required = false, validValues = {"Auto","Pinned"}, nonempty = false, nullElements = false, emptyString = true, noTrim = false)
public java.lang.String placementMode;

@Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false)
public java.lang.String targetUuid;

@Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false)
public java.lang.String gpuSpecUuid;

@Param(required = false, nonempty = false, nullElements = false, emptyString = true, numberRange = {1L,2147483647L}, noTrim = false)
public java.lang.Integer gpuCount;

@Param(required = false)
public java.lang.String resourceUuid;

Expand Down
14 changes: 13 additions & 1 deletion sdk/src/main/java/org/zstack/sdk/DeployModelServiceAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public Result throwExceptionIfError() {
@Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false)
public java.util.Map startupParameters;

@Param(required = true, validValues = {"VirtualMachine","Container"}, nonempty = false, nullElements = false, emptyString = true, noTrim = false)
@Param(required = true, validValues = {"VirtualMachine","Container","BareMetal2"}, nonempty = false, nullElements = false, emptyString = true, noTrim = false)
public java.lang.String type;

@Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false)
Expand Down Expand Up @@ -100,6 +100,18 @@ public Result throwExceptionIfError() {
@Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false)
public java.lang.String projectUuid;

@Param(required = false, validValues = {"Auto","Pinned"}, nonempty = false, nullElements = false, emptyString = true, noTrim = false)
public java.lang.String placementMode;

@Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false)
public java.lang.String targetUuid;

@Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false)
public java.lang.String gpuSpecUuid;

@Param(required = false, nonempty = false, nullElements = false, emptyString = true, numberRange = {1L,2147483647L}, noTrim = false)
public java.lang.Integer gpuCount;

@Param(required = false)
public java.lang.String resourceUuid;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public Result throwExceptionIfError() {
@Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false)
public java.util.Map startupParameters;

@Param(required = true, validValues = {"VirtualMachine","Container"}, nonempty = false, nullElements = false, emptyString = true, noTrim = false)
@Param(required = true, validValues = {"VirtualMachine","Container","BareMetal2"}, nonempty = false, nullElements = false, emptyString = true, noTrim = false)
public java.lang.String type;

@Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false)
Expand Down Expand Up @@ -109,6 +109,18 @@ public Result throwExceptionIfError() {
@Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false)
public java.lang.String projectUuid;

@Param(required = false, validValues = {"Auto","Pinned"}, nonempty = false, nullElements = false, emptyString = true, noTrim = false)
public java.lang.String placementMode;

@Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false)
public java.lang.String targetUuid;

@Param(required = false, nonempty = false, nullElements = false, emptyString = true, noTrim = false)
public java.lang.String gpuSpecUuid;

@Param(required = false, nonempty = false, nullElements = false, emptyString = true, numberRange = {1L,2147483647L}, noTrim = false)
public java.lang.Integer gpuCount;

@Param(required = false)
public java.lang.String resourceUuid;

Expand Down
Loading