gardener-attic / gardenctl

Command-line client for the Gardener.
Other
56 stars 42 forks source link

ssh aws node failure #502

Open tedteng opened 3 years ago

tedteng commented 3 years ago

Describe the bug

In Gardener hands-on session we met the issue

Warning:
Be aware that you are entering an untrusted environment!
Do not enter credentials or sensitive data within the ssh session that cluster owners should not have access to.
....
Downloaded id_rsa key
Check Public IP
(1/4) Fetching data from target shoot cluster
...
(2/4) Setting up bastion host security group
...exec configurations that could contain malicious code. Please only continue if you have verified it to be uncritical
2021/02/24 08:41:10 AWS CLI failed with
An error occurred (InvalidPermission.Duplicate) when calling the AuthorizeSecurityGroupIngress operation: the specified rule "peer: 10.82.134.65/32, TCP, from port: 22, to port: 22, ALLOW" already exists
exit status 254

the rule that already exists should be skipped but error return and break, then resource leakage To Reproduce Steps to reproduce the behavior:

  1. gardenctl get target
  2. gardenctl ssh node

Expected behavior 1) ssh node 2) or cleanup handling instead of exit status 254 cause the resource leakage

Screenshots If applicable, add screenshots to help explain your problem.

Gardenctl Version (please complete the following information):

Additional context Add any other context about the problem here.