Bug 1451390 - Null pointer exception while updating cluster name
Summary: Null pointer exception while updating cluster name
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: Backend.Core
Version: 4.2.0
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ovirt-4.2.0
: 4.2.0
Assignee: Moti Asayag
QA Contact: Petr Matyáš
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-05-16 14:37 UTC by Aleksei Slaikovskii
Modified: 2017-12-20 11:14 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
undefined
Clone Of:
Environment:
Last Closed: 2017-12-20 11:14:42 UTC
oVirt Team: Infra
Embargoed:
rule-engine: ovirt-4.2+
rule-engine: planning_ack+
masayag: devel_ack+
lsvaty: testing_ack+


Attachments (Terms of Use)
engine.log (2.18 MB, text/plain)
2017-05-16 14:37 UTC, Aleksei Slaikovskii
no flags Details
Right engine log (32.38 KB, text/plain)
2017-05-16 14:39 UTC, Aleksei Slaikovskii
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 76917 0 master MERGED engine: Use uninjected Auditlogable implementation 2017-05-17 08:12:06 UTC

Description Aleksei Slaikovskii 2017-05-16 14:37:01 UTC
Created attachment 1279344 [details]
engine.log

Description of problem:
Hi!

I have a cluster with a name golden_env_mixed_1. So then I want to update it to, for example, golden_env_mixed_1Updated.

curl -k -u admin@internal:123456 https://engine/ovirt-engine/api/clusters/9e261552-bea4-413a-93d4-cfdba74e1229 -X PUT -H "Content-Type: application/xml" -d "<cluster><name>golden_env_mixed_1</name><migration><policy/></migration></cluster>"

Then I've got response from API:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<fault>
    <detail>java.lang.NullPointerException</detail>
    <reason>Operation Failed</reason>
</fault>

Cluster name gets updated.


Version-Release number of selected component (if applicable):
ovirt-engine-4.2.0-0.0.master.20170511082137.gitb609a4c.el7.centos.noarch

How reproducible:
100%

Steps to Reproduce:
Not sure but
1. Have a cluster (maybe even with underscores in it's name)
2. Try to update it's name
3. Get NPE and get cluster's name updated.

Comment 1 Aleksei Slaikovskii 2017-05-16 14:39:36 UTC
Created attachment 1279345 [details]
Right engine log

Sorry, I've added wrong engine.log. This one is ok.

Comment 2 Aleksei Slaikovskii 2017-05-16 14:48:21 UTC
Also while updating data center's name I've got NPE.

Comment 3 Aleksei Slaikovskii 2017-05-17 05:11:44 UTC
And also storage domain.

Comment 4 Yaniv Kaul 2017-05-17 06:11:44 UTC
Caused by: java.lang.NullPointerException
	at org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase.getCluster(AuditLogableBase.java:513)
	at org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogableBase.getClusterName(AuditLogableBase.java:541)
	at org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogable.setPropertiesForAuditLog(AuditLogable.java:159)
	at org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.saveToDb(AuditLogDirector.java:85)
	at org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log(AuditLogDirector.java:69)
	at org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector.log(AuditLogDirector.java:49)
	at org.ovirt.engine.core.bll.CommandBase.auditLog(CommandBase.java:771)
	at org.ovirt.engine.core.bll.CommandBase.logRenamedEntity(CommandBase.java:765)
	at org.ovirt.engine.core.bll.CommandBase.execute(CommandBase.java:1473)
	at org.ovirt.engine.core.bll.CommandBase.executeAction(CommandBase.java:405)
	at org.ovirt.engine.core.bll.executor.DefaultBackendActionExecutor.execute(DefaultBackendActionExecutor.java:13)
	at org.ovirt.engine.core.bll.Backend.runAction(Backend.java:495)

Comment 5 Lukas Svaty 2017-09-06 06:54:00 UTC
still reproducible in automation

Comment 6 Red Hat Bugzilla Rules Engine 2017-09-06 06:54:06 UTC
Target release should be placed once a package build is known to fix a issue. Since this bug is not modified, the target version has been reset. Please use target milestone to plan a fix for a oVirt release.

Comment 7 Moti Asayag 2017-09-07 09:39:30 UTC
Seems that last build didn't pick up the commit (2e4c7678d9023f65a5b876b994933e3a6e70381a) which solved the bug.

Moving back to ON_QA.

Comment 8 Petr Matyáš 2017-09-21 11:35:18 UTC
Verified on ovirt-engine-4.2.0-0.0.master.20170918173214.git7183359.el7.centos.noarch

Comment 9 Sandro Bonazzola 2017-12-20 11:14:42 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.