You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add backplane subcommand to do health check of VPN and proxy connectivity
Fixing golang-lint issue
Refactor the HealthCheckCmd to move the logic in the Run to a separate func
Revert and keep proxyURL field only
Refactored code based on the review feedback
Added test cases
Added some more test cases to improve the coverage
Move the main logic to pkg and generate mock files via mockgen
Removed the default value of backplane configuration and added debug log
Add debug log for cloud console
Updated README.md with the healthcheck usage
Add utun as for checking VPN connectivity in MacOS
Copy file name to clipboardExpand all lines: README.md
+54-1
Original file line number
Diff line number
Diff line change
@@ -65,7 +65,7 @@ To setup the PS1(prompt) for bash/zsh, please follow [these instructions](https:
65
65
|`ocm backplane cloud console`| Launch the current logged in cluster's cloud provider console |
66
66
|`ocm backplane cloud credentials [flags]`| Retrieve a set of temporary cloud credentials for the cluster's cloud provider |
67
67
|`ocm backplane elevate <reason> -- <command>`| Elevate privileges to backplane-cluster-admin and add a reason to the api request, this reason will be stored for 20min for future usage |
68
-
|`ocm backplane monitoring <prometheus/alertmanager/thanos/grafana> [flags]`| Launch the specified monitoring UI (Deprecated following v4.11 for cluster monitoring stack)|
68
+
|`ocm backplane monitoring <prometheus/alertmanager/thanos/grafana> [flags]`| Launch the specified monitoring UI (Deprecated following v4.11 for cluster monitoring stack)|
69
69
|`ocm backplane script describe <script> [flags]`| Describe the given backplane script |
70
70
|`ocm backplane script list [flags]`| List available backplane scripts |
71
71
|`ocm backplane session [flags]`| Create a new session and log into the cluster |
@@ -81,6 +81,7 @@ To setup the PS1(prompt) for bash/zsh, please follow [these instructions](https:
81
81
|`ocm backplane testJob logs <job_name> [flags]`| Retrieve logs of the specified test job resource |
82
82
|`ocm backplane upgrade`| Upgrade backplane-cli to the latest version |
83
83
|`ocm backplane version`| Display the installed backplane-cli version |
84
+
|`ocm backplane healthcheck`| Check the VPN and Proxy connectivity on the host network when experiencing isssues accessing the backplane API|
84
85
85
86
## Login
86
87
@@ -325,6 +326,58 @@ No issue if only stdout is redirected.
Please enter a reason for elevation, it will be stored in current context for 20 minutes : <hereyoucanenteryourreason>
327
328
```
329
+
## Backplane healthcheck
330
+
The backplane health check can be used to verify VPN and proxy connectivity on the host network as a troubleshooting approach when experiencing issues accessing the backplane API.
331
+
332
+
### Pre-settings
333
+
The end-user needs to set the VPN and Proxy check-endpoints in the local backplane configuration first:
returnfmt.Errorf("cannot connect to backplane API URL, check if you need to use a proxy/VPN to access backplane: %v", connErr)
311
+
logger.Errorf("Cannot connect to backplane API URL, check if you need to use a proxy/VPN to access backplane: %v. To troubleshoot connectivity issues, please run the following command: ocm-backplane health-check", connErr)
312
+
returnfmt.Errorf("cannot connect to backplane API URL: %v", connErr)
311
313
}
312
314
313
-
// Otherwise, return the failure
314
-
returnfmt.Errorf("can't login to cluster: %v", err)
315
+
// Log suggestion to run connectivity health check if login fails
316
+
logger.Errorf("Login failed: %v. To troubleshoot connectivity issues, please run the following command: ocm-backplane health-check", err)
0 commit comments