Martin Betak has posted comments on this change.

Change subject: backend: Add cold VM reboot support
......................................................................


Patch Set 11:

(6 comments)

http://gerrit.ovirt.org/#/c/27012/11/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 33:     @Override
Line 34:     protected void perform() {
Line 35:         VDSReturnValue returnValue;
Line 36:         final PowerDownVmVDSParameters parameters = 
createVdsParameters();
Line 37:         if (isColdRebootRequired() && 
FeatureSupported.powerDownOptions(getVds().getVdsGroupCompatibilityVersion())) {
> iiuc, if the feature is not supported, reboot will do shutdown, so why enab
if there is no need for cold reboot the vdsm may still be able to perform the 
light-reboot (via guest-agent) supported in previous cluster version
Line 38:             log.infoFormat("VM {0} configuration has changed. 
Destroying and recreating with new configuration.", getVm().getName());
Line 39:             TransactionSupport.executeInNewTransaction(new 
TransactionMethod<Void>() {
Line 40:                 @Override
Line 41:                 public Void runInTransaction() {


http://gerrit.ovirt.org/#/c/27012/11/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ShutdownVmCommand.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ShutdownVmCommand.java:

Line 44:         log.infoFormat("Entered (VM {0}).", getVm().getName());
Line 45: 
Line 46:         VmHandler.updateVmGuestAgentVersion(getVm());
Line 47: 
Line 48:         if (canShutdownVm()) {
> is this check still valid and true?
Yes. The graceful shutdown is still only considered when the VM is UP and has 
some graceful means of shutdown (guest-agent, acpi)
Line 49:             // shutting down desktop and waiting for it in a separate 
thread to
Line 50:             // become 'down':
Line 51:             log.infoFormat("Sending shutdown command for VM {0}.", 
getVmName());
Line 52: 


http://gerrit.ovirt.org/#/c/27012/11/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsEventListener.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VdsEventListener.java:

Line 385:     @Override
Line 386:     public void runEngineControlledRebootVm(Guid id) {
Line 387:         log.infoFormat("Starting reconfigured VM {0} as a part of 
reboot.", id);
Line 388:         final VdcReturnValueBase result = 
Backend.getInstance().runInternalAction(VdcActionType.RunVm, new 
RunVmParams(id),
Line 389:                                                                       
            ExecutionHandler.createInternalJobContext());
> no need to call ExecutionHandler.createInternalJobContext()
Done
Line 390: 
Line 391:         if (!result.getSucceeded()) {
Line 392:             log.errorFormat("Reboot failed. Unable to start VM {0}.", 
id);
Line 393:         }


http://gerrit.ovirt.org/#/c/27012/11/backend/manager/modules/dal/src/test/resources/fixtures.xml
File backend/manager/modules/dal/src/test/resources/fixtures.xml:

Line 2235:             <value>preferred</value>
Line 2236:             <value>true</value>
Line 2237:             <value>true</value>
Line 2238:             <null />
Line 2239:             <null />
> shouldnt be 3 fields?
yes thanks! It seems git was overzealous in its merge :-)
Line 2240:         </row>
Line 2241:         <row>
Line 2242:             <value>77296e00-0cad-4e5a-9299-008a7b6f4356</value>
Line 2243:             <value>VM</value>


Line 2358:             <value>preferred</value>
Line 2359:             <value>true</value>
Line 2360:             <value>true</value>
Line 2361:             <null />
Line 2362:             <value>90</value>
> same
Done
Line 2363:         </row>
Line 2364:         <row>
Line 2365:             <value>77296e00-0cad-4e5a-9299-008a7b6f4359</value>
Line 2366:             <value>VM</value>


http://gerrit.ovirt.org/#/c/27012/11/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/RebootVmVDSCommand.java
File 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/vdsbroker/RebootVmVDSCommand.java:

Line 14: 
Line 15:     @Override
Line 16:     protected void executeVdsBrokerCommand() {
Line 17:         final String message = 
Config.getValue(ConfigValues.VmGracefulShutdownMessage);
Line 18:         if 
(FeatureSupported.powerDownOptions(getVds().getVdsGroupCompatibilityVersion())) 
{
> if reboot is not supported we are doing shutdown?
No. This check is only for support of "power down options" (force, timeout). 
Reboot without these options is already supported.
Line 19:             status = 
getBroker().shutdown(getParameters().getVmId().toString(),
Line 20:                                           
String.valueOf(getParameters().getUserDelay()),
Line 21:                                           message,
Line 22:                                           true,


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I9ed08f6a6ce6dfc2257da1a7cd41141d05aff039
Gerrit-PatchSet: 11
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Betak <[email protected]>
Gerrit-Reviewer: Arik Hadas <[email protected]>
Gerrit-Reviewer: Martin Betak <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: Tomas Jelinek <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to