Repository: atlas
Updated Branches:
  refs/heads/branch-0.8 4ca33fcbf -> 29f7e3f5d


ATLAS-2971: Atlas fails to start if there is a empty pid file

Signed-off-by: Sarath Subramanian <ssubraman...@hortonworks.com>
(cherry picked from commit 945de013f5466ffcf71d16c6ec1772fdee83e2f6)


Project: http://git-wip-us.apache.org/repos/asf/atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/29f7e3f5
Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/29f7e3f5
Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/29f7e3f5

Branch: refs/heads/branch-0.8
Commit: 29f7e3f5d56e9502eafa7e75840161bc479b3e0a
Parents: 4ca33fc
Author: Sandeep Nemuri <snem...@hortonworks.com>
Authored: Fri Nov 16 14:16:03 2018 -0800
Committer: Sarath Subramanian <ssubraman...@hortonworks.com>
Committed: Fri Nov 16 14:16:33 2018 -0800

----------------------------------------------------------------------
 distro/src/bin/atlas_start.py | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/atlas/blob/29f7e3f5/distro/src/bin/atlas_start.py
----------------------------------------------------------------------
diff --git a/distro/src/bin/atlas_start.py b/distro/src/bin/atlas_start.py
index 5ea93fc..239e64d 100755
--- a/distro/src/bin/atlas_start.py
+++ b/distro/src/bin/atlas_start.py
@@ -101,13 +101,13 @@ def main():
        pf = file(atlas_pid_file, 'r')
        pid = pf.read().strip()
        pf.close()
-
-       if mc.exist_pid((int)(pid)):
-           if is_setup:
-               print "Cannot run setup when server is running."
-           mc.server_already_running(pid)
-       else:
-           mc.server_pid_not_running(pid)
+       if pid != "":
+           if mc.exist_pid((int)(pid)):
+               if is_setup:
+                   print "Cannot run setup when server is running."
+               mc.server_already_running(pid)
+           else:
+               mc.server_pid_not_running(pid)
 
     if is_hbase and mc.is_hbase_local(confdir):
         print "configured for local hbase."

Reply via email to