Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
216 commits
Select commit Hold shift + click to select a range
adf7220
<fix>[compute]: add opaque on check root disk settings failed
Jan 13, 2026
bba3f92
<fix>[kvm]: add VM edk tags
Jan 13, 2026
af0be84
Merge branch 'zsv-ldap-2@@2' into 'feature-zsv-5.0.0-vm-support-vtpm-…
Jan 14, 2026
27aef22
<fix>[conf]: add V5.0.0__schema.sql
Feb 5, 2026
3056eac
<feature>[header]: add TPM depandency
Feb 3, 2026
f3eff9b
Merge branch 'zsv-ldap-9@@2' into 'feature-zsv-5.0.0-vm-support-vtpm-…
Feb 5, 2026
7c044f9
<feature>[compute]: support create VM with TPM
Feb 4, 2026
3555fa0
<feature>[compute]: add secure boot dependency
Feb 4, 2026
eedf679
Merge branch 'zsv-ldap-2@@2' into 'feature-zsv-5.0.0-vm-support-vtpm-…
Feb 6, 2026
c6e9edb
<chore>[storage]: improve error message in VolumeSnapshotApiInterceptor
Feb 11, 2026
718a3ea
<feature>[kms]: support kms
Feb 6, 2026
7bdc854
<fix>[kvm]: update KVMGlobalConfig default value to "None"
Feb 11, 2026
c0d77c5
Merge branch 'ZSV-11331@@2' into 'feature-zsv-5.0.0-vm-support-vtpm-a…
Feb 11, 2026
e180ac3
Merge branch 'c-1@@2' into 'feature-zsv-5.0.0-vm-support-vtpm-and-sec…
Feb 12, 2026
e32f51d
Merge branch 'zsv-0@@2' into 'feature-zsv-5.0.0-vm-support-vtpm-and-s…
Feb 12, 2026
02e8901
<fix>[kvm]: continue to update KVMGlobalConfig default value to "None"
Feb 12, 2026
10c7c7e
Merge branch 'zsv-ldap-2' into 'feature-zsv-5.0.0-vm-support-vtpm-and…
Feb 12, 2026
27816e8
<fix>[conf]: update default value of secure.boot global config to false
Feb 24, 2026
423c293
<feature>[compute]: introduce NvRam type volume
Feb 13, 2026
1abd76b
<feature>[localstorage]: support create empty volume in raw types
Feb 13, 2026
1b2fc20
Merge branch 'zsv-ldap@@2' into 'feature-zsv-5.0.0-vm-support-vtpm-an…
Feb 25, 2026
dbe3f13
<fix>[localstorage]: remame CreateEmptyVolumeCmd.format to volumeFormat
Feb 26, 2026
d2ffba5
Merge branch 'zsv-ldap-2' into 'feature-zsv-5.0.0-vm-support-vtpm-and…
Feb 26, 2026
fa473ad
<feature>[kms]: support kms trust API
Feb 26, 2026
8430a49
Merge branch 'ZSV-11331@@2' into 'feature-zsv-5.0.0-vm-support-vtpm-a…
Mar 5, 2026
8ddbb48
<feature>[header]: introduce VmHostFileVO
Mar 3, 2026
88b2bda
Merge branch 'zsv-ldap@@2' into 'feature-zsv-5.0.0-vm-support-vtpm-an…
Mar 5, 2026
b0127a6
<fix>[conf]: update VmHostFileContentVO.content default value
Mar 5, 2026
624a54e
Merge branch 'zsv-ldap' into 'feature-zsv-5.0.0-vm-support-vtpm-and-s…
Mar 5, 2026
8129f5a
<feature>[header]: merge TpmHostRefVO to VmHostFileVO
Mar 6, 2026
78dde28
Envelope wrapper dek to compute
Mar 6, 2026
ae6facb
Add verified to HostKeyIdentityVO
Mar 6, 2026
b3df320
Rename sync-envelope-public-key
Mar 6, 2026
b1a961b
Place holder public key
Mar 6, 2026
7680570
Place holder public key
Mar 6, 2026
189350f
Place holder public key
Mar 6, 2026
4d4e45e
Merge branch 'zsv-ldap-2@@2' into 'feature-zsv-5.0.0-vm-support-vtpm-…
Mar 6, 2026
35de65a
Remove rotate public key in initial pingHook
Mar 6, 2026
24f2540
Add variable to SecretHostDefineCmd
Mar 6, 2026
73a94a2
Remove rotate public key when define secret
Mar 6, 2026
c0e2759
Envelope public key async call kvm agent
Mar 6, 2026
11c292c
Limit dek length when define libvirt secret
Mar 6, 2026
881c597
Hide dek in log
Mar 7, 2026
fe36f41
Remove test point in stopVm
Mar 7, 2026
ee0de70
Improve HostSecretCase test
Mar 8, 2026
6f4dd13
Compute fingerprint of public key
Mar 8, 2026
48ea2ba
Verify fingerprint in secret define
Mar 8, 2026
3672c7e
Remove secret host get/create extension point
Mar 8, 2026
bd4a432
Fix primary key confict error
Mar 9, 2026
b36ace4
Use UTF-8 instead HPKE default charset
Mar 9, 2026
d0e2034
<fix>[sdk]: rekey API and root key synchronization
Mar 6, 2026
b384d57
Move some logic to premium
Mar 10, 2026
21350fa
Remove redunrant extension config
Mar 10, 2026
1424cd7
<fix>[kvm]: fix swtpm path error
Mar 10, 2026
01bd63d
Add envelope test
Mar 10, 2026
158acc2
Introduce host key helper
Mar 10, 2026
a0ef764
Mova secret test to premium
Mar 10, 2026
bce88f1
Merge branch 'zsv-ldap@@2' into 'feature-zsv-5.0.0-vm-support-vtpm-an…
Mar 10, 2026
5f41d6a
Merge branch 'ZSV-11331@@2' into 'feature-zsv-5.0.0-vm-support-vtpm-a…
Mar 10, 2026
5042483
Remove unused envelopeDekBase64
Mar 11, 2026
be3c6bb
Verify storedFingerprint is null
Mar 11, 2026
d6efecf
Remove self errCode
Mar 11, 2026
99f132d
Fix some review suggestion
Mar 11, 2026
733d34b
Fix db Duplicate entry
Mar 11, 2026
85d9d2a
Remove catching EntityExistsException
Mar 11, 2026
95e9d42
<fix>[kvm]: update condition write VM host file
Mar 11, 2026
3031fbd
Merge branch 'zsv-ldap-3' into 'feature-zsv-5.0.0-vm-support-vtpm-and…
Mar 11, 2026
3016969
Merge branch 'feat/kms/envelope-vtpm-2@@2' into 'feature-zsv-5.0.0-vm…
Mar 12, 2026
736ad28
<feature>[kvm]: introduce VmHostBackupFileVO
Mar 12, 2026
aa49c3a
<feature>[kvm]: support clone for TPM VM
Mar 12, 2026
cc4835e
<feature>[kvm]: support to start VM with VmHostBackupFileVO
Mar 12, 2026
572c93a
<feature>[kvm]: clean VmHostFileVO after VM destroy
Mar 12, 2026
de199ae
Merge branch 'zsv-ldap@@2' into 'feature-zsv-5.0.0-vm-support-vtpm-an…
Mar 16, 2026
e25e748
<fix>[header]: fix reference error in VmHostFileContentVO
Mar 16, 2026
9355fce
<fix>[keyProvider]: reset default key provider after delete
Mar 13, 2026
a04fd1f
Merge branch 'zsv-ldap' into 'feature-zsv-5.0.0-vm-support-vtpm-and-s…
Mar 16, 2026
9142bf3
Merge branch 'ZSV-11473@@2' into 'feature-zsv-5.0.0-vm-support-vtpm-a…
Mar 16, 2026
2029138
<feature>[compute]: persist resource key when creating VM
Mar 16, 2026
55a86de
Merge branch 'zsv-ldap@@2' into 'feature-zsv-5.0.0-vm-support-vtpm-an…
Mar 17, 2026
0eecfd9
<feature>[compute]: prepare DEK on instantiating VM resource
Mar 17, 2026
8ad8e91
<fix>[conf]: move premium errors xml to premium module
Mar 18, 2026
be47876
Merge branch 'zsv-ldap@@2' into 'feature-zsv-5.0.0-vm-support-vtpm-an…
Mar 18, 2026
b296237
<fix>[kms]: distinguish kms trust state
Mar 18, 2026
309ea39
Merge branch 'zsv-ldap-2@@2' into 'feature-zsv-5.0.0-vm-support-vtpm-…
Mar 18, 2026
d377b90
Merge branch 'ZSV-11496@@2' into 'feature-zsv-5.0.0-vm-support-vtpm-a…
Mar 18, 2026
262d5da
<fix>[core]: improve SimpleFlowChain
Mar 18, 2026
1a4f0d2
Merge branch 'zsv-ldap-9' into 'feature-zsv-5.0.0-vm-support-vtpm-and…
Mar 19, 2026
3d09ff8
<fix>[kvm]: prepare nvram folder before migrate VM
Mar 18, 2026
4ab7d1b
Merge branch 'zsv-ldap@@2' into 'feature-zsv-5.0.0-vm-support-vtpm-an…
Mar 19, 2026
0435fd7
<feature>[kvm]: support take snapshot on VM offline
Mar 23, 2026
4c4b4c4
Merge branch 'zsv-ldap-2@@2' into 'feature-zsv-5.0.0-vm-support-vtpm-…
Mar 23, 2026
5153432
<feature>[kvm]: introduce SyncVmHostFilesFromHostMsg
Mar 23, 2026
250163f
Merge branch 'zsv-ldap@@2' into 'feature-zsv-5.0.0-vm-support-vtpm-an…
Mar 23, 2026
e593470
<feature>[storage]: register and take over sblk
taogan21 Jan 15, 2026
86ccf0b
<feature>[kvm]: reset TPM state after VM reimage
Mar 25, 2026
a3cbd28
Merge branch 'zsv-ldap-9' into 'feature-zsv-5.0.0-vm-support-vtpm-and…
Mar 25, 2026
9f41218
<feature>[keyprovider]: Add DEK provisioning for TPM
Mar 23, 2026
b012c35
<feature>[kvm]: refactor VmHostFileTO to support different operations
Mar 25, 2026
237c737
<feature>[kvm]: sync VM host files when releasing VM resource
Mar 24, 2026
2347caa
Merge branch 'zsv-ldap-9' into 'feature-zsv-5.0.0-vm-support-vtpm-and…
Mar 25, 2026
339a604
<feature>[kvm]: sync VM host files after migration
Mar 25, 2026
4a6318b
Merge branch 'zsv-ldap-8@@2' into 'feature-zsv-5.0.0-vm-support-vtpm-…
Mar 25, 2026
8841411
Merge branch 'ZSV-11489@@2' into 'feature-zsv-5.0.0-vm-support-vtpm-a…
Mar 25, 2026
41df743
Merge branch 'zsv-ldap-7' into 'feature-zsv-5.0.0-vm-support-vtpm-and…
Mar 25, 2026
c60433b
<feature>[kvm]: reset TPM state on VM reimage
Mar 25, 2026
16a93a9
Merge branch 'zsv-ldap-2' into 'feature-zsv-5.0.0-vm-support-vtpm-and…
Mar 25, 2026
a8f687b
<refactor>[kvm]: batch query VM host file content
Mar 25, 2026
1eab431
<feature>[kvm]: reset TPM state after VM clone
Mar 25, 2026
19e8f75
Merge branch 'zsv-ldap-3' into 'feature-zsv-5.0.0-vm-support-vtpm-and…
Mar 25, 2026
730d061
Merge branch 'zsv-ldap' into 'feature-zsv-5.0.0-vm-support-vtpm-and-s…
Mar 26, 2026
a0f2ab5
<feature>[kvm]: use SQLBatch for TPM state reset
Mar 26, 2026
f5ae3c9
<feature>[kvm]: add VM host file periodic sync tracker
Mar 25, 2026
a9e42f7
Merge branch 'zsv-ldap-2' into 'feature-zsv-5.0.0-vm-support-vtpm-and…
Mar 26, 2026
3039eb8
<feature>[kvm]: make VM host file sync configurable
Mar 26, 2026
553110c
Merge branch 'sblk-ZSV-11559@@3' into 'feature-zsv-5.0.0-vm-support-v…
Mar 26, 2026
08119aa
Merge branch 'zsv-ldap-4' into 'feature-zsv-5.0.0-vm-support-vtpm-and…
Mar 26, 2026
804ab6b
<feature>[kvm]: add lastSyncReason to track VM host file sync
Mar 26, 2026
130a9dd
Merge branch 'zsv-ldap-4@@2' into 'feature-zsv-5.0.0-vm-support-vtpm-…
Mar 26, 2026
99ae29b
<feature>[kvm]: add key provider binding to TPM operations
Mar 26, 2026
a3e3214
Merge branch 'zsv-ldap' into 'feature-zsv-5.0.0-vm-support-vtpm-and-s…
Mar 26, 2026
00ffc6a
<refactor>[kvm]: move VM host file cleanup to new extension point
Mar 26, 2026
7d650fb
Merge branch 'zsv-ldap-3@@2' into 'feature-zsv-5.0.0-vm-support-vtpm-…
Mar 26, 2026
67ca4a6
Merge branch 'zsv-ldap-4' into 'feature-zsv-5.0.0-vm-support-vtpm-and…
Mar 26, 2026
7ab9254
<feature>[vm]: add TPM and NvRam restore support for snapshot group
Mar 26, 2026
052ddff
Merge branch 'zsv-ldap@@2' into 'feature-zsv-5.0.0-vm-support-vtpm-an…
Mar 27, 2026
74e91e0
<refactor>[kvm]: introduce VM host file base classes for backup tracking
Mar 27, 2026
2e3193e
<refactor>[header]: add APINoSee to backupFileUuid fields
Mar 27, 2026
73b053f
<test>[kvm]: remove NvRam volume supports
Mar 27, 2026
98a926f
Merge branch 'zsv-ldap-2' into 'feature-zsv-5.0.0-vm-support-vtpm-and…
Mar 27, 2026
9729c52
Merge branch 'zsv-ldap@@2' into 'feature-zsv-5.0.0-vm-support-vtpm-an…
Mar 27, 2026
32bb845
<feature>[kvm]: support TPM key provider restore from snapshot group
Mar 27, 2026
f6e8b41
<fix>[keyprovider]: Refine rekey validation and skip reporting
Mar 27, 2026
34ae415
Merge branch 'zsv-ldap-2@@2' into 'feature-zsv-5.0.0-vm-support-vtpm-…
Mar 27, 2026
fc22117
<feature>[kvm]: add online snapshot support for VM host files
Mar 27, 2026
650a6fd
Merge branch 'zsv-ldap-3@@2' into 'feature-zsv-5.0.0-vm-support-vtpm-…
Mar 28, 2026
d9884ec
<fix>[header]: remove invalid notes on VmHostFileBackupJob
Mar 30, 2026
d641dbe
<feature>[kvm]: register VolumeSnapshotCreationExtensionPoint
Mar 30, 2026
b7f926d
Merge branch 'c-0' into 'feature-zsv-5.0.0-vm-support-vtpm-and-secuce…
Mar 30, 2026
4dd1cd2
Merge branch 'zsv-ldap' into 'feature-zsv-5.0.0-vm-support-vtpm-and-s…
Mar 30, 2026
f5da724
<feature>[kvm]: add hostfile backup agent command
Mar 30, 2026
a6ac23f
<fix>[kvm]: fix invalid edk version tag error
Mar 31, 2026
91ffd37
Merge branch 'c-0' into 'feature-zsv-5.0.0-vm-support-vtpm-and-secuce…
Mar 31, 2026
002a9f8
Merge branch 'zsv-ldap-2@@2' into 'feature-zsv-5.0.0-vm-support-vtpm-…
Mar 31, 2026
cbd001c
<refactor>[kvm]: reorganize vm host file management packages
Mar 31, 2026
736f312
Merge branch 'zsv-ldap-2@@2' into 'feature-zsv-5.0.0-vm-support-vtpm-…
Mar 31, 2026
39fa047
<feature>[kvm]: add os spec machine type support
Mar 31, 2026
09131e7
Merge branch 'zsv-ldap' into 'feature-zsv-5.0.0-vm-support-vtpm-and-s…
Mar 31, 2026
458fcb8
<feature>[kvm]: persist machine type to system tag
Apr 1, 2026
d3af48a
<refactor>[vm]: move nvram to devices spec and add backup support
Apr 1, 2026
6b5bf82
Merge branch 'zsv-ldap-3' into 'feature-zsv-5.0.0-vm-support-vtpm-and…
Apr 1, 2026
c7c24cf
Merge branch 'zsv-ldap' into 'feature-zsv-5.0.0-vm-support-vtpm-and-s…
Apr 1, 2026
1d7126c
<fix>[compute]: add allowed.tpm.vm.without.kms global config
Apr 1, 2026
66b4eb4
Merge branch 'zsv-ldap-2@@2' into 'feature-zsv-5.0.0-vm-support-vtpm-…
Apr 2, 2026
adea700
<fix>[kvm]: support secure boot for primary storage migration
Apr 2, 2026
2a5980b
Merge branch 'zsv-ldap' into 'feature-zsv-5.0.0-vm-support-vtpm-and-s…
Apr 2, 2026
89b3e03
<feature>[kvm]: add periodic cleanup for expired VM host files
Apr 2, 2026
efc4fc2
<refactor>[kvm]: improve TPM removal by cleaning host files before DB…
Apr 2, 2026
f48ebc5
<feature>[vm]: add vm metadata header definitions
taogan21 Apr 2, 2026
986d802
<feature>[vm]: annotate API msgs with MetadataImpact
taogan21 Apr 2, 2026
1734662
<feature>[vm]: add metadata compute core and config
taogan21 Apr 2, 2026
2aa69f4
<feature>[vm]: add metadata local and nfs storage backend
taogan21 Apr 2, 2026
d89c63e
Merge branch 'zsv-ldap-3' into 'feature-zsv-5.0.0-vm-support-vtpm-and…
Apr 2, 2026
93a9b91
Merge branch 'ZSV-11505@@2' into 'feature-zsv-5.0.0-vm-support-vtpm-a…
Apr 2, 2026
4db6aab
Merge branch 'zsv-ldap-4' into 'feature-zsv-5.0.0-vm-support-vtpm-and…
Apr 2, 2026
2d3633c
<feature>[log]: add LongText type for logging long content safely
Apr 3, 2026
24901c9
Merge branch 'c-0' into 'feature-zsv-5.0.0-vm-support-vtpm-and-secuce…
Apr 3, 2026
ab1b9a4
<feature>[vm]: add metadata SDK actions and testlib
taogan21 Apr 2, 2026
677c96e
<fix>[kvm]: add null check for dstHostUuid in secure boot
Apr 3, 2026
b5be037
Merge branch 'zsv-ldap' into 'feature-zsv-5.0.0-vm-support-vtpm-and-s…
Apr 3, 2026
cd69046
<fix>[core]: enforce propagateExceptionTo before lambda handlers
Apr 3, 2026
9c9e2e4
<refactor>[kvm]: reset TPM via data plane before DB cleanup
Apr 3, 2026
b699f1f
Merge branch 'c-2' into 'feature-zsv-5.0.0-vm-support-vtpm-and-secuce…
Apr 3, 2026
2785e19
<fix>[kvm]: skip key provider attach when no KMS
Apr 3, 2026
51b2b37
Merge branch 'zsv-ldap-2' into 'feature-zsv-5.0.0-vm-support-vtpm-and…
Apr 3, 2026
7619fd7
Merge branch 'zsv-ldap-3' into 'feature-zsv-5.0.0-vm-support-vtpm-and…
Apr 3, 2026
6600b98
Merge branch 'fb-reg-1-ZSV-11559@@3' into 'feature-zsv-5.0.0-vm-suppo…
yuerong996 Apr 4, 2026
fdcff04
<refactor>[kvm]: use enum for vm host file sync reasons
Apr 4, 2026
9f75aaf
Merge branch 'zsv-ldap' into 'feature-zsv-5.0.0-vm-support-vtpm-and-s…
Apr 4, 2026
c4fb10c
<refactor>[kvm]: prepare NvRam host-file before migration
Apr 5, 2026
efabc0f
Merge branch 'zsv-ldap' into 'feature-zsv-5.0.0-vm-support-vtpm-and-s…
Apr 5, 2026
932c8ba
<feature>[kvm]: sync VM host files before HA start
Apr 6, 2026
912b02f
Merge branch 'zsv-ldap-2' into 'feature-zsv-5.0.0-vm-support-vtpm-and…
Apr 6, 2026
3a67455
<fix>[crypto]: keep TPM key ref until VM removed from DB
Apr 7, 2026
195a8e0
<feature>[kvm]: periodic check and sync for VM host files
Apr 7, 2026
ab338a6
<fix>[kvm]: remove TPM from VM individually instead of batch delete
Apr 7, 2026
866fc0f
<feature>[kvm]: support TPM revert without KMS
Apr 7, 2026
bc12449
Merge branch 'zsv-ldap-3' into 'feature-zsv-5.0.0-vm-support-vtpm-and…
Apr 7, 2026
064b889
Merge branch 'remove-resource-keyref@@2' into 'feature-zsv-5.0.0-vm-s…
Apr 7, 2026
075028d
Merge branch 'zsv-ldap-9' into 'feature-zsv-5.0.0-vm-support-vtpm-and…
Apr 7, 2026
167977d
Merge branch 'zsv-ldap@@2' into 'feature-zsv-5.0.0-vm-support-vtpm-an…
Apr 7, 2026
4f8ecd1
<fix>[metadata]: extractOldPrefix use lastIndexOf
taogan21 Apr 7, 2026
f2d0e83
Merge branch 'ZSV-11771@@2' into 'feature-zsv-5.0.0-vm-support-vtpm-a…
Apr 8, 2026
3ffe690
<fix>[storage]: update APIScanVmInstanceMetadataFromPrimaryStorageMsg
taogan21 Apr 8, 2026
1751228
Merge branch 'ZSV-11790' into 'feature-zsv-5.0.0-vm-support-vtpm-and-…
Apr 8, 2026
5b3aa25
<fix>[kvm]: fix NVRAM migration handler duplicate call
Apr 8, 2026
7ebe0f9
<fix>[kvm]: clone resource ref when revert snapshot
Apr 8, 2026
4a48a63
Merge branch 'snap-tpm-ref' into 'feature-zsv-5.0.0-vm-support-vtpm-a…
Apr 8, 2026
71fa939
Merge branch 'zsv-ldap' into 'feature-zsv-5.0.0-vm-support-vtpm-and-s…
Apr 8, 2026
5aeabec
<fix>[sdk]: align sdk and tests
Apr 8, 2026
52600df
<fix>[crypto]: secret get in vm pre instantiate
Apr 6, 2026
36e7d86
<fix>[kvm]: remove TPM when VM deleted from DB
Apr 9, 2026
f1c6817
<fix>[kms]: add delete secret for vm
Apr 8, 2026
74011f4
<fix>[kms]: add test case for delete secret
Apr 9, 2026
61d98c2
Merge branch 'zsv-ldap' into 'feature-zsv-5.0.0-vm-support-vtpm-and-s…
Apr 9, 2026
89b7039
Merge branch 'rekey-api-event-result@@2' into 'feature-zsv-5.0.0-vm-s…
Apr 10, 2026
0cb22fd
<fix>[crypto]: fix conflict and review
Apr 9, 2026
3eee799
<fix>[kvm]: fix NPE in VmHostFileTracker sync
Apr 10, 2026
e9c1418
Merge branch 'zsv-ldap' into 'feature-zsv-5.0.0-vm-support-vtpm-and-s…
Apr 10, 2026
78c679d
Merge branch 'secret-get@@2' into 'feature-zsv-5.0.0-vm-support-vtpm-…
Apr 10, 2026
b13926a
<fix>[kvm]: disable host status check when syncing VM host files
Apr 10, 2026
449ef01
Merge branch 'zsv-ldap-3' into 'feature-zsv-5.0.0-vm-support-vtpm-and…
Apr 10, 2026
14b3e0f
<fix>[kvm]: mark TPM VM host files changed on start/shutdown
Apr 11, 2026
ff216d7
Merge branch 'zsv-ldap' into 'feature-zsv-5.0.0-vm-support-vtpm-and-s…
Apr 13, 2026
8d32ee7
<fix>[kvm]: define secret on migrate destination
Apr 11, 2026
0f92a08
Merge branch 'define-secret-mig@@2' into 'feature-zsv-5.0.0-vm-suppor…
Apr 14, 2026
126d1fa
Merge branch 'zsv_5.0.0' into feature-zsv-5.0.0-vm-support-vtpm-and-s…
Apr 14, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions build/deploydb.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ mkdir -p ${flyway_sql}
eval "rm -f ${flyway_sql}/*"
cp ${base}/../conf/db/V0.6__schema.sql ${flyway_sql}
cp ${base}/../conf/db/upgrade/* ${flyway_sql}
cp ${base}/../conf/db/zsv/* ${flyway_sql}

if [[ ! -n $host ]] || [[ ! -n $port ]];then
url="jdbc:mysql://localhost:3306/zstack"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,11 @@ public class ComputeLegacyGlobalProperty {
*/
@GlobalProperty(name="legacyCpuTopologyFix", defaultValue = "false")
public static boolean cpuTopologyFix;
/**
* if enableNvRamTypeVolume = true, NvRam type volume will be created if UEFI is enabled;
* if enableNvRamTypeVolume = false, NvRam type volume will not be created, NvRam & TpmState will save in host
* (not in Primary storage);
*/
@GlobalProperty(name="enable.nv.ram.type.volume", defaultValue = "false")
public static boolean enableNvRamTypeVolume;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
package org.zstack.compute.vm;

