Created
June 15, 2015 12:18
-
-
Save vkmc/d85762792fb11fa710f0 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| Debugging OpenStack components on DevStack | |
| ========================================== | |
| By default, DevStack [0] uses GNU Screen [1] to display all the execution traces of the different components in the deployment. | |
| Learning how to use the screen is crucial for the development process given that you will be able to have a better | |
| understanding of what is going on under the hood. | |
| This gist aims to be a cheatsheet for all the people getting started with OpenStack development using DevStack. | |
| Connect to the screen session | |
| ----------------------------- | |
| screen -x stack | |
| Navigate the log screens | |
| ------------------------ | |
| - Get a full list of all the services | |
| ctrl+a then " | |
| This command will output a list of all the services running with the format "num name", being num the screen number | |
| and name the name of the service. | |
| e.g. 20 c-vol 21 h-eng 22 h-api 23 h-api-cfn 24 h-api-cw 25 tr-api 26 tr-tmgr 27 tr-cond (full list ommited) | |
| c stands for Cinder, h for Heat, tr for Trove, etc. | |
| - Go directly to a specific screen window | |
| ctrl+a then ' | |
| Then enter a number (like 25) or name (like tr-api) | |
| - Go to the next screen | |
| ctrl+a n | |
| - Go to the previous screen | |
| ctrl+a p | |
| Take control of the screen | |
| -------------------------- | |
| ctrl+a esc | |
| This will allow you to use the keyboard arrows to inspect the logs, to stop the process (ctrl+c) or | |
| to rerun a process (running the last command). Once you have control of that screen, you can do whatever you want | |
| as it was a regular terminal. | |
| Detach from the screen | |
| ---------------------- | |
| ctrl+a d | |
| Finish the screen session. | |
| Notes | |
| ----- | |
| - You cannot perform any action with your mouse. Not even the scroll. It's a CLI after all. | |
| - Different components in OpenStack are built from different running services. Hence you will see various | |
| services for the same component. You will need to dig more into the OpenStack component architecture to get | |
| a better understanding of what is this about. E.g. Trove has tr-api, tr-cond, tr-tmgr, this is, API, Conductor | |
| and Task Manager. | |
| [0] http://docs.openstack.org/developer/devstack/ | |
| [1] http://www.gnu.org/software/screen/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment