Leonardo Bianconi has uploaded a new change for review. Change subject: core: Reset emulated machines after architecture changing ......................................................................
core: Reset emulated machines after architecture changing After PPC patches, cluster received a new parameter, the architecture one. As it affects the parameter "emulated machine", when a change occurs on CPU name, which results in an architecture change, the parameter "emulated machine" must be updated. This patch introduces the change to set the cluster to reset this parameter when adding the first host. Important: It will happen only with empty clusters, since there are validations when changing CPU name for other architecture. Change-Id: I1d400b8d475f63e720ad88ad00116aea9720f7ba Signed-off-by: Leonardo Bianconi <[email protected]> --- M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVdsGroupCommand.java 1 file changed, 6 insertions(+), 0 deletions(-) git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/52/22652/1 diff --git a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVdsGroupCommand.java b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVdsGroupCommand.java index 8579f4a..5ae7a18 100644 --- a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVdsGroupCommand.java +++ b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVdsGroupCommand.java @@ -74,6 +74,12 @@ getParameters().getVdsGroup().setEmulatedMachine(emulatedMachine); } } + else if (oldGroup.getArchitecture() != getVdsGroup().getArchitecture()) { + // if architecture was changed, emulated machines must be updated when adding new host. + // At this point the cluster is empty and have changed CPU name + getParameters().getVdsGroup().setDetectEmulatedMachine(true); + getParameters().getVdsGroup().setEmulatedMachine(null); + } getVdsGroupDAO().update(getParameters().getVdsGroup()); -- To view, visit http://gerrit.ovirt.org/22652 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I1d400b8d475f63e720ad88ad00116aea9720f7ba Gerrit-PatchSet: 1 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Leonardo Bianconi <[email protected]> _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
