Skip to content
This repository has been archived by the owner on Jul 25, 2022. It is now read-only.

fix nc hanging and cleanup #247

Merged
merged 1 commit into from
Aug 7, 2020

Conversation

tedteng
Copy link
Contributor

@tedteng tedteng commented Aug 4, 2020

What this PR does / why we need it:
fix nc command hanging
fix nc timeout
resource clean up after nc timeout

Which issue(s) this PR fixes:
Fixes #240

Special notes for your reviewer:
@danielfoehrKn , Please let me know whether this can fix the issue.
one more thing the Public IP maybe change and binding with the security group as the latest update, so I am assuming there not any previous bastion security group remaining in the AWS.

Release note:

1. fix nc command hanging and timeout. 2. cleaned resource up after nc command timeout.

@tedteng tedteng requested a review from a team as a code owner August 4, 2020 06:15
@gardener-robot-ci-1 gardener-robot-ci-1 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Aug 4, 2020
@gardener-robot-ci-3 gardener-robot-ci-3 added needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Aug 4, 2020
@tedteng
Copy link
Contributor Author

tedteng commented Aug 4, 2020

Tesing for timeout and cleanup

Downloaded id_rsa key
Check Public IP

(1/4) Fetching data from target shoot cluster
Data fetched from target shoot cluster.

(2/4) Setting up bastion host security group
Bastion host security group set up.
Opened SSH Port on Node.

(3/4) Creating bastion host
Bastion host instance i-065b451a853e9282b Initializing.

Bastion host instance running.
=>
=>
=>
=>
=>
=>
SSH Port Open on Bastion TimeOut
(4/4) Cleanup
Cleaning up bastion host configurations...

Starting cleanup

  (1/3) Cleaning up bastion host instance
TERMINATINGINSTANCES	i-065b451a853e9282b
CURRENTSTATE	32	shutting-down
PREVIOUSSTATE	16	running

  (2/3) Close SSH Port on Node.
  Closed SSH Port on Node.

  (3/3) Clean up bastion host security group


Bastion host configurations successfully cleaned up.

@tedteng
Copy link
Contributor Author

tedteng commented Aug 4, 2020

verify result

Downloaded id_rsa key
Check Public IP

(1/4) Fetching data from target shoot cluster
Data fetched from target shoot cluster.

(2/4) Setting up bastion host security group
Bastion host security group set up.
Opened SSH Port on Node.

(3/4) Creating bastion host
Bastion host instance i-05b9ee39ebb141e95 Initializing.

Bastion host instance running.
nc: connectx to 18.156.193.166 port 22 (tcp) failed: Connection refused

nc: connectx to 18.156.193.166 port 22 (tcp) failed: Connection refused

Connection to 18.156.193.166 port 22 [tcp/*] succeeded!

Opened SSH Port on Bastion
SSH gardener@18.156.193.166 => gardener@ip-10-250-8-212.eu-central-1.compute.internalWarning: Permanently added '18.156.193.166' (ED25519) to the list of known hosts.
  ____               _              _     _
 / ___| __ _ _ __ __| | ___ _ __   | |    _ _ __  _   ___  __
| |  _ / _` | '__/ _` |/ _ \ '_ \  | |   | | '_ \| | | \ \/ /
| |_| | (_| | | | (_| |  __/ | | | | |___| | | | | |_| |>  <
 \____|\__,_|_|  \__,_|\___|_| |_| |_____|_|_| |_|\__,_/_/\_\
Garden Linux 11 (based on Debian GNU/Linux 11)

@neo-liang-sap
Copy link
Contributor

lgtm
@gardener/gardenctl-maintainers any comments on this PR?

@tedteng
Copy link
Contributor Author

tedteng commented Aug 7, 2020

/review

@gardener-robot
Copy link

@tedteng Command "/review" failed with "Review cannot be requested from pull request author.".

Additional Information
Redacted in public. Check backend logs.

@gardener-robot gardener-robot added the needs/review Needs review label Aug 7, 2020
@neo-liang-sap
Copy link
Contributor

/lgtm

@gardener-robot gardener-robot added reviewed/lgtm Has approval for merging and removed needs/review Needs review labels Aug 7, 2020
@neo-liang-sap neo-liang-sap merged commit 14f9695 into gardener-attic:master Aug 7, 2020
@tedteng tedteng deleted the nc_hanging branch August 21, 2020 11:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) reviewed/lgtm Has approval for merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SSH unstable
6 participants