gardener-attic / gardenctl

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

SSH Azure node failure #506

Open tedteng opened 3 years ago

tedteng commented 3 years ago

Describe the bug It happened daily troubleshooting from the end-user. User ssh access node 1 without issue, then in a new session not allow user access node 2 at the same time. 1) node 2 not able to access at the same time by User 2) exit status 1 sign break cleanup process, which means extra resources could be leakage.

To Reproduce

Nodes:
shoot--cpu-worker-0-z1-74476-4k6c2 (Running)
shoot--cpu-worker-0-z1-74476-9987n (Running)

gardenctl ssh shoot--cpu-worker-0-z1-74476-4k6c2
waiting node 1 login completed
gardenctl ssh shoot--cpu-worker-0-z1-74476-9987n (in new window)

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
Standard
Data fetched from target shoot cluster.

(2/4) Configuring Azure
Opened SSH Port.

Create public ip
5x.xxx.xxx.xx
Waiting 5 s until public ip is available.

Add public ip to nic

2021/03/09 09:20:11 az CLI failed with BadRequestError: Resource /subscriptions/x/resourceGroups/shoot--x36/providers/Microsoft.Network/networkInterfaces/shoot--x36-cpu-worker-0-z1-74476-4k6c2-nic/ipConfigurations/shoot--x36-cpu-worker-0-z1-74476-4k6c2-nic is referencing public IP address /subscriptions/x/resourceGroups/shoot--x36/providers/Microsoft.Network/publicIPAddresses/sshIP that is already allocated to resource /subscriptions/x/resourceGroups/shoot--x36/providers/Microsoft.Network/networkInterfaces/shoot--x36-cpu-worker-0-z1-74476-9987n-nic/ipConfigurations/shoot--x36-cpu-worker-0-z1-74476-9987n-nic.

exit status 1

Expected behavior A clear and concise description of what you expected to happen.

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.