antctl Support Bundle Should Collect Logs from Crashed Agent and Controller Containers #3624
Labels
area/component/antctl
Issues or PRs releated to the command line interface component
area/ops
Issues or PRs related to features which support network operations and troubleshooting
good first issue
Good for newcomers
kind/bug
Categorizes issue or PR as related to a bug.
lifecycle/frozen
Indicates that an issue or PR should not be auto-closed due to staleness.
Milestone
Describe the bug
When antctl runs in remote mode, it needs to connect to remote agent or controller APIServer to get support bundle. If remote agent or controller fails, antctl writes the failed node name in support bundle. I'd like to suggest an improvement. If antctl fails to connect to agent/controller APIServer, it can alternatively get logs from K8s API. For example:
Another improvement is that support bundle function
controllerRemoteRunE
should rungetClusterInfo
even if there is failure in previous steps. This is to deal with a corner case (or maybe we can see it as a user error) that incompatible antctl is used to get agent and controller logs, then antctl may fail in creating clients for AntreaAgentInfo and AntreaControllerInfo, and it collects nothing. If in this case it can at least rungetClusterInfo
, we will be able to see the Antrea version from collected Pod manifests and get a clue.These improvements are minor, but they'll help to save some communication round-trips.
To Reproduce
Edit antrea-controller Deployment and change antrea-controller command to "false".
Expected
It's better to also request log stream from K8s API.
Actual behavior
antctl only reports an error.
Versions:
Please provide the following information:
The text was updated successfully, but these errors were encountered: