Moti Asayag has posted comments on this change. Change subject: webadmin: Enable 'Upgrade' action for all host types ......................................................................
Patch Set 5: (6 comments) https://gerrit.ovirt.org/#/c/40706/5//COMMIT_MSG Commit Message: Line 5: CommitDate: 2015-05-10 11:16:56 +0300 Line 6: Line 7: webadmin: Enable 'Upgrade' action for all host types Line 8: Line 9: With the UpgradeHost action, also non ovirt-node hosts > Please merge this patch with- https://gerrit.ovirt.org/#/c/40631/6 so that Done Line 10: can be upgraded. The patch adds the required functionality Line 11: for it and adjusts the behavior of ovirt-node upgrade Line 12: flow to use the new command. Line 13: https://gerrit.ovirt.org/#/c/40706/5/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/VdcActionUtils.java File backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/VdcActionUtils.java: Line 33: vdsMatrix.put( Line 34: VDSStatus.Up, Line 35: EnumSet.of(VdcActionType.ActivateVds, VdcActionType.RemoveVds, Line 36: VdcActionType.ClearNonResponsiveVdsVms, Line 37: VdcActionType.ApproveVds, VdcActionType.StartVds, VdcActionType.StopVds)); > Can you upgrade a running host? yes, that's the nicest part of this feature, it will move the host to maintenance, migrate all the vms from it, perform the upgrade and will bring the host back to up. TA-DA :-) Line 38: vdsMatrix.put( Line 39: VDSStatus.Error, Line 40: EnumSet.of(VdcActionType.RemoveVds, Line 41: VdcActionType.ClearNonResponsiveVdsVms, https://gerrit.ovirt.org/#/c/40706/5/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostListModel.java File frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostListModel.java: Line 1534: model.setVds(host); Line 1535: setWindow(model); Line 1536: model.setTitle(ConstantsManager.getInstance().getConstants().installHostTitle()); Line 1537: model.setHelpTag(HelpTag.upgrade_host); Line 1538: model.setHashName("install_host"); //$NON-NLS-1$ > Please fix hashName i'll modify it to upgrade_host, but wanted to verify it is not relied in any way to the type of this model which is the InstallModel (in other words, what's the meaning of that hash name?). Line 1539: model.getOVirtISO().setIsAvailable(false); Line 1540: Line 1541: model.getOverrideIpTables().setIsAvailable(false); Line 1542: model.getActivateHostAfterInstall().setEntity(true); Line 2125: Line 2126: } Line 2127: Line 2128: private boolean canUpgradeHost(VDS host) { Line 2129: return host.isUpdateAvailable() > Is 'VDSType.oVirtNode' contains the correct calue for VDSType.oVirtNode? it is not 100% represent the actual data. For hosts, the isUpdateAvailable() is updated once a day, by running a command on the host to check for the available updates. For oVirt-node, we perform the same query as on line 1994 (getOvirtIso...()), but executing it once a day might not reflect the actual available updates for ovirt-node, since the admin can install new updates on the ovirt-engine server, and without performing the query again, no update will be notified for them. Line 2130: && VdcActionUtils.canExecute(Arrays.asList(host), VDS.class, VdcActionType.UpgradeHost); Line 2131: } Line 2132: Line 2133: private boolean singleHostSelected(ArrayList<VDS> items) { https://gerrit.ovirt.org/#/c/40706/5/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/UIConstants.java File frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/UIConstants.java: Line 927: Line 928: @DefaultStringValue("Host must be installed before upgrade.") Line 929: String hostMustBeInstalledBeforeUpgrade(); Line 930: Line 931: @DefaultStringValue("Are you sure you want to Upgrade the Host, running VM(s) will be migrated?") > There are running VMs on this host. Are you sure you want to continue the u Done Line 932: String areYouSureYouWantToUpgradeTheFollowingHostWithRunningVmsMsg(); Line 933: Line 934: @DefaultStringValue("Are you sure you want to Upgrade the Host?") Line 935: String areYouSureYouWantToUpgradeTheFollowingHostMsg(); Line 930: Line 931: @DefaultStringValue("Are you sure you want to Upgrade the Host, running VM(s) will be migrated?") Line 932: String areYouSureYouWantToUpgradeTheFollowingHostWithRunningVmsMsg(); Line 933: Line 934: @DefaultStringValue("Are you sure you want to Upgrade the Host?") > Are you sure you want to Upgrade this Host? Done Line 935: String areYouSureYouWantToUpgradeTheFollowingHostMsg(); Line 936: Line 937: @DefaultStringValue("Testing in progress. It will take a few seconds. Please wait...") Line 938: String testingInProgressItWillTakeFewSecondsPleaseWaitMsg(); -- To view, visit https://gerrit.ovirt.org/40706 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ic064f6e8bdefe47fc0a16df2660afcb53782bbec Gerrit-PatchSet: 5 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Moti Asayag <masa...@redhat.com> Gerrit-Reviewer: Alona Kaplan <alkap...@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Moti Asayag <masa...@redhat.com> Gerrit-Reviewer: Oved Ourfali <oourf...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches