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

Bug 1496332

Summary: Agent failed to create temp directory on nonexistent parent directories
Product: [JBoss] JBoss Operations Network Reporter: Jeeva Kandasamy <jkandasa>
Component: AgentAssignee: Michael Burman <miburman>
Status: CLOSED ERRATA QA Contact: Jeeva Kandasamy <jkandasa>
Severity: medium Docs Contact:
Priority: medium    
Version: JON 3.3.9CC: fbrychta, spinder
Target Milestone: DR01Keywords: Triaged
Target Release: JON 3.3.10   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-16 03:16:33 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 Jeeva Kandasamy 2017-09-27 05:52:08 UTC
Agent failed to create "TMP", "TEMP" or any other directory on nonexistent parent directories.

This line creates the directory if it is not available.
https://github.com/rhq-project/rhq/blob/a2b784c65334db8b91a6206c534fc064f0be9de2/modules/enterprise/agent/src/main/java/org/rhq/enterprise/agent/AgentMain.java#L509

We are using "tmpDir.mkdir();", which can create directory only if the parent directory exists. AFAIK, still, we have to face this issue when we have nonexistent parent directories.


Version-Release:
-------------------------
JBoss Operations Network
Version : 3.3.0.GA Update 09
Build Number : fcb34f1:80f74f5
GWT Version : 2.5.0
SmartGWT Version : 3.0p

Additional info:

This issue identified on https://bugzilla.redhat.com/show_bug.cgi?id=1324217#c19

Comment 1 Michael Burman 2017-09-27 12:09:38 UTC
Fixed in the master:

commit 904b186d2faef2189499aa25cc63a275cf4fe9c7
Author: Michael Burman <miburman>
Date:   Wed Sep 27 15:09:02 2017 +0300

    [BZ 1496332] Use mkdirs to create non-existant parent dirs also

Comment 3 Simeon Pinder 2017-12-29 12:12:05 UTC
Moving to ON_QA as available for test with the latest build:

JON 3.3.10 DR01 artifacts are available for test from here:
http://download.eng.bos.redhat.com/brewroot/packages/org.jboss.on-jboss-on-parent/3.3.0.GA/164/maven/org/jboss/on/jon-server-patch/3.3.0.GA/jon-server-patch-3.3.0.GA.zip
 *Note: jon-server-patch-3.3.0.GA.zip maps to DR01 build of
 jon-server-3.3.0.GA-update-10.zip.

https://brewweb.engineering.redhat.com/brew/buildinfo?buildID=635136

Comment 4 Jeeva Kandasamy 2018-01-04 15:55:30 UTC
creates nested directories.

JON Version: 3.3.0.GA Update 10
Build Number: 8c98c29:28bd066

------------
2018-01-04 15:49:26,913 WARN  [WrapperSimpleAppMain] (org.rhq.enterprise.agent.AgentMain)- {Invalid TMP: [C:\windows\system32\config\systemprofile\AppData\Local\Temp] does not exist.}!!! missing resource message key=[Invalid TMP: [C:\windows\system32\config\systemprofile\AppData\Local\Temp] does not exist.] args=[]
2018-01-04 15:49:26,913 INFO  [WrapperSimpleAppMain] (org.rhq.enterprise.agent.AgentMain)- {Creating TMP: [C:\windows\system32\config\systemprofile\AppData\Local\Temp]}!!! missing resource message key=[Creating TMP: [C:\windows\system32\config\systemprofile\AppData\Local\Temp]] args=[]
2018-01-04 15:49:26,928 INFO  [WrapperSimpleAppMain] (org.rhq.enterprise.agent.AgentMain)- {AgentMain.identify-version}Version=[RHQ 4.12.0.JON330GA Update 10], Build Number=[28bd066], Build Date=[Dec 24, 2017 12:13 PM]
------------

Comment 7 errata-xmlrpc 2018-02-16 03:16:33 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

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

https://access.redhat.com/errata/RHBA-2018:0325