import org.springframework.beans.factory.annotation.Autowired;
import org.zstack.core.cloudbus.CloudBusCallBack;
import org.zstack.core.componentloader.PluginRegistry;
import org.zstack.core.db.Q;
import org.zstack.core.gc.GC;
import org.zstack.core.gc.GCCompletion;
import org.zstack.core.gc.TimeBasedGarbageCollector;
import org.zstack.header.host.HostVO;
import org.zstack.header.message.MessageReply;
import org.zstack.header.storage.primary.CleanupVmInstanceMetadataOnPrimaryStorageMsg;
import org.zstack.header.storage.primary.PrimaryStorageConstant;
import org.zstack.header.storage.primary.PrimaryStorageVO;
import org.zstack.header.storage.primary.PrimaryStorageVO_;
import org.zstack.header.vm.metadata.VmMetadataPathBuildExtensionPoint;
import org.zstack.utils.Utils;
import org.zstack.utils.logging.CLogger;

public class CleanupVmInstanceMetadataOnPrimaryStorageGC extends TimeBasedGarbageCollector {
private static final CLogger logger = Utils.getLogger(CleanupVmInstanceMetadataOnPrimaryStorageGC.class);

@Autowired
private PluginRegistry pluginRgty;

@GC
public String primaryStorageUuid;
@GC
public String vmUuid;
@GC
public String rootVolumeUuid;
@GC
public String metadataPath;
@GC
public String hostUuid;

public static String getGCName(String vmUuid) {
return String.format("gc-cleanup-vm-metadata-%s", vmUuid);
}

@Override
protected void triggerNow(GCCompletion completion) {
if (!dbf.isExist(primaryStorageUuid, PrimaryStorageVO.class)) {
logger.debug(String.format("[MetadataCleanupGC] primary storage[uuid:%s] no longer exists, " +
"cancel gc for vm[uuid:%s]", primaryStorageUuid, vmUuid));
completion.cancel();
return;
}

String psType = Q.New(PrimaryStorageVO.class).select(PrimaryStorageVO_.type).eq(PrimaryStorageVO_.uuid, primaryStorageUuid).findValue();
if (psType == null) {
logger.debug(String.format("[MetadataCleanupGC] primary storage[uuid:%s] type not found, " +
"cancel gc for vm[uuid:%s]", primaryStorageUuid, vmUuid));
completion.cancel();
return;
}

VmMetadataPathBuildExtensionPoint ext = pluginRgty.getExtensionFromMap(psType, VmMetadataPathBuildExtensionPoint.class);
boolean requireHost = ext != null && ext.requireHostForCleanup();

// Determine effective hostUuid based on whether the PS type requires a host for cleanup.
String effectiveHostUuid = hostUuid;
if (!requireHost) {
effectiveHostUuid = null;
} else {
if (effectiveHostUuid == null) {
logger.debug(String.format("[MetadataCleanupGC] hostUuid is null and ps[uuid:%s, type:%s] " +
"requires host for cleanup, cancel gc for vm[uuid:%s]",
primaryStorageUuid, psType, vmUuid));
completion.cancel();
return;
}
if (!dbf.isExist(effectiveHostUuid, HostVO.class)) {
logger.debug(String.format("[MetadataCleanupGC] host[uuid:%s] no longer exists " +
"and ps[uuid:%s, type:%s] requires host for cleanup, " +
"metadata is unreachable, cancel gc for vm[uuid:%s]",
effectiveHostUuid, primaryStorageUuid, psType, vmUuid));
completion.cancel();
return;
}
}

CleanupVmInstanceMetadataOnPrimaryStorageMsg msg = new CleanupVmInstanceMetadataOnPrimaryStorageMsg();
msg.setPrimaryStorageUuid(primaryStorageUuid);
msg.setVmInstanceUuid(vmUuid);
msg.setRootVolumeUuid(rootVolumeUuid);
msg.setMetadataPath(metadataPath);
msg.setHostUuid(effectiveHostUuid);

bus.makeTargetServiceIdByResourceUuid(msg, PrimaryStorageConstant.SERVICE_ID, primaryStorageUuid);
bus.send(msg, new CloudBusCallBack(completion) {
@Override
public void run(MessageReply reply) {
if (reply.isSuccess()) {
logger.info(String.format("[MetadataCleanupGC] successfully cleaned up metadata " +
"for vm[uuid:%s] on ps[uuid:%s]", vmUuid, primaryStorageUuid));
completion.success();
} else {
logger.warn(String.format("[MetadataCleanupGC] failed to clean up metadata " +
"for vm[uuid:%s] on ps[uuid:%s]: %s", vmUuid, primaryStorageUuid, reply.getError()));
completion.fail(reply.getError());
}
}
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import org.zstack.header.configuration.VmCustomSpecificationStruct;
import org.zstack.header.host.CpuArchitecture;
import org.zstack.header.vm.*;
import org.zstack.header.vm.devices.VmDevicesSpec;

import java.util.ArrayList;
import java.util.List;
Expand Down Expand Up @@ -32,6 +33,7 @@ public class InstantiateVmFromNewCreatedStruct {
private List<DiskAO> dataDisks;
private List<DiskAO> deprecatedDataVolumeSpecs = new ArrayList<>();
private VmCustomSpecificationStruct vmCustomSpecification;
private VmDevicesSpec devicesSpec;

public List<String> getCandidatePrimaryStorageUuidsForRootVolume() {
return candidatePrimaryStorageUuidsForRootVolume;
Expand Down Expand Up @@ -87,6 +89,14 @@ public void setVmCustomSpecification(VmCustomSpecificationStruct vmCustomSpecifi
this.vmCustomSpecification = vmCustomSpecification;
}

public VmDevicesSpec getDevicesSpec() {
return devicesSpec;
}

public void setDevicesSpec(VmDevicesSpec devicesSpec) {
this.devicesSpec = devicesSpec;
}

public List<String> getRootVolumeSystemTags() {
return rootVolumeSystemTags;
}
Expand Down Expand Up @@ -167,6 +177,7 @@ public static InstantiateVmFromNewCreatedStruct fromMessage(InstantiateNewCreate
struct.setDataDisks(msg.getDataDisks());
struct.setDeprecatedDataVolumeSpecs(msg.getDeprecatedDataVolumeSpecs());
struct.setVmCustomSpecification(msg.getVmCustomSpecification());
struct.setDevicesSpec(msg.getDevicesSpec());
return struct;
}

Expand All @@ -187,6 +198,7 @@ public static InstantiateVmFromNewCreatedStruct fromMessage(CreateVmInstanceMsg
struct.setDataDisks(msg.getDataDisks());
struct.setDeprecatedDataVolumeSpecs(msg.getDeprecatedDataVolumeSpecs());
struct.setVmCustomSpecification(msg.getVmCustomSpecification());
struct.setDevicesSpec(msg.getDevicesSpec());
return struct;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -472,9 +472,9 @@ public void done(ErrorCodeList errorCodeList) {
.flatMap(List::stream).map(VmCdRomInventory::getUuid)
.collect(Collectors.toList());
dbf.removeByPrimaryKeys(cdRomUuids, VmCdRomVO.class);
dbf.removeByPrimaryKeys(vminvs.stream().map(p -> p.getInventory().getUuid())
.collect(Collectors.toList()),
VmInstanceVO.class);

List<String> vmUuidList = transform(vminvs, p -> p.getInventory().getUuid());
dbf.removeByPrimaryKeys(vmUuidList, VmInstanceVO.class);
}

completion.success();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ public void run(final FlowTrigger trigger, Map data) {
final boolean templated = isTemplated(spec.getVmInventory().getUuid());

/* data volume must be detached anyway no matter if it is going to be deleted */
if (spec.getVmInventory().getAllVolumes().size() > 1) {
boolean anyDataVolume = spec.getVmInventory().getAllVolumes().stream()
.anyMatch(arg -> VolumeType.Data.toString().equals(arg.getType()));
if (anyDataVolume) {
detachDataVolumes(spec);
}

Expand All @@ -60,7 +62,11 @@ public void run(final FlowTrigger trigger, Map data) {
return;
}

List<String> volumeTypes = Arrays.asList(VolumeType.Root.toString(), VolumeType.Memory.toString(), VolumeType.Cache.toString());
List<String> volumeTypes = Arrays.asList(
VolumeType.Root.toString(),
VolumeType.Memory.toString(),
VolumeType.Cache.toString()
);
List<VolumeDeletionStruct> ctx = transformAndRemoveNull(spec.getVmInventory().getAllVolumes(), arg -> {
if (VolumeType.Data.toString().equals(arg.getType()) && !deleteDataDisk && !templated) {
return null;
Expand Down
143 changes: 143 additions & 0 deletions compute/src/main/java/org/zstack/compute/vm/VmExpungeMetadataFlow.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,143 @@
package org.zstack.compute.vm;

import org.springframework.beans.factory.annotation.Autowire;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Configurable;
import org.zstack.core.cloudbus.CloudBus;
import org.zstack.core.cloudbus.CloudBusCallBack;
import org.zstack.core.componentloader.PluginRegistry;
import org.zstack.core.db.Q;
import org.zstack.header.core.workflow.FlowTrigger;
import org.zstack.header.core.workflow.NoRollbackFlow;
import org.zstack.header.message.MessageReply;
import org.zstack.header.storage.primary.CleanupVmInstanceMetadataOnPrimaryStorageMsg;
import org.zstack.header.storage.primary.PrimaryStorageConstant;
import org.zstack.header.storage.primary.PrimaryStorageVO;
import org.zstack.header.storage.primary.PrimaryStorageVO_;
import org.zstack.header.vm.VmInstanceConstant;
import org.zstack.header.vm.VmInstanceSpec;
import org.zstack.header.vm.metadata.VmMetadataPathBuildExtensionPoint;
import org.zstack.header.volume.VolumeInventory;
import org.zstack.utils.Utils;
import org.zstack.utils.logging.CLogger;

import java.util.Map;
import java.util.concurrent.TimeUnit;

@Configurable(preConstruction = true, autowire = Autowire.BY_TYPE)
public class VmExpungeMetadataFlow extends NoRollbackFlow {
private static final CLogger logger = Utils.getLogger(VmExpungeMetadataFlow.class);

@Autowired
private CloudBus bus;
@Autowired
private PluginRegistry pluginRgty;

@Override
public void run(FlowTrigger trigger, Map data) {
if (!VmGlobalConfig.VM_METADATA_ENABLED.value(Boolean.class)) {
trigger.next();
return;
}

final VmInstanceSpec spec = (VmInstanceSpec) data.get(VmInstanceConstant.Params.VmInstanceSpec.toString());
if (spec == null || spec.getVmInventory() == null) {
logger.warn("[MetadataExpunge] missing VmInstanceSpec or VmInventory, skip metadata cleanup");
trigger.next();
return;
}

final String vmUuid = spec.getVmInventory().getUuid();

VolumeInventory rootVolume = spec.getVmInventory().getRootVolume();
String psUuid = rootVolume != null ? rootVolume.getPrimaryStorageUuid() : null;
if (psUuid == null) {
logger.debug(String.format("[MetadataExpunge] vm[uuid:%s] root volume has no primaryStorageUuid, " +
"skipping metadata cleanup", vmUuid));
trigger.next();
return;
}


String psType = Q.New(PrimaryStorageVO.class).select(PrimaryStorageVO_.type).eq(PrimaryStorageVO_.uuid, psUuid).findValue();
if (psType == null) {
logger.warn(String.format("[MetadataExpunge] primary storage[uuid:%s] not found for vm[uuid:%s], " +
"skip metadata cleanup", psUuid, vmUuid));
trigger.next();
return;
}

VmMetadataPathBuildExtensionPoint ext = pluginRgty.getExtensionFromMap(psType, VmMetadataPathBuildExtensionPoint.class);
if (ext == null) {
logger.warn(String.format("[MetadataExpunge] no VmMetadataPathBuildExtensionPoint found for ps[uuid:%s, type:%s], " +
"skip metadata cleanup", psUuid, psType));
trigger.next();
return;
}
final String metadataPath;
try {
metadataPath = ext.buildVmMetadataPath(psUuid, vmUuid);
} catch (Exception e) {
logger.warn(String.format("[MetadataExpunge] failed to build metadata path for vm[uuid:%s] on ps[uuid:%s], " +
"skip metadata cleanup: %s", vmUuid, psUuid, e.getMessage()));
trigger.next();
return;
}

String hostUuid = null;
if (ext.requireHostForCleanup()) {
hostUuid = spec.getVmInventory().getHostUuid();
if (hostUuid == null) {
hostUuid = spec.getVmInventory().getLastHostUuid();
}

if (hostUuid == null) {
logger.warn(String.format("[MetadataExpunge] vm[uuid:%s] hostUuid is null, " +
"ps[uuid:%s, type:%s] requires host for cleanup, skip without submitting GC",
vmUuid, psUuid, psType));
trigger.next();
return;
}
}

String rootVolumeUuid = rootVolume.getUuid();
CleanupVmInstanceMetadataOnPrimaryStorageMsg cmsg = new CleanupVmInstanceMetadataOnPrimaryStorageMsg();
cmsg.setPrimaryStorageUuid(psUuid);
cmsg.setVmInstanceUuid(vmUuid);
cmsg.setMetadataPath(metadataPath);
cmsg.setRootVolumeUuid(rootVolumeUuid);
cmsg.setHostUuid(hostUuid);
final String finalPsUuid = psUuid;
final String finalHostUuid = hostUuid;

bus.makeTargetServiceIdByResourceUuid(cmsg, PrimaryStorageConstant.SERVICE_ID, psUuid);
bus.send(cmsg, new CloudBusCallBack(trigger) {
@Override
public void run(MessageReply reply) {
if (reply.isSuccess()) {
logger.info(String.format("[MetadataExpunge] successfully deleted metadata for vm[uuid:%s] on ps[uuid:%s]",
vmUuid, finalPsUuid));
} else {
logger.warn(String.format("[MetadataExpunge] failed to delete metadata for vm[uuid:%s] on ps[uuid:%s]: %s, " +
"submitting GC job for retry", vmUuid, finalPsUuid, reply.getError()));
submitGC(finalPsUuid, vmUuid, rootVolumeUuid, metadataPath, finalHostUuid);
}
trigger.next();
}
});
}

private void submitGC(String psUuid, String vmUuid, String rootVolumeUuid, String metadataPath, String hostUuid) {
CleanupVmInstanceMetadataOnPrimaryStorageGC gc = new CleanupVmInstanceMetadataOnPrimaryStorageGC();
gc.NAME = CleanupVmInstanceMetadataOnPrimaryStorageGC.getGCName(vmUuid);
gc.primaryStorageUuid = psUuid;
gc.vmUuid = vmUuid;
gc.rootVolumeUuid = rootVolumeUuid;
gc.metadataPath = metadataPath;
gc.hostUuid = hostUuid;
long gcIntervalSec = TimeUnit.HOURS.toSeconds(VmGlobalConfig.VM_METADATA_CLEANUP_GC_INTERVAL.value(Long.class));
gc.deduplicateSubmit(gcIntervalSec, TimeUnit.SECONDS);

logger.info(String.format("[MetadataExpunge] submitted GC job [%s] for vm[uuid:%s] on ps[uuid:%s]", gc.NAME, vmUuid, psUuid));
}
}
Loading