From Arik Hadas <ahadas(a)redhat.com>:
Arik Hadas has submitted this change and it was merged. (
https://gerrit.ovirt.org/79812
)
Change subject: core: fix NPE when increasing the number of vms in a pool
......................................................................
core: fix NPE when increasing the number of vms in a pool
When a VM pool is created from a template that is not set with VM-init
(neither sysprep nor cloud-init) and the pool is configured with
VM-init that includes root password, an NPE is thrown while trying to
increase the number of VMs in the pool because the VM is set with the
'passwordAlreadyStored' flag on and thus, the engine tries to take the
password from the VM-init of the template that the pool is based on.
This patch fixes this issue by changing the setting of the password
of a VM that is added to such a pool so the password would be taken
from one of the VMs in the pool rather than from the template. This is
what we generally do in order to get the properties of VMs that are
part of a VM pool. This may stil be problematic if the VM-init part of
the chosen VM was removed. However, this case is really not likely to
happen so in this case we just clear the password.
Change-Id: Id7939138daf12809a5551da5221fb2483a03dce0
Bug-Url:
https://bugzilla.redhat.com/1474352
Signed-off-by: Arik Hadas <ahadas(a)redhat.com>
---
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/AddVmPoolCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/CommonVmPoolCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/UpdateVmPoolCommand.java
3 files changed, 29 insertions(+), 12 deletions(-)
Approvals:
Jenkins CI: Passed CI tests
Shmuel Leib Melamud: Looks good to me, but someone else must approve
Arik Hadas: Verified; Looks good to me, approved
--
To view, visit
https://gerrit.ovirt.org/79812
To unsubscribe, visit
https://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Id7939138daf12809a5551da5221fb2483a03dce0
Gerrit-PatchSet: 7
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Arik Hadas <ahadas(a)redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas(a)redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Sharon Gratch <sgratch(a)redhat.com>
Gerrit-Reviewer: Shmuel Leib Melamud <smelamud(a)redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation(a)ovirt.org>