thinker0 commented on a change in pull request #3650:
URL: https://github.com/apache/incubator-heron/pull/3650#discussion_r541850288
##########
File path: heron/shell/src/python/handlers/killexecutorhandler.py
##########
@@ -44,13 +44,20 @@ def kill_parent():
logger.info("Killing parent executor")
os.killpg(os.getppid(), signal.SIGTERM)
+ def is_local():
+ remote_ip = self.request.remote_ip
+ if 'localhost' == remote_ip or '127.0.0.1' == remote_ip or '::1' ==
remote_ip:
+ return True
+ else:
+ return False
+
logger = logging.getLogger(__file__)
logger.info("Received 'Killing process' request")
data = dict(parse_qsl(self.request.body))
# check shared secret
sharedSecret = data.get('secret')
- if sharedSecret != options.secret:
+ if not is_local() and sharedSecret != options.secret:
Review comment:
# Aurora proceeds in the following order.
https://aurora-scheduler.readthedocs.io/en/latest/reference/task-lifecycle/
```
1. POST localhost/quitquitquit
sleep 10
2. POST localhost/aboutabout
sleep 10
3. SIGTERM pid
sleep 10
4. SIGKILL pid
```
admin port 31000 to 32000, Random port,
# current 403
1. Currently 403 and the next SIGTERM, SIGKILL proceeded.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]