Bug 1474352 - NPE While Increase size of vm pool with initial run configuration (cloud init)
Summary: NPE While Increase size of vm pool with initial run configuration (cloud init)
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Virt
Version: 4.1.4.2
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ovirt-4.2.0
: ---
Assignee: Arik
QA Contact: Israel Pinto
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-07-24 12:44 UTC by Israel Pinto
Modified: 2019-04-28 13:26 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-12-20 11:13:28 UTC
oVirt Team: Virt
Embargoed:
rule-engine: ovirt-4.2+
rule-engine: planning_ack+
ahadas: devel_ack+
rule-engine: testing_ack+


Attachments (Terms of Use)
engine.log (149.16 KB, application/x-xz)
2017-07-24 12:44 UTC, Israel Pinto
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 79812 0 master MERGED core: fix NPE when increasing the number of vms in a pool 2017-07-26 20:51:23 UTC

Description Israel Pinto 2017-07-24 12:44:04 UTC
Created attachment 1303626 [details]
engine.log

Description of problem:  
NullPointerException while increase VM pool size.

Version-Release number of selected component (if applicable):
Red Hat Virtualization Manager Version: 4.1.4.2-0.1.el7
Host:
OS Version:RHEL - 7.4 - 18.el7
Kernel Version:3.10.0 - 693.el7.x86_64
KVM Version:2.9.0 - 16.el7_4.3
LIBVIRT Version:libvirt-3.2.0-14.el7
VDSM Version:vdsm-4.19.23-1.el7ev
SPICE Version:0.12.8 - 2.el7

How reproducible:
All the time 

Steps to Reproduce:
1. Create VM pool with 1 VM
2. Increase VM pool using UI ("Increase number of VMs in pool by" value)

Actual results:
No VMs added to pool.
Engine log: (Attached)
2017-07-24 15:36:03,018+03 INFO  [org.ovirt.engine.core.bll.UpdateVmPoolCommand] (default task-4) [5af31e33-7c67-44ab-a04e-10f140bbad78] Lock Acquired to object 'EngineLock:{exclusiveLocks='[50845afe-3c7e-4ed0-8e0b-5c7c283c20ff=VM_POOL]', sharedLocks=''}'
2017-07-24 15:36:03,320+03 INFO  [org.ovirt.engine.core.bll.UpdateVmPoolCommand] (org.ovirt.thread.pool-7-thread-15) [5af31e33-7c67-44ab-a04e-10f140bbad78] Running command: UpdateVmPoolCommand internal: false. Entities affected :  ID: 50845afe-3c7e-4ed0-8e0b-5c7c283c20ff Type: VmPoolAction group EDIT_VM_POOL_CONFIGURATION with role type USER
2017-07-24 15:36:03,442+03 ERROR [org.ovirt.engine.core.bll.UpdateVmPoolCommand] (org.ovirt.thread.pool-7-thread-15) [5af31e33-7c67-44ab-a04e-10f140bbad78] Command 'org.ovirt.engine.core.bll.UpdateVmPoolCommand' failed: null
2017-07-24 15:36:03,442+03 ERROR [org.ovirt.engine.core.bll.UpdateVmPoolCommand] (org.ovirt.thread.pool-7-thread-15) [5af31e33-7c67-44ab-a04e-10f140bbad78] Exception: java.lang.NullPointerException
        at org.ovirt.engine.core.bll.CommonVmPoolCommand.updateVmInitPassword(CommonVmPoolCommand.java:311) [bll.jar:]
        at org.ovirt.engine.core.bll.CommonVmPoolCommand.executeCommand(CommonVmPoolCommand.java:190) [bll.jar:]
        at org.ovirt.engine.core.bll.UpdateVmPoolCommand.executeCommand(UpdateVmPoolCommand.java:113) [bll.jar:]
        at org.ovirt.engine.core.bll.CommandBase.executeWithoutTransaction(CommandBase.java:1251) [bll.jar:]
        at org.ovirt.engine.core.bll.CommandBase.executeActionInTransactionScope(CommandBase.java:1391) [bll.jar:]
        at org.ovirt.engine.core.bll.CommandBase.runInTransaction(CommandBase.java:2055) [bll.jar:]
        at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInSuppressed(TransactionSupport.java:164) [utils.jar:]
        at org.ovirt.engine.core.utils.transaction.TransactionSupport.executeInScope(TransactionSupport.java:103) [utils.jar:]
        at org.ovirt.engine.core.bll.CommandBase.execute(CommandBase.java:1451) [bll.jar:]
        at org.ovirt.engine.core.bll.CommandBase.executeAction(CommandBase.java:397) [bll.jar:]
        at org.ovirt.engine.core.bll.PrevalidatingMultipleActionsRunner.executeValidatedCommand(PrevalidatingMultipleActionsRunner.java:204) [bll.jar:]
        at org.ovirt.engine.core.bll.PrevalidatingMultipleActionsRunner.runCommands(PrevalidatingMultipleActionsRunner.java:176) [bll.jar:]
        at org.ovirt.engine.core.bll.PrevalidatingMultipleActionsRunner.lambda$invokeCommands$3(PrevalidatingMultipleActionsRunner.java:182) [bll.jar:]
        at org.ovirt.engine.core.utils.threadpool.ThreadPoolUtil$InternalWrapperRunnable.run(ThreadPoolUtil.java:84) [utils.jar:]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [rt.jar:1.8.0_131]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_131]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_131]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_131]
        at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_131]

2017-07-24 15:36:03,506+03 INFO  [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (org.ovirt.thread.pool-7-thread-15) [5af31e33-7c67-44ab-a04e-10f140bbad78] EVENT_ID: USER_UPDATE_VM_POOL_WITH_VMS(344), Correlation ID: 5af31e33-7c67-44ab-a04e-10f140bbad78, Job ID: d4d97284-1af8-4fdf-a438-649763c31ec1, Call Stack: null, Custom Event ID: -1, Message: VM Pool guest_pool_1 was updated by admin@internal-authz, 4 VMs were added.

Comment 1 Israel Pinto 2017-07-24 14:53:33 UTC
also happened in:
oVirt Engine Version: 4.2.0-0.0.master.20170714185626.git9418884.el7.centos

Comment 2 Israel Pinto 2017-07-24 15:10:08 UTC
Update the steps:

1. Create VM pool with one VM, set initial run (with cloud init) and set root password.
2.  Increase VM pool using UI ("Increase number of VMs in pool by" value)

Comment 3 Arik 2017-07-25 08:46:46 UTC
Israel, are you sure it is a regression? do we know in which version did it work?

Comment 4 Arik 2017-07-25 08:52:35 UTC
(In reply to Arik from comment #3)
> Israel, are you sure it is a regression? do we know in which version did it
> work?

Let me be more specific.
It happens in a specific scenario where the template the pool is based on is not set with cloud-init/sysprep but the pool is. It seems to me that this problem can happen even in 3.4, but it will take me too much time to verify that. That's why I'm asking if we know of any version in which this particular flow worked, so I can examine its code to see what has changed.

Comment 5 Israel Pinto 2017-07-25 09:11:58 UTC
(In reply to Arik from comment #3)
> Israel, are you sure it is a regression? do we know in which version did it
> work?

I set the regression since I thought it happened also without 
cloud init setting. But after rechecking it we can remove regression.

Comment 6 Israel Pinto 2017-07-30 13:19:43 UTC
Engine:
oVirt Engine Version: 4.2.0-0.0.master.20170728194615.gitec6aa15.el7.centos
Steps:
1. Create VM pool with 1 VM and configure cloud init password
2. Increase VM pool using UI ("Increase number of VMs in pool by" value) with 2 VMS

Results:
VM pool size = 3 
PASS

Comment 7 Sandro Bonazzola 2017-12-20 11:13:28 UTC
This bugzilla is included in oVirt 4.2.0 release, published on Dec 20th 2017.

Since the problem described in this bug report should be
resolved in oVirt 4.2.0 release, published on Dec 20th 2017, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.