Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1076221

Summary: [host-deploy] ovirt-node upgrade results in null point exception if initial installation of node failed in past
Product: [Retired] oVirt Reporter: Alon Bar-Lev <alonbl>
Component: ovirt-engine-coreAssignee: Douglas Schilling Landgraf <dougsland>
Status: CLOSED CURRENTRELEASE QA Contact: Pavel Stehlik <pstehlik>
Severity: high Docs Contact:
Priority: unspecified    
Version: 3.4CC: acathrow, alonbl, bazulay, dougsland, gklein, iheim, oourfali, sbonazzo, yeylon, yzaslavs
Target Milestone: ---   
Target Release: 3.4.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: infra
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-05-20 20:55:30 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Alon Bar-Lev 2014-03-13 19:45:56 UTC
If initial installation of node fails the:

        String nodeOS = vds.getHostOs();

Returns null, so we cannot detect the images.

I suggest that in this case we fail upgrade with an error that host must be reinstalled before upgrade.

---

2014-03-13 21:39:58,843 DEBUG [org.ovirt.engine.core.bll.OVirtNodeInfo] (http--0.0.0.0-8080-1) NodeInfo: regexISO length 2 minimum length 2 path length 2 regexNode 2
2014-03-13 21:39:58,844 DEBUG [org.ovirt.engine.core.bll.OVirtNodeInfo] (http--0.0.0.0-8080-1) NodeInfo: regexISO ^ovirt-node-iso-(.*)\.*\.iso$ path /usr/share/ovirt-node-iso, minimumVersion 2.5.5 regexNode ^ovirt.*$
2014-03-13 21:39:58,845 DEBUG [org.ovirt.engine.core.bll.OVirtNodeInfo] (http--0.0.0.0-8080-1) NodeInfo: regexISO ^rhevh-(.*)\.*\.iso$ path /usr/share/rhev-hypervisor, minimumVersion 5.8 regexNode ^rhev.*$
2014-03-13 21:39:58,846 DEBUG [org.ovirt.engine.core.bll.GetoVirtISOsQuery] (http--0.0.0.0-8080-1) nodeOS [null] | osPattern [^ovirt.*$] | minimumVersion [2.5.5]
2014-03-13 21:39:58,847 ERROR [org.ovirt.engine.core.bll.GetoVirtISOsQuery] (http--0.0.0.0-8080-1) Query GetoVirtISOsQuery failed. Exception message is null : java.lang.NullPointerException: java.lang.NullPointerException
        at java.util.regex.Matcher.getTextLength(Matcher.java:1234) [rt.jar:1.7.0_51]
        at java.util.regex.Matcher.reset(Matcher.java:308) [rt.jar:1.7.0_51]
        at java.util.regex.Matcher.<init>(Matcher.java:228) [rt.jar:1.7.0_51]
        at java.util.regex.Pattern.matcher(Pattern.java:1088) [rt.jar:1.7.0_51]
        at org.ovirt.engine.core.bll.GetoVirtISOsQuery.executeQueryCommand(GetoVirtISOsQuery.java:54) [bll.jar:]
        at org.ovirt.engine.core.bll.QueriesCommandBase.executeCommand(QueriesCommandBase.java:66) [bll.jar:]
        at org.ovirt.engine.core.dal.VdcCommandBase.execute(VdcCommandBase.java:31) [dal.jar:]

Comment 1 Barak 2014-03-20 15:22:52 UTC
Alon,

What is the problem ? (I assume is that the option ot upgrade appears)
What are your expectations here ?

Comment 2 Alon Bar-Lev 2014-03-20 15:26:36 UTC
(In reply to Barak from comment #1)
> Alon,
> 
> What is the problem ? (I assume is that the option ot upgrade appears)

per comment#0, appears and cause null point exception as the node operating system is unknown.

> What are your expectations here ?

I wrote in comment#0:
"""
I suggest that in this case we fail upgrade with an error that host must be reinstalled before upgrade.
"""

Comment 3 Sandro Bonazzola 2014-05-08 09:11:24 UTC
Looks like the pathces are in 3.4.1, can you please check and re-target this accordingly and move to closed current release if so? Thanks