You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Neil Joshi (Jira)" <ji...@apache.org> on 2022/08/19 18:43:00 UTC

[jira] [Updated] (HDDS-7153) User defined override of ozone shell hardcoded values for log files

     [ https://issues.apache.org/jira/browse/HDDS-7153?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Neil Joshi updated HDDS-7153:
-----------------------------
    Description: 
Currently the ozone shell, $ozone sh, command uses the hard-coded value for the shell logs, {*}ozone-shell.log{*}.  This Jira is to allow users to override the log name by letting them set user defined log file names through an appended environment variable.

 

The first time the ozone sh is run it creates a log file named ozone-shell.log in the $OZONE_LOG_DIR.  What is observed is that when switching the shell user, the new user cannot invoke the ozone sh command successfully.  Instead the user receives a trace of errors indicating the user does not have permission to access the ozone-shell.log file:

anotheruser _cannot access_ file set by user hadoop that initially invoked the ozone sh

 
{code:java}
[anotheruser@d8e5ed3fbc4a hadoop]$ ozone sh
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: /var/log/hadoop/ozone-shell.log (Permission denied)
    at java.base/java.io.FileOutputStream.open0(Native Method)
    at java.base/java.io.FileOutputStream.open(FileOutputStream.java:298)
    at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:237)
    at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:158)
    at org.apache.log4j.FileAppender.setFile(FileAppender.java:294)
 
{code}
 
{code:java}
$ ls -alt /var/log/hadoop/ozone-shell.log 
-rw-r--r-- 1 hadoop hadoop 0 Aug 19 18:37 /var/log/hadoop/ozone-shell.log{code}

  was:
Currently the ozone shell, $ozone sh, command uses the hard-coded value for the shell logs, {*}ozone-shell.log{*}.  This Jira is to allow users to override the log name by letting them set user defined log file names through an appended environment variable.

 

The first time the ozone sh is run it creates a log file named ozone-shell.log in the $OZONE_LOG_DIR.  What is observed is that when switching the shell user, the new user cannot invoke the ozone sh command successfully.  Instead the user receives a trace of errors indicating the user does not have permission to access the ozone-shell.log file:

 

 


> User defined override of ozone shell  hardcoded values for log files
> --------------------------------------------------------------------
>
>                 Key: HDDS-7153
>                 URL: https://issues.apache.org/jira/browse/HDDS-7153
>             Project: Apache Ozone
>          Issue Type: Bug
>            Reporter: Neil Joshi
>            Assignee: Neil Joshi
>            Priority: Major
>
> Currently the ozone shell, $ozone sh, command uses the hard-coded value for the shell logs, {*}ozone-shell.log{*}.  This Jira is to allow users to override the log name by letting them set user defined log file names through an appended environment variable.
>  
> The first time the ozone sh is run it creates a log file named ozone-shell.log in the $OZONE_LOG_DIR.  What is observed is that when switching the shell user, the new user cannot invoke the ozone sh command successfully.  Instead the user receives a trace of errors indicating the user does not have permission to access the ozone-shell.log file:
> anotheruser _cannot access_ file set by user hadoop that initially invoked the ozone sh
>  
> {code:java}
> [anotheruser@d8e5ed3fbc4a hadoop]$ ozone sh
> log4j:ERROR setFile(null,true) call failed.
> java.io.FileNotFoundException: /var/log/hadoop/ozone-shell.log (Permission denied)
>     at java.base/java.io.FileOutputStream.open0(Native Method)
>     at java.base/java.io.FileOutputStream.open(FileOutputStream.java:298)
>     at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:237)
>     at java.base/java.io.FileOutputStream.<init>(FileOutputStream.java:158)
>     at org.apache.log4j.FileAppender.setFile(FileAppender.java:294)
>  
> {code}
>  
> {code:java}
> $ ls -alt /var/log/hadoop/ozone-shell.log 
> -rw-r--r-- 1 hadoop hadoop 0 Aug 19 18:37 /var/log/hadoop/ozone-shell.log{code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org