Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds event information when waiting for a pod (#2627)
**What type of PR is this?** /kind feature **What does does this PR do / why we need it**: This PR: - Adds more information when deploying via "WaitAndGetPod". We parse the current events which are happening and then look for event counts which have occured more than 5 times. We then output this information with the spinner in order to help the user determine what's taking so long to deploy - Collect event information that's outputted when it fails with a table. - Changes how we output errors Example outputs: ```sh ▶ odo push -f Validation ✓ Checking component [122ms] Configuration changes ✓ Initializing component ✓ Creating component [733ms] Pushing to component nodejs-nodejs-ex-dorv of type local ✗ Waiting for component to start [5s] ERROR: waited 5s but was unable to find a running pod matching selector: 'deploymentconfig=nodejs-nodejs-ex-dorv-app' ``` ```sh ~/openshift/nodejs-ex master ✗ 28d ⚑ ◒ ▶ odo push -f Validation ✓ Checking component [134ms] Configuration changes ✓ Initializing component ✓ Creating component [417ms] Pushing to component nodejs-nodejs-ex-dorv of type local ✗ Waiting for component to start [5s] [WARNING x5: FailedScheduling, use `-v` for more information.] ERROR: waited 5s but was unable to find a running pod matching selector: 'deploymentconfig=nodejs-nodejs-ex-dorv-app' For more information to help determine the cause of the error, re-run with '-v'. See below for a list of failed events that occured more than 5 times during deployment: +----------------------------------------------------+-------+------------------+-------------------------------------+ | NAME | COUNT | REASON | MESSAGE | +----------------------------------------------------+-------+------------------+-------------------------------------+ | nodejs-nodejs-ex-dorv-app-1-r46cg.15f66f7d73693e5c | 15 | FailedScheduling | persistentvolumeclaim | | | | | "nodejs-nodejs-ex-dorv-app-s2idata" | | | | | not found | | nodejs-nodejs-ex-dorv-app-1-vn8vd.15f66f8482ee88f6 | 5 | FailedScheduling | persistentvolumeclaim | | | | | "nodejs-nodejs-ex-dorv-app-s2idata" | | | | | not found | +----------------------------------------------------+-------+------------------+-------------------------------------+ ``` **Which issue(s) this PR fixes**: Fixes #2244 **How to test changes / Special notes to the reviewer**: Run a test application like so: ```sh git clone https://github.com/openshift/nodejs-ex odo create node js odo preference set PushTimeout watch -n 1 oc delete pvc --all odo push -f ```
- Loading branch information
Showing
5 changed files
with
261 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.