[ 
https://issues.apache.org/jira/browse/HDFS-13501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16457150#comment-16457150
 ] 

Ajay Kumar commented on HDFS-13501:
-----------------------------------

[~aw] thanks for sharing the background. Even with the fact that "shell can't 
determine if daemon needs to be started in secure mode or not" stop daemon 
command should print an error message if pid is not found at expected location. 
This is not the problem in start command as we redirect error message to log 
file. 

IMO we can safely add a message when stop daemon is executed and pid file is 
not found. Let me know if you think this is not required, i will close this 
ticket.

{code}index bee14305230..39bb4b82680 100755
--- a/hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh
+++ b/hadoop-common-project/hadoop-common/src/main/bin/hadoop-functions.sh
@@ -2075,6 +2075,8 @@ function hadoop_stop_daemon
         hadoop_error "WARNING: pid has changed for ${cmd}, skip deleting pid 
file"
       fi
     fi
+  else
+     hadoop_error "ERROR: ${pidfile} not found."
   fi
 }{code}

> Secure Datanode stop/start from cli does not throw a valid error if 
> HDFS_DATANODE_SECURE_USER is not set
> --------------------------------------------------------------------------------------------------------
>
>                 Key: HDFS-13501
>                 URL: https://issues.apache.org/jira/browse/HDFS-13501
>             Project: Hadoop HDFS
>          Issue Type: Improvement
>            Reporter: Ajay Kumar
>            Assignee: Ajay Kumar
>            Priority: Major
>
> Secure Datanode start/stop from cli does not throw a valid error if 
> HADOOP_SECURE_DN_USER/HDFS_DATANODE_SECURE_USER is not set. If 
> HDFS_DATANODE_SECURE_USER and JSVC_HOME is not set start/stop is expected to 
> fail (when privilege ports are used) but it should show some valid message.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to