Bug 1326707

Summary: Wrong error message when creating File Handler in Logging subsystem for EAP6 plugin
Product: [JBoss] JBoss Operations Network Reporter: Vojta Prusa <vprusa>
Component: Plugin -- JBoss EAP 6Assignee: Josejulio Martínez <jmartine>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: medium Docs Contact:
Priority: medium    
Version: JON 3.3.5CC: fbrychta, loleary, miburman, spinder
Target Milestone: ER01Keywords: Triaged
Target Release: One-off release   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-07-13 15:17:04 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:
Bug Depends On:    
Bug Blocks: 1327633    

Description Vojta Prusa 2016-04-13 10:50:25 UTC
Description of problem:
When creating File Handler child resource for Logging subsystem via Create Resource Wizard and setting file Path with using "relative to" option and choosing file path prefix the error message does not contain full wrong path to file but just file path without file path prefix for some cases.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1) In JON UI go to Server - Top Level imports-> EAP7 standalone Servers -> EAP7 -> Subsystems -> Core -> logging -> Create Child -> File Handler ..
2) Set properties in Resource Create Wizard..

For options:
Append: True
Autoflush: True
File: standalone/logs/serverX.log

Relative to: java.home
Actual results: Success

Relative to: jboss.domain.servers.dir
Actual results: Error:
JBAS014749: Operation handler failed: java.lang.IllegalArgumentException: JBAS014847: Could not find a path called 'standalone/logs/serverX.log', rolled-back=true 

Relative to: jboss.home
Actual results: Error:
JBAS014749: Operation handler failed: java.lang.IllegalArgumentException: JBAS014847: Could not find a path called 'standalone/logs/serverX.log', rolled-back=true

Relative to: jboss.server.base.dir
Actual results: Success

Relative to: jboss.server.data.dir
Actual results: Success

Relative to: jboss.server.log.dir
Actual results: Success

Relative to: jboss.server.tmp.dir
Actual results: Error:
JBAS014749: Operation handler failed: java.lang.IllegalArgumentException: JBAS014847: Could not find a path called 'standalone/logs/serverX.log', rolled-back=true

Relative to: user.dir
Actual results: Success

Relative to: user.home
Actual results: Success

Expected results:
Error message should contain full path to file not just part of it, g.e.:
JBAS014749: Operation handler failed: java.lang.IllegalArgumentException: JBAS014847: Could not find a path called 'jboss.server.tmp.dir/standalone/logs/serverX.log', rolled-back=true
Or real path
Error message should contain full path to file not just part of it, g.e.:
JBAS014749: Operation handler failed: java.lang.IllegalArgumentException: JBAS014847: Could not find a path called '/tmp/jboss-epa6-tmp/standalone/logs/serverX.log', rolled-back=true

Additional info:

Comment 1 Michael Burman 2017-03-08 14:14:49 UTC
Josejulio, can you backport 89c130d329a7c2bac0c2bf5b771d6dc6e3e5df3d to jboss-as-7 plugin also?

Comment 2 Josejulio Martínez 2017-03-08 15:50:37 UTC
Sure, I'll do it.

Comment 3 Josejulio Martínez 2017-03-09 17:19:49 UTC
commit 06b488d6f72fd2c781a0520c40f254c3139a6361
Merge: 5c76d75 955f345
Author: Michael Burman <yak>
Date:   Thu Mar 9 16:20:49 2017 +0200

    Merge pull request #297 from josejulio/bugs/1326707
    
    Bug 1326707 - Cleaned relative-to option values

commit 955f3455f7ec64cd56ac752f3a423d748c15021d
Author: Josejulio Martínez <jmartine>
Date:   Wed Mar 8 10:57:01 2017 -0600

    Bug 1326707 - Cleaned relative-to option values

Comment 6 Vojta Prusa 2017-03-28 17:14:53 UTC
For each Relative Path resource was created successfully.