ping:support ping a specified node and remove duplicate port printing #5132
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Community Contribution License
All community contributions in this pull request are licensed to the project maintainers
under the terms of the Apache 2 license.
By creating this pull request I represent that I have the right to license the
contributions to the project maintainers under the Apache 2 license.
Description
The output of the ping command repeatedly displays port information.
![image](https://private-user-images.githubusercontent.com/37854724/411855570-bac5c257-e189-466c-b04c-f1debfd1ee3e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1OTAwODMsIm5iZiI6MTczOTU4OTc4MywicGF0aCI6Ii8zNzg1NDcyNC80MTE4NTU1NzAtYmFjNWMyNTctZTE4OS00NjZjLWIwNGMtZjFkZWJmZDFlZTNlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDAzMjMwM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTFhYmVhY2RkM2U3NmVlMDc1M2FhZWEwMjM5NjRjZDBhYWYyN2I5MjVkYWVhNGU2OTYzNmU1YmYxMDg3OTk2YzImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.wrhFHCuL7xCqgRLaGnW0CtTHHIU-gs4PyqvJ4QUOAnU)
![image](https://private-user-images.githubusercontent.com/37854724/411856960-4fb36372-3c16-4e06-9bda-ff20c681caa8.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1OTAwODMsIm5iZiI6MTczOTU4OTc4MywicGF0aCI6Ii8zNzg1NDcyNC80MTE4NTY5NjAtNGZiMzYzNzItM2MxNi00ZTA2LTliZGEtZmYyMGM2ODFjYWE4LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDAzMjMwM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQ5YjlmZjI3YjY0NzQ5YmVkMjAzMGZkYmM3YzU5MjBiMTQwZGJjOGNlN2ZmMDA2OGIwMmJlYmRkYmUzODgyNzAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.IYVko3gXV7H0KADiWZbs0mNilcRtgdfV1wLPp4_3JgY)
You cannot ping a specific node. You can only view information about all nodes.
Motivation and Context
When there are a large number of node, it is difficult to view the ping result of an node.
How to test this PR?
mc ping myminio --node minio-1.minio-headless.kube-system.svc.cluster.local:8989
![image](https://private-user-images.githubusercontent.com/37854724/411856272-2fe7a69d-532c-4ebb-be15-43c761dbeb27.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1OTAwODMsIm5iZiI6MTczOTU4OTc4MywicGF0aCI6Ii8zNzg1NDcyNC80MTE4NTYyNzItMmZlN2E2OWQtNTMyYy00ZWJiLWJlMTUtNDNjNzYxZGJlYjI3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE1VDAzMjMwM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTZlMzhjMzU0MmE4Mzg0YjUzOTM1ZTg1Zjg4NTcxYmJmMGJhYzVlYmIwZjI0YzhjYTgwMzQ4ZGNkMWY0MGFhNzYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.THXTBzVIknKoqn-TY4CMKO9FN4nHSqpfE7crMLCDrxM)
Types of changes
Checklist:
commit-id
orPR #
here)