Michael Kublin has posted comments on this change. Change subject: core: adding engine Maintenance and Prepare mode.(#868639) ......................................................................
Patch Set 8: (8 inline comments) .................................................... File backend/manager/dbscripts/upgrade/pre_upgrade/0000_config.sql Line 115: --Handling Enables Host Load Balancing system. Line 116: select fn_db_add_config_value('EnableVdsLoadBalancing','true','general'); Line 117: select fn_db_add_config_value('ENGINEEARLib','%JBOSS_HOME%/server/engine-slimmed/deploy/engine.ear','general'); Line 118: --Handling Engine working mode Line 119: select fn_db_add_config_value('EngineMode','Regular','general'); Done Line 120: --Handling Mail User Domain Line 121: select fn_db_add_config_value('ENMailDomain','','general'); Line 122: --Handling Use HTML in message body Line 123: select fn_db_add_config_value('ENMailIsBodyHtml','true','general'); .................................................... File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/Backend.java Line 293: public VdcReturnValueBase RunAction(VdcActionType actionType, VdcActionParametersBase parameters) { Line 294: VdcReturnValueBase returnValue = isModeAllowToRunAction(actionType); Line 295: if (returnValue != null) { Line 296: return returnValue; Line 297: } Done Line 298: return runActionImpl(actionType, parameters, false, null); Line 299: } Line 300: Line 301: private VdcReturnValueBase isModeAllowToRunAction(VdcActionType actionType) { Line 299: } Line 300: Line 301: private VdcReturnValueBase isModeAllowToRunAction(VdcActionType actionType) { Line 302: EngineWorkingMode mode = Line 303: EngineWorkingMode.valueOf(Config.<String> GetValue(ConfigValues.EngineMode).toUpperCase()); No, we have not , look at DBConfigUtils.parseValue(). We have not parse for Enum class. I can add, but these is not related to patch Line 304: switch (mode) { Line 305: case MAINTENANCEMODE: Line 306: return getErrorCommandReturnValue(VdcBllMessages.ENGINE_IS_RUNNING_IN_MAINTENANCE_MODE); Line 307: case PREPAREMODE: Line 610: returnValue.getCanDoActionMessages().add(message.toString()); Line 611: return returnValue; Line 612: } Line 613: Line 614: private VdcReturnValueBase isEngineRunInPrepareMode(VdcActionType action) { Done Line 615: Class<CommandBase<? extends VdcActionParametersBase>> clazz = Line 616: CommandsFactory.getCommandClass(action.name()); Line 617: if (clazz.isAnnotationPresent(DisableInPrepareMode.class)) { Line 618: return getErrorCommandReturnValue(VdcBllMessages.ENGINE_IS_RUNNING_IN_PREPARE_MODE); .................................................... File backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java Line 1531: OnlyRequiredNetworksMandatoryForVdsSelection(392), Line 1532: Line 1533: @Reloadable Line 1534: @TypeConverterAttribute(String.class) Line 1535: @DefaultValueAttribute("Regular") Done Line 1536: EngineMode(393), Line 1537: Line 1538: Invalid(65535); Line 1539: .................................................... Commit Message Line 10: configuration key named EngineMode (String). Line 11: Line 12: Adding support for engine Prepare mode - value is PrepareMode. Line 13: Adding support for engine Maintenance mode - value is MaintenanceMode. Line 14: Done Line 15: The default value of those configuration keys is Regular, however, this Line 16: value can be set to PrepareMode/MaintenanceMode in order to prevent new commands from being Line 17: processed by the backend class. Line 18: .................................................... File frontend/webadmin/modules/webadmin/src/main/resources/org/ovirt/engine/ui/frontend/AppErrors.properties Line 736: Line 737: VDS_GROUP_ENABLING_BOTH_VIRT_AND_GLUSTER_SERVICES_NOT_ALLOWED=Cannot ${action} ${type}. Enabling both Virt and Gluster services is not allowed. Line 738: Line 739: USER_CANNOT_FORCE_RECONNECT_TO_VM=Console connection denied. Another user has already accessed the console of this VM. The VM should be rebooted to allow another user to access it, or changed by an admin to not enforce reboot between users accessing its console. Line 740: ENGINE_IS_RUNNING_IN_MAINTENANCE_MODE=Engine is running in Maintenance mode by the upgrade process and is not accepting commands. Done Line 737: VDS_GROUP_ENABLING_BOTH_VIRT_AND_GLUSTER_SERVICES_NOT_ALLOWED=Cannot ${action} ${type}. Enabling both Virt and Gluster services is not allowed. Line 738: Line 739: USER_CANNOT_FORCE_RECONNECT_TO_VM=Console connection denied. Another user has already accessed the console of this VM. The VM should be rebooted to allow another user to access it, or changed by an admin to not enforce reboot between users accessing its console. Line 740: ENGINE_IS_RUNNING_IN_MAINTENANCE_MODE=Engine is running in Maintenance mode by the upgrade process and is not accepting commands. Line 741: ENGINE_IS_RUNNING_IN_PREPARE_MODE=Engine is running in Prepare mode by the upgrade process and is not accepting such commands. Done -- To view, visit http://gerrit.ovirt.org/8669 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Idd86f9f9008a447e160edc913ee8a6cd70912dcb Gerrit-PatchSet: 8 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Eli Mesika <emes...@redhat.com> Gerrit-Reviewer: Barak Azulay <bazu...@redhat.com> Gerrit-Reviewer: Eli Mesika <emes...@redhat.com> Gerrit-Reviewer: Itamar Heim <ih...@redhat.com> Gerrit-Reviewer: Michael Kublin <mkub...@redhat.com> Gerrit-Reviewer: Yair Zaslavsky <yzasl...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches