Martin Betak has posted comments on this change.

Change subject: backend: Add RebootVmCommand
......................................................................


Patch Set 4:

(6 comments)

http://gerrit.ovirt.org/#/c/22744/4/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RebootVmCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RebootVmCommand.java:

Line 24:     }
Line 25: 
Line 26:     @Override
Line 27:     protected void perform() {
Line 28:         log.infoFormat("Sending reboot command for VM {0}.", 
getVm().getName());
> this log is not needed, the infrastructure already print every command that
Done
Line 29:         final VDSReturnValue returnValue = 
runVdsCommand(VDSCommandType.RebootVm, new 
VdsAndVmIDVDSParametersBase(getVdsId(), getVmId()));
Line 30:         setActionReturnValue(returnValue.getReturnValue());
Line 31:         setSucceeded(returnValue.getSucceeded());
Line 32:     }


Line 28:         log.infoFormat("Sending reboot command for VM {0}.", 
getVm().getName());
Line 29:         final VDSReturnValue returnValue = 
runVdsCommand(VDSCommandType.RebootVm, new 
VdsAndVmIDVDSParametersBase(getVdsId(), getVmId()));
Line 30:         setActionReturnValue(returnValue.getReturnValue());
Line 31:         setSucceeded(returnValue.getSucceeded());
Line 32:     }
> missing:
Done


http://gerrit.ovirt.org/#/c/22744/4/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmHandler.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmHandler.java:

Line 113:         COMMANDS_ALLOWED_ON_EXTERNAL_VMS.add(VdcActionType.VmLogon);
Line 114:         COMMANDS_ALLOWED_ON_EXTERNAL_VMS.add(VdcActionType.StopVm);
Line 115:         
COMMANDS_ALLOWED_ON_EXTERNAL_VMS.add(VdcActionType.ShutdownVm);
Line 116:         COMMANDS_ALLOWED_ON_EXTERNAL_VMS.add(VdcActionType.RemoveVm);
Line 117:         COMMANDS_ALLOWED_ON_EXTERNAL_VMS.add(VdcActionType.RebootVm);
> add it to the rebootVm canDoAction as well
Done
Line 118:         
COMMANDS_ALLOWED_ON_HOSTED_ENGINE.add(VdcActionType.MigrateVm);
Line 119:         
COMMANDS_ALLOWED_ON_HOSTED_ENGINE.add(VdcActionType.MigrateVmToServer);
Line 120:         
COMMANDS_ALLOWED_ON_HOSTED_ENGINE.add(VdcActionType.InternalMigrateVm);
Line 121:         
COMMANDS_ALLOWED_ON_HOSTED_ENGINE.add(VdcActionType.CancelMigrateVm);


http://gerrit.ovirt.org/#/c/22744/4/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/FeatureSupported.java
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/FeatureSupported.java:

Line 206:      * @return <code>true</code> if VM reboot is supported for the 
given version
Line 207:      */
Line 208:     public static boolean reboot(Version version) {
Line 209:         return supportedInConfig(ConfigValues.RebootSupported, 
version);
Line 210:     }
> i see that you are using the action_version_map table, which is great! so w
Yes you are right, this is a remnant of the full reboot patch where this 
functionality was required, it is not needed for this patch.


http://gerrit.ovirt.org/#/c/22744/4/packaging/dbscripts/upgrade/03_04_0390_add_reboot_command.sql
File packaging/dbscripts/upgrade/03_04_0390_add_reboot_command.sql:

Line 1: insert into action_version_map values (6, '3.4', '*');
> on your next rebase please update the file name for the latest upgrade scri
Done


http://gerrit.ovirt.org/#/c/22744/4/packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql
File packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql:

Line 200: select fn_db_add_config_value('CloudInitSupported','false','3.2');
Line 201: select 
fn_db_add_config_value('HotPlugDiskSnapshotSupported','false','3.0');
Line 202: select 
fn_db_add_config_value('HotPlugDiskSnapshotSupported','false','3.1');
Line 203: select 
fn_db_add_config_value('HotPlugDiskSnapshotSupported','false','3.2');
Line 204: select fn_db_add_config_value('RebootSupported','true','3.4');
> the practice is to have here the value for old versions, and in the default
Done
Line 205: 
Line 206: -- by default use no proxy
Line 207: select fn_db_add_config_value('SpiceProxyDefault','','general');
Line 208: 


-- 
To view, visit http://gerrit.ovirt.org/22744
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I0693943c01e204da877268c02957f3b936cf3fa2
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Betak <mbe...@redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernan...@redhat.com>
Gerrit-Reviewer: Martin Betak <mbe...@redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofren...@redhat.com>
Gerrit-Reviewer: Roy Golan <rgo...@redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to