Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#3676] Handle overall exceptions in a better way
Summary: We call sys.exit but that doesn't exit the program because of the bg threads still running. Instead let's call log_error_and_exit which does proper teardown Test Plan: Run regular case, run a scenario with post_install.sh missing (which earlier hung at the prompt) - we see the following output if post_install.sh is missing ``` 15:50 $ bin/yugabyted start Starting yugabyted... / Running system checks...yugabyted crashed. For troubleshooting, contact us on https://www.yugabyte.com/slack or check our FAQ at https://docs.yugabyte.com/latest/faq/ Traceback (most recent call last): File "bin/yugabyted", line 1024, in run args.func() File "bin/yugabyted", line 150, in start self.start_processes() File "bin/yugabyted", line 482, in start_processes self.post_install_yb() File "bin/yugabyted", line 659, in post_install_yb post_install_script_path, stdout=subprocess.PIPE, stderr=subprocess.PIPE) File "/usr/lib64/python2.7/subprocess.py", line 711, in __init__ errread, errwrite) File "/usr/lib64/python2.7/subprocess.py", line 1327, in _execute_child raise child_exception OSError: [Errno 2] No such file or directory For more information, check the logs in /tmp/ybd-test-708655a4-889c-4a93-a139-43b0fa334104/yugabyte-2.1.0.0/var/logs ``` Reviewers: wesley Reviewed By: wesley Subscribers: yugaware Differential Revision: https://phabricator.dev.yugabyte.com/D8003
- Loading branch information