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

Kill long running container when container is close #27957

Merged
merged 5 commits into from
Jul 7, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Packs/ApiModules/Scripts/NGINXApiModule/NGINXApiModule.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,11 +325,12 @@ def run_long_running(params: Dict = None, is_test: bool = False):
server.serve_forever()
except Exception as e:
error_message = str(e)
demisto.error(f'An error occurred: {error_message}. Exception: {traceback.format_exc()}')
demisto.updateModuleHealth(f'An error occurred: {error_message}')
if isinstance(e, ValueError) and "Try to write when connection closed" in error_message:
# This indicates that the XSOAR platform is unreachable, and there is no way to recover from this, so we need to exit.
sys.exit(1) # pylint: disable=E9001

demisto.error(f'An error occurred: {error_message}. Exception: {traceback.format_exc()}')
demisto.updateModuleHealth(f'An error occurred: {error_message}')
raise ValueError(error_message)

finally:
Expand Down
6 changes: 6 additions & 0 deletions Packs/EDL/ReleaseNotes/3_2_2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

#### Integrations

##### Generic Export Indicators Service

- Kill long running container when the connection to the server is lost.
2 changes: 1 addition & 1 deletion Packs/EDL/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Generic Export Indicators Service",
"description": "Use this pack to generate a list based on your Threat Intel Library, and export it to ANY other product in your network, such as your firewall, agent or SIEM. This pack is built for ongoing distribution of indicators from XSOAR to other products in the network, by creating an endpoint with a list of indicators that can be pulled by external vendors.",
"support": "xsoar",
"currentVersion": "3.2.1",
"currentVersion": "3.2.2",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down
6 changes: 6 additions & 0 deletions Packs/TAXIIServer/ReleaseNotes/2_0_39.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

#### Integrations

##### TAXII2 Server

- Kill long running container when the connection to the server is lost.
2 changes: 1 addition & 1 deletion Packs/TAXIIServer/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "TAXII Server",
"description": "This pack provides TAXII Services for system indicators (Outbound feed).",
"support": "xsoar",
"currentVersion": "2.0.38",
"currentVersion": "2.0.39",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand Down