Moti Asayag has posted comments on this change.

Change subject: core: [Fix] Add host hotplug support checks
......................................................................


Patch Set 2: Code-Review-1

(4 comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/VmCommand.java
Line 391:         return isHotPlugSupported() && isOsSupportingHotPlug();
Line 392:     }
Line 393: 
Line 394:     protected boolean canPerformNicHotPlug() {
Line 395:         return osRepository.hasNicHotplugSupport(getVm().getOs(), 
getVm().getVdsGroupCompatibilityVersion());
this method should also check the compatibility of the host with operation, 
such as done in canPerformDiskHotPlug.

I think that canPerformDiskHotPlug() and canPerformNicHotPlug() should be 
unified and look like: 

  protected boolean canPerformHotPlug() {
    return FeatureSupported.hotPlug(getVm().getVdsGroupCompatibilityVersion()) 
&& osRepository.hasNicHotplugSupport(getVm().getOs(), 
getVm().getVdsGroupCompatibilityVersion());
  }
Line 396:     }
Line 397: 
Line 398:     /**
Line 399:      * check that hotplug is enabled via the 3.1 config paramter 
{@literal ConfigValues.HotPlugEnabled,


Line 398:     /**
Line 399:      * check that hotplug is enabled via the 3.1 config paramter 
{@literal ConfigValues.HotPlugEnabled,
Line 400:      * @return
Line 401:      */
Line 402:     protected boolean isHotPlugSupported() {
this method can be replaced by FeatureSupported.hotPlug(Version) which performs 
exactly the same.
Line 403:         if (Config.<Boolean> GetValue(ConfigValues.HotPlugEnabled, 
getVds().getVdsGroupCompatibilityVersion()
Line 404:                 .getValue())) {
Line 405:             return true;
Line 406:         }


Line 411:     /**
Line 412:      * The following method should check if os of guest is supported 
for hot plug/unplug operation
Line 413:      * @return
Line 414:      */
Line 415:     protected boolean isOsSupportingHotPlug() {
I thought that this code should be removed and replaced by the OsRepository 
(oslibinfo) check -  basically this was the essence of the previous cleanup 
patch : removing the usage of ConfigValues.HotPlugUnsupportedOsList.

We should use the OsRepository to check if the guest (vm) OS supports the 
hotplug, so this should be removed.
Line 416:         int vmOs = getVm().getOs();
Line 417:         String[] unsupportedOSs = Config.<String> 
GetValue(ConfigValues.HotPlugUnsupportedOsList).split(",");
Line 418:         for (String os : unsupportedOSs) {
Line 419:             if (os.equalsIgnoreCase(osRepository.getOsName(vmOs))) {


....................................................
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java
Line 907: 
Line 908:     @Reloadable
Line 909:     @TypeConverterAttribute(String.class)
Line 910:     @DefaultValueAttribute("")
Line 911:     HotPlugUnsupportedOsList,
this property should be removed. This logic should be cover by the OsRepository 
which contains the proper information regarding the guest OS in the 
osinfo-defaults.properties file.
Line 912: 
Line 913:     @Reloadable
Line 914:     @TypeConverterAttribute(Boolean.class)
Line 915:     @DefaultValueAttribute("false")


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I8e4c8409c0de4ff1c959d27b54e793a31654326c
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Gustavo Frederico Temple Pedrosa <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Gustavo Frederico Temple Pedrosa 
<[email protected]>
Gerrit-Reviewer: Leonardo Bianconi <[email protected]>
Gerrit-Reviewer: Liron Ar <[email protected]>
Gerrit-Reviewer: Mike Kolesnik <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: Vitor de Lima <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: liron aravot <[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