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

Updated Secure Tunneling close logic for Secure Tunneling Component #427

Merged
merged 2 commits into from
Oct 3, 2023

Conversation

HarshGandhi-AWS
Copy link
Contributor

Motivation

  • Secure tunneling component was failing to clean up the threads opened for each new tunnel. To resolve the issue, we are closing Device Client with SIGTERM signal. This will make sure that on tunnel close signal, we will send process termination signal which will eventually close all threads and free up all memory to avoid memory leak.

Modifications

Change summary

  • Calling signal termination from tunnel close callback
  • Updated abort function to pass in exit code.

Revision diff summary

If there is more than one revision, please explain what has been changed since the last revision.

Testing

  • Tested locally by creating private component.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link
Contributor

@RogerZhongAWS RogerZhongAWS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question addressed offline, LGTM

@HarshGandhi-AWS HarshGandhi-AWS merged commit d0e773d into main Oct 3, 2023
83 checks passed
@HarshGandhi-AWS HarshGandhi-AWS deleted the testComponent branch October 3, 2023 17:08
HarshGandhi-AWS added a commit that referenced this pull request Dec 20, 2023
* Updated SDK commit to use the latest SDK code

* Addressed reviewers comments and updated unit tests to support the change

* Resolved indentation errors

* Resolved indentation errors

* Resolved indentation errors

* Resolved indentation errors

* Resolved indentation errors

* update device mqtt connection logic

* removing DC initialization code to create multiple lock files

* addressed reviewers comments to resolve test failures

* resolved unit test failure

* remove MemoryTrace unit test

* resolved Lint errors

* explicitly calling the code in SharedCrtManager to initialize allocator and api handle. This will resolve the Sensor pullish unit tests which manually creates and initializes allocator and eventloop.

* addressed lint errors

* addressed lint errors

* addressed reviewers comment and added the config serialization test back

* Update GTestMain.cpp to not cleanup resources after testing is completed

This change will be reverted later. Added this to investigate DD integ test failure

* Update e2e-tests-ubutu-x86 test to skip secure tunneling test

* Compile device client binaries as Release build type (#422)

* update sdk commit again

* Updated code to shutdown on tunnel close callback and updated zlib dependency version(#426)

* updated code to shutdown on tunnel close callback

* addressed lint errors
  
* addressed lint errors

* addressed lint errors

* updated zlib version

* updated zlib version

* updated comment

* Updated Secure Tunneling close logic for Secure Tunneling Component (#427)

* Updated tunnel shutdown logic for Secure Tunneling component

* removed extra log statement

* Added null check before closing connection (#429)

* fixed bug to read SIGTERM signal when sent form kernal (#430)

* Fix docker-build.sh (#423)

There is an additional level of indirection required for the script to be able to build the container.

Co-authored-by: Miguel Cano <[email protected]>

* Updated google-test lib version to v1.12.0 (#431)

* disabled jobs and secure tunneling if they are not compiled into binary (#436)

* Update Dockerfile OpenSSL version (#435)

* Update Dockerfile

* Update README.md

* Removed number of slash validation for MQTT topics (#438)

* conflict fix

* add http proxy support for secure tunneling

* cleanup http proxy changes

* fix format

* fix format

---------

Co-authored-by: marco morais <[email protected]>
Co-authored-by: RogerZhongAWS <[email protected]>
Co-authored-by: RogerZhongAWS <[email protected]>
Co-authored-by: Miguel Cano <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants