Omer Frenkel has posted comments on this change.
Change subject: Trusted Compute Pools - Open Attestation integration with oVirt
engine proposal
......................................................................
Patch Set 2: (5 inline comments)
some comments inside, please use code formatter and also make sure you look at
comments from patchset 1
....................................................
File backend/manager/dbscripts/create_tables.sql
Line 279: migration_support INTEGER NOT NULL default 0,
Line 280: userdefined_properties VARCHAR(4000),
Line 281: predefined_properties VARCHAR(4000),
Line 282: min_allocated_mem INTEGER not null default 0, --indicates how much
memory at least VM need to run, value is in MB
Line 283: trust_lvl VARCHAR(20) default '',
this file should not be changed, upgrate script provided is enough,
but missing change in create_views script
Line 284: CONSTRAINT PK_vm_static PRIMARY KEY(vm_guid)
Line 285: ) WITH OIDS;
Line 286:
Line 287:
....................................................
File backend/manager/dbscripts/vms_sp.sql
Line 433: RETURNS VOID
Line 434: AS $procedure$
Line 435: BEGIN
Line 436: INSERT INTO vm_static(description, mem_size_mb, os, vds_group_id,
vm_guid, VM_NAME,
vmt_guid,domain,creation_date,num_of_monitors,allow_console_reconnect,is_initialized,is_auto_suspend,num_of_sockets,cpu_per_socket,usb_policy,
time_zone,auto_startup,is_stateless,dedicated_vm_for_vds, fail_back,
default_boot_sequence, vm_type, nice_level, default_display_type,
priority,iso_path,origin,initrd_url,kernel_url,kernel_params,migration_support,predefined_properties,userdefined_properties,min_allocated_mem,
entity_type, quota_id, cpu_pinning,
is_smartcard_enabled,is_delete_protected,host_cpu_flags,trust_lvl)
Line 437: VALUES(v_description, v_mem_size_mb, v_os, v_vds_group_id,
v_vm_guid, v_vm_name, v_vmt_guid, v_domain, v_creation_date, v_num_of_monitors,
v_allow_console_reconnect, v_is_initialized, v_is_auto_suspend,
v_num_of_sockets, v_cpu_per_socket, v_usb_policy, v_time_zone,
v_auto_startup,v_is_stateless,v_dedicated_vm_for_vds,v_fail_back,
v_default_boot_sequence, v_vm_type, v_nice_level, v_default_display_type,
v_priority,v_iso_path,v_origin,v_initrd_url,v_kernel_url,v_kernel_params,v_migration_support,v_predefined_properties,v_userdefined_properties,v_min_allocated_mem,
'VM', v_quota_id, v_cpu_pinning,
v_is_smartcard_enabled,v_is_delete_protected,v_host_cpu_flags,v_trust_lvl);
missing also changes in functions: UpdateVmStatic, insertVm
Line 438: -- perform deletion from vm_ovf_generations to ensure that no record
exists when performing insert to avoid PK violation.
Line 439: DELETE FROM vm_ovf_generations gen WHERE gen.vm_guid = v_vm_guid;
Line 440: INSERT INTO vm_ovf_generations(vm_guid, storage_pool_id) VALUES
(v_vm_guid, (SELECT storage_pool_id FROM vds_groups vg WHERE vg.vds_group_id =
v_vds_group_id));
Line 441: END; $procedure$
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/attestationbroker/AttestationHost.java
Line 44: private static final String CONTENT_TYPE = "application/json";
Line 45:
Line 46:
Line 47: public static AttestationResult validateHostIsTrusted(VDS vds) {
Line 48: System.out.println("validating....");
thanks, also when logging, use host name (vds.getName()) and provide a
meaningful message
Line 49: AttestationResult result = AttestationResult.unknown;
Line 50: String key = vds.gethost_name();
Line 51: if (AttestationCacheManager.isExisted(key)){
Line 52: if (!AttestationCacheManager.IsExpired(key)){
....................................................
File
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsSelector.java
Line 417: final List<VDS> readyToRun = new ArrayList<VDS>();
Line 418: for (VDS curVds : vdss) {
Line 419: if (validateHostIsReadyToRun(curVds, sb, isMigrate) ==
ValidationResult.VALID&&validateHostIsTrusted(curVds)){
Line 420: readyToRun.add(curVds);
Line 421: }
please use the project formatter to format the code
Line 422: }
Line 423:
Line 424: if (readyToRun.isEmpty()) {
Line 425: log.info(sb.toString());
....................................................
File
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/VmStatic.java
Line 67:
Line 68: @Column(name = "host_cpu_flags", nullable = false)
Line 69: private boolean useHostCpuFlags = false;
Line 70:
Line 71: @Column(name = "trust_lvl")
no need for @Column annotation, we've removed them all
Line 72: private String trust_lvl="";
Line 73:
Line 74: public VmStatic() {
Line 75: setNumOfMonitors(1);
--
To view, visit http://gerrit.ovirt.org/11237
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I4de780cd46069638433255f3f9c994575f752e55
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Dave Chen <[email protected]>
Gerrit-Reviewer: Dave Chen <[email protected]>
Gerrit-Reviewer: Doron Fediuck <[email protected]>
Gerrit-Reviewer: Itamar Heim <[email protected]>
Gerrit-Reviewer: Juan Hernandez <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches