Best-practices

Beginner Guide: 5 Most Common OpenStack Basic How-Tos

July 10, 2017 | Aviv Lichtigstein
Beginner Guide: 5 Most Common OpenStack Basic How-Tos

 

At Loom Systems, we receive a continuous stream of questions about OpenStack and we take the extra step of categorizing them. That’s given us a wealth of information about both the common and not-so-common issues that pop up. Since our goal is to be helpful and give back to both the OpenStack community specifically and the IT industry at large, I’ve put together general answers to the 5 most common OpenStack questions we receive. If you have a follow-up question, feel free to share it in the comments section; and, of course, keep sending us your questions at support@loomsystems.com

 

1. How can I find out which version of OpenStack I have installed?

 

This is a frequent question we get that affects your entire OpenStack environment, so it’s important to get it right. Here’s a quick way to find out:

  • SSH to your OpenStack hosts
  • Run OpenStack --version

 

If you want to know which version you have installed of specific services, the approach is similar:

  • SSH to your OpenStack hosts
  • Nova-manage --version
  • Cinder-manage --version
  • Glance-manage --version

 

Add it to a post-it or an ongoing cheatsheet. It’ll come in handy again and again.


2. How do I start/stop OpenStack services manually through the command line?

 

This is another important one to add to your cheatsheet.

  • Sudo to your OpenStack hosts
  • List all your OpenStack services by running systemctl
  • Systemctl start/stop SERVICE_NAME

 

You can tab complete to finish service names in case you don’t remember the full names of each service. Auto complete is your friend. It could look like this:

  • Systemctl stop openstack-glance-api

3. How do I manually configure a firewall to permit OpenStack service traffic?

 

On deployments that have restrictive firewalls in place, you may need to configure a firewall manually to permit OpenStack service traffic. Here’s a working list of default ports that OpenStack services respond to:

 


4. How do I properly reboot a machine running DevStack?

 

I frequently hear this, “I couldn’t find ./rejoin-stack.sh. How can I just reboot the server and bring it all back up? I’ve gone through this a lot and here’s the answer. Because DevStack was not meant to either run a cloud or support restoring a running stack after a reboot, rejoin-stack.sh was removed. Instead, you will need to run stack.sh and create a new cloud. Remember to put the stuff you need (like your public key) into local.sh and they will be available for the next deployment. And remember that if you do need to run a cloud and were relying on DevStack, please investigate one of the main alternatives that are designed and tested for cloud operation.


4. How do I properly reboot a machine running DevStack?

 

A frequent issue with Cinder Volumes is failing to remove them. If you tried to do cinder delete $volume_id and got an “error_deleting” response, here’s what to do.

 

1. Get volume UUID by running the following command: [root@rdo-vm-2 devops]#cinder list

 

2. You can check the available status and try to reset the state of volume. If it shows “Error_deleting” or “Detaching”, you can reset the state of the volume with: [root@rdo-vm-2 devops]#cinder reset-state --state available $volume_uuid

 

3. If that also fails, log in to mysql db and use Cinder DB:mysql> use cinder

 

4. Following cinder mysql query sets the Cinder state to available:mysql>update volumes set attach_status='detached', status='available' where id ='$volume_uuid';

 

5. If the above workflow does not help, then the below mysql query should solve the issue and delete the volume: mysql>update volumes set deleted=1,status='deleted', deleted_at=now(), updated_at=now() where deleted=0 and id='$volume_uuid';


I hope that helps with some of the OpenStack issues you might be frequently facing. If not, send me an email at aviv@loomsystems.com. We’re big believers that OpenStack doesn’t have to be such a challenge, and I’d like to show you how.

Tags: Best-practices OpenStack

Subscribe now to get the latest DevOps & Digital Transformation news directly to your inbox.