Douglas Schilling Landgraf has uploaded a new change for review. Change subject: backend,frontend: warn users that host must be installed before upgrade ......................................................................
backend,frontend: warn users that host must be installed before upgrade In backend we must check if nodeOS is null and in frontend we should warn users that any node cannot be upgraded before installed. Change-Id: If8ad4f88a079c7f25b544320e10f1d2b5c4190b2 Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1076221 Signed-off-by: Douglas Schilling Landgraf <dougsl...@redhat.com> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetoVirtISOsQuery.java M frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostListModel.java M frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/UIConstants.java 3 files changed, 12 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/53/26653/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetoVirtISOsQuery.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetoVirtISOsQuery.java index 07da53e..dc6960c 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetoVirtISOsQuery.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetoVirtISOsQuery.java @@ -43,6 +43,10 @@ RpmVersion vdsOsVersion = VdsHandler.getOvirtHostOsVersion(vds); String nodeOS = vds.getHostOs(); + if (nodeOS == null) { + getQueryReturnValue().setReturnValue(new ArrayList<RpmVersion>()); + return; + } for (OVirtNodeInfo.Entry info : OVirtNodeInfo.getInstance().get()) { log.debugFormat( "nodeOS [{0}] | osPattern [{1}] | minimumVersion [{2}]", diff --git a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostListModel.java b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostListModel.java index b26c7fb..422e308 100644 --- a/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostListModel.java +++ b/frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/hosts/HostListModel.java @@ -1408,6 +1408,11 @@ .thereAreNoISOversionsVompatibleWithHostCurrentVerMsg()); } + if (host.getHostOs() == null) { + model.setMessage(ConstantsManager.getInstance().getConstants() + .hostMustBeInstalledBeforeUpgrade()); + } + addUpgradeCommands(model, host, isos.isEmpty()); getWindow().stopProgress(); } diff --git a/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/UIConstants.java b/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/UIConstants.java index 121babc..6257e40 100644 --- a/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/UIConstants.java +++ b/frontend/webadmin/modules/uicompat/src/main/java/org/ovirt/engine/ui/uicompat/UIConstants.java @@ -803,6 +803,9 @@ @DefaultStringValue("Host doesn't support Local Storage configuration") String hostDoesntSupportLocalStorageConfigurationMsg(); + @DefaultStringValue("Host must be properly installed before upgrade.") + String hostMustBeInstalledBeforeUpgrade(); + @DefaultStringValue("Testing in progress. It will take a few seconds. Please wait...") String testingInProgressItWillTakeFewSecondsPleaseWaitMsg(); -- To view, visit http://gerrit.ovirt.org/26653 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: If8ad4f88a079c7f25b544320e10f1d2b5c4190b2 Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Douglas Schilling Landgraf <dougsl...@redhat.com> _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches