Bug 1081114

Summary: Missleading log message while having no permission to jon server directory
Product: [JBoss] JBoss Operations Network Reporter: Armine Hovsepyan <ahovsepy>
Component: Installer, Launch Scripts, UpgradeAssignee: Libor Zoubek <lzoubek>
Status: CLOSED CURRENTRELEASE QA Contact: Filip Brychta <fbrychta>
Severity: high Docs Contact:
Priority: unspecified    
Version: JON 3.2.1CC: fbrychta, jshaughn, loleary, lzoubek, mfoley, myarboro, spinder, theute
Target Milestone: CR01Keywords: Triaged
Target Release: JON 3.3.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-27 19:58:16 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:
Attachments:
Description Flags
permissions-error-message2
none
permissions-error-message none

Description Armine Hovsepyan 2014-03-26 15:53:29 UTC
Created attachment 879073 [details]
permissions-error-message2

Description of problem:
CP1 - missleading log message while having no permission to jon-server-3.2.0.GA

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

How reproducible:
always

Steps to Reproduce:
1. install jon 3.2.0 GA as "non-root" user (rhqctl install --start, wait for full installation, auto-inventory...)
2. stop jon 3.2.0 GA (rhqctl stop)
3. su
4. chown root:root jon-server-3.2.0.GA
5. chmod 700 jon-server-3.2.0.GA -Rf
7. su -"non-root"
8. apply CP1 on jon-server-3.2.0.GA (/jon-server-3.2.0.GA-update-01/apply-updates.sh  jon-server-3.2.0.GA)


Actual results:
log message tells  - We could not detect a valid (JON server) OR (JON agent) directory at [jon-server-3.2.0.GA]

Expected results:
log message hints that this may be cause of permissions

Additional info:
logs attached

in case of only one dir without permission - patch script logs message telling:
 
cp: cannot stat `jon-server-3.2.0.GA/jbossas/modules/system/layers/base/org/jboss/as/web/main/jbossweb-7.2.2.Final-redhat-2.jar': Permission denied
cp: cannot stat `jon-server-3.2.0.GA/jbossas/modules/system/layers/base/org/jboss/as/web/main/module.xml': Permission denied
cp: preserving permissions for `jon-server-3.2.0.GA/jbossas/modules/system/layers/base/org/jboss/as/web/main': Operation not permitted

Comment 1 Armine Hovsepyan 2014-03-26 15:53:50 UTC
Created attachment 879074 [details]
permissions-error-message

Comment 2 Larry O'Leary 2014-04-02 20:32:22 UTC
This is the same/similar issue to what was identified in bug 1081149.

If you start a process on a machine as userA and then stop it... start it as root... then stop it... then try to start it as userA, it will fail. This is because userA isn't root or doesn't have sufficient privileges.

However, we should probably take care of the error message here and explicitly check for permissions. I believe we can detect the file/directory exist and also check to see if we have read/write permission separately.

Comment 4 Jay Shaughnessy 2014-09-05 21:58:17 UTC
This is a CP issue, setting to 3.3.1 as no more 3.2.x releases are planned afaik.

Comment 5 Larry O'Leary 2015-01-13 23:21:05 UTC
*** Bug 1087368 has been marked as a duplicate of this bug. ***

Comment 6 Simeon Pinder 2015-01-19 20:52:48 UTC
Moving into CR01 target milestone as missed ER01 cutoff.

Comment 7 Libor Zoubek 2015-01-21 09:35:19 UTC
proposed patch 99d5564 pushed to JON internal repo to branch lzoubek/BZ1081114

Comment 8 Simeon Pinder 2015-02-13 22:35:58 UTC
Cherry-picked Comment7 and some additional commits. This is fixed with the following commits in order:
2a566a9f87
62a5b836de
31f568e782
9303d44e23
72cec907de
1a65ae0c94
f0070ca57d

Moving to MODIFIED for inclusion in next brew build.

Comment 9 Simeon Pinder 2015-02-16 04:49:30 UTC
Moving to ON_QA as available to test with latest CP build:
http://download.devel.redhat.com/brewroot/packages/org.jboss.on-jboss-on-parent/3.3.0.GA/16/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 CR01 build of jon-server-3.3.0.GA-update-01.zip.

Comment 10 Filip Brychta 2015-02-16 08:51:31 UTC
Verified on
Version :	
3.3.0.GA Update 01
Build Number :	
ab9ebbd:884011b