Skip to content

Commit

Permalink
Kill long running container when container is close (demisto#27957)
Browse files Browse the repository at this point in the history
  • Loading branch information
ilaner authored and xsoar-bot committed Jul 26, 2023
1 parent 32e71e2 commit a7fa586
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 5 deletions.
5 changes: 3 additions & 2 deletions Packs/ApiModules/Scripts/NGINXApiModule/NGINXApiModule.py
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
@@ -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
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/ExportIndicators/ReleaseNotes/1_0_18.md
@@ -0,0 +1,6 @@

#### Integrations

##### Export Indicators Service (Deprecated)

- Kill long running container when the connection to the server is lost.
2 changes: 1 addition & 1 deletion Packs/ExportIndicators/pack_metadata.json
Expand Up @@ -3,7 +3,7 @@
"description": "Deprecated. Use Generic Export Indicators Service instead.",
"support": "xsoar",
"hidden": true,
"currentVersion": "1.0.17",
"currentVersion": "1.0.18",
"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
@@ -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
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

0 comments on commit a7fa586

Please sign in to comment.