Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Temporarily prevents task-kill exceptions on Windows when it is passed a pid for a process that is already dead #2842

Merged
merged 1 commit into from
Nov 9, 2022

Conversation

AMoo-Miki
Copy link
Collaborator

OSD uses tree-kill [npm], a library that terminates a process and all of its children, for stopping processes started using Cluster. This library behaves differently on different platforms. If the pid it is asked to terminate is not running:

  • on darwin and linux, it silently returns without throwing and exception
  • on win32 in produces an exception

As a result, calling cluster.stop() on an already terminated cluster will throw and exception on Windows but will silently continue on other operating systems.

Ref: #2811

Signed-off-by: Miki amoo_miki@yahoo.com

Check List

  • All tests pass
    • yarn test:jest
    • yarn test:jest_integration
    • yarn test:ftr
  • New functionality includes testing.
  • New functionality has been documented.
  • Update CHANGELOG.md
  • Commits are signed per the DCO using --signoff

@AMoo-Miki AMoo-Miki requested a review from a team as a code owner November 9, 2022 07:25
…sed a `pid` for a process that is already dead

Ref: opensearch-project#2811

Signed-off-by: Miki <amoo_miki@yahoo.com>
@codecov-commenter
Copy link

Codecov Report

Merging #2842 (18649b7) into main (f12fa98) will decrease coverage by 0.00%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #2842      +/-   ##
==========================================
- Coverage   66.67%   66.67%   -0.01%     
==========================================
  Files        3219     3219              
  Lines       61445    61445              
  Branches     9417     9417              
==========================================
- Hits        40970    40966       -4     
- Misses      18229    18232       +3     
- Partials     2246     2247       +1     
Impacted Files Coverage Δ
...s/osd-optimizer/src/node/node_auto_tranpilation.ts 83.67% <0.00%> (-4.09%) ⬇️
packages/osd-optimizer/src/node/cache.ts 50.00% <0.00%> (-2.64%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@ananzh ananzh merged commit 4fd67de into opensearch-project:main Nov 9, 2022
opensearch-trigger-bot bot pushed a commit that referenced this pull request Nov 9, 2022
…sed a `pid` for a process that is already dead (#2842)

Ref: #2811

Signed-off-by: Miki <amoo_miki@yahoo.com>

Signed-off-by: Miki <amoo_miki@yahoo.com>
(cherry picked from commit 4fd67de)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md
opensearch-trigger-bot bot pushed a commit that referenced this pull request Nov 9, 2022
…sed a `pid` for a process that is already dead (#2842)

Ref: #2811

Signed-off-by: Miki <amoo_miki@yahoo.com>

Signed-off-by: Miki <amoo_miki@yahoo.com>
(cherry picked from commit 4fd67de)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md
ananzh pushed a commit that referenced this pull request Nov 9, 2022
…sed a `pid` for a process that is already dead (#2842) (#2845)

Ref: #2811

Signed-off-by: Miki <amoo_miki@yahoo.com>

Signed-off-by: Miki <amoo_miki@yahoo.com>
(cherry picked from commit 4fd67de)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
ananzh pushed a commit that referenced this pull request Nov 9, 2022
…sed a `pid` for a process that is already dead (#2842) (#2844)

Ref: #2811

Signed-off-by: Miki <amoo_miki@yahoo.com>

Signed-off-by: Miki <amoo_miki@yahoo.com>
(cherry picked from commit 4fd67de)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
opensearch-trigger-bot bot pushed a commit that referenced this pull request Nov 30, 2022
…sed a `pid` for a process that is already dead (#2842)

Ref: #2811

Signed-off-by: Miki <amoo_miki@yahoo.com>

Signed-off-by: Miki <amoo_miki@yahoo.com>
(cherry picked from commit 4fd67de)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md
opensearch-trigger-bot bot pushed a commit that referenced this pull request Nov 30, 2022
…sed a `pid` for a process that is already dead (#2842)

Ref: #2811

Signed-off-by: Miki <amoo_miki@yahoo.com>

Signed-off-by: Miki <amoo_miki@yahoo.com>
(cherry picked from commit 4fd67de)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md
ananzh pushed a commit that referenced this pull request Dec 1, 2022
…sed a `pid` for a process that is already dead (#2842) (#2969)

Ref: #2811

Signed-off-by: Miki <amoo_miki@yahoo.com>

Signed-off-by: Miki <amoo_miki@yahoo.com>
(cherry picked from commit 4fd67de)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
AMoo-Miki pushed a commit that referenced this pull request Dec 1, 2022
…sed a `pid` for a process that is already dead (#2842) (#2970)

Ref: #2811

Signed-off-by: Miki <amoo_miki@yahoo.com>

Signed-off-by: Miki <amoo_miki@yahoo.com>
(cherry picked from commit 4fd67de)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

# Conflicts:
#	CHANGELOG.md

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
AlexRuiz7 pushed a commit to wazuh/wazuh-dashboard that referenced this pull request Dec 14, 2022
…sed a `pid` for a process that is already dead (opensearch-project#2842)

Ref: opensearch-project#2811

Signed-off-by: Miki <amoo_miki@yahoo.com>

Signed-off-by: Miki <amoo_miki@yahoo.com>
AlexRuiz7 pushed a commit to wazuh/wazuh-dashboard that referenced this pull request Dec 14, 2022
…sed a `pid` for a process that is already dead (opensearch-project#2842)

Ref: opensearch-project#2811

Signed-off-by: Miki <amoo_miki@yahoo.com>

Signed-off-by: Miki <amoo_miki@yahoo.com>
sipopo pushed a commit to sipopo/OpenSearch-Dashboards that referenced this pull request Dec 16, 2022
…sed a `pid` for a process that is already dead (opensearch-project#2842)

Ref: opensearch-project#2811

Signed-off-by: Miki <amoo_miki@yahoo.com>

Signed-off-by: Miki <amoo_miki@yahoo.com>
Signed-off-by: Sergey Osipov <sipopo@yandex.ru>
Arpit-Bandejiya pushed a commit to Arpit-Bandejiya/OpenSearch-Dashboards that referenced this pull request Jan 13, 2023
…sed a `pid` for a process that is already dead (opensearch-project#2842)

Ref: opensearch-project#2811

Signed-off-by: Miki <amoo_miki@yahoo.com>

Signed-off-by: Miki <amoo_miki@yahoo.com>
Signed-off-by: Arpit Bandejiya <abandeji@amazon.com>
sikhote pushed a commit to sikhote/OpenSearch-Dashboards that referenced this pull request Apr 24, 2023
…sed a `pid` for a process that is already dead (opensearch-project#2842)

Ref: opensearch-project#2811

Signed-off-by: Miki <amoo_miki@yahoo.com>

Signed-off-by: Miki <amoo_miki@yahoo.com>
Signed-off-by: David Sinclair <david@sinclair.tech>
sikhote pushed a commit to sikhote/OpenSearch-Dashboards that referenced this pull request Apr 24, 2023
…sed a `pid` for a process that is already dead (opensearch-project#2842)

Ref: opensearch-project#2811

Signed-off-by: Miki <amoo_miki@yahoo.com>

Signed-off-by: Miki <amoo_miki@yahoo.com>
Signed-off-by: David Sinclair <david@sinclair.tech>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 1.3 backport 2.x v1.3.7 v2.4.0 'Issues and PRs related to version v2.4.0' windows
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants