功能:完善云管助手与GPU故障恢复核对
This commit is contained in:
1 parent
b6026f9759
commit
9f7b01e4db
42 files changed
+3576
-120
No files matched your search
@@ -74,7 +74,14 @@ func (s *Server) validateTemplate(c *gin.Context) {
|
||||
s.fail(c, 502, "invalid_template", "模板配置摘要缺失")
|
||||
return
|
||||
}
|
||||
if err = s.DB.GetContext(ctx, &template, "UPDATE image_templates SET digest=$1,validated_at=now() WHERE id=$2 RETURNING *", digest, template.ID); err != nil {
|
||||
// A source template change invalidates the previous hardware-encoding
|
||||
// acceptance. The administrator must verify the updated guest image again
|
||||
// before it can be used for a new desktop, regardless of its OS.
|
||||
hardwareVerified := template.HardwareEncodingVerified
|
||||
if template.Digest != digest {
|
||||
hardwareVerified = false
|
||||
}
|
||||
if err = s.DB.GetContext(ctx, &template, "UPDATE image_templates SET digest=$1,validated_at=now(),hardware_encoding_verified=$2 WHERE id=$3 RETURNING *", digest, hardwareVerified, template.ID); err != nil {
|
||||
s.dbError(c, err)
|
||||
return
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user