New blog entry on openstack.org/blog: OpenStack Pulls It Out Of The Bag

You can read my newest blog entry on the trials and tribulations of my experience of OpenStack at http://www.openstack.org/blog/2012/04/openstack-community-pulls-it-out-of-the-bag/

OpenStack is a true Open Source Cloud Platform, backed by many companies who have full-time staff writing code and fixing bugs.  It has a large community of intelligent minds powering OpenStack that you won’t find in any other community cloud ecosystem.  They’re the rock stars of cloud computing.

Screencast / Video of an Install of OpenStack Essex on Ubuntu 12.04 under VirtualBox

A 12 minute screencast showing an installation of OpenStack ‘Essex’ on Ubuntu 12.04 running on VirtualBox

OpenStack Essex Installation Screencast

OpenStack Essex Installation Screencast

Note that this screencast has no sound.

  1. Configure VirtualBox with the following
    Network Interfaces:
    eth0 (nat)
    eth1 host-only: 172.16.0.0/16
    eth2 host-only: 10.0.0.0/8
    Memory: 1536Mb
    Hard Disk: 20Gb
    System Processor (optional but recommended): Increase CPU from 1
  2. Install Ubuntu 12.04, specifying eth0 as your default interface
  3. Configure networking:
    eth1 is your public network set to be 172.16.0.0/16
    eth2 is your private VLAN
  4. Run an update on the machine, and reboot
  5. Install Git which allows you to pull down a script to perform the installation of OpenStack
  6. Grab the script using the following:
    git clone https://github.com/uksysadmin/OpenStackInstaller.git
  7. Ensure you’re running the ‘essex’ version of the script by running: git checkout essex
  8. Run the script with the following:
    ./OSinstall.sh -F 172.16.1.0/24 -f 10.1.0.0/16 -s 512 -t demo -v qemu
  9. Upload an image using the test supplied script:
    ./upload_ubuntu.sh -a admin -p openstack -t demo -C 172.16.0.1
  10. Log into the Dashboard: http://172.16.0.1/ with ‘demo/openstack’
  11. Create your access keys
  12. Edit the default security group (add in SSH access and ability to ping)
  13. Launch your instance
  14. Log into your new instance!

OpenStack Essex Keystone Changes – script showing use

The latest release of OpenStack Essex has changed the way Keystone is managed.  Rather than most of the work being done by nova-manage, this has moved to a ‘keystone’ client command (which can be found in the Ubuntu package, python-keystoneclient).

An example of its use can be seen here: https://github.com/uksysadmin/OpenStackInstaller/blob/essex/keystone-services.sh

OpenStack Cloud Computing Cookbook – Book Available for Pre-Order

I’m very pleased to announce that you can pre-order my book on OpenStack: OpenStack Cloud Computing Cookbook

http://www.packtpub.com/openstack-cloud-computing-cookbook/book

Understand, install and configure Nova, OpenStack’s Cloud Compute resource
Learn how to install Swift, how it operates—with practical recipes to troubleshooting and maintaining OpenStack’s Object Storage service
Configure Keystone, OpenStack’s Identity Service which underpins the authentication of all OpenStack services
Manage cloud computing images using the OpenStack Image Service, Glance
Learn how to create custom Windows and Linux images for use in your private cloud environment
Configure and install Horizon, the OpenStack Dashboard service for managing your cloud environment
Learn how to secure your private cloud and the instances running on them
Learn how to troubleshoot, monitor and deploy OpenStack environments beyond test environments and into real-world datacenters

Available around September 2012

CloudCamp Warrington, February 23rd hosted by @appsense #aws #openstack

I’ll be doing a short (well, I can get carried away but the plan is short) talk on what Autotrader.co.uk is doing in terms of cloud computing which includes efforts and plans around OpenStack and AWS.

You will find some great people at the informal event – from people who are actively involved in cloud technology, to those that are just starting their cloud journey.

If you’re in the North West of the UK and fancy coming along – it is being kindly hosted by the Warrington offices of AppSense Ltd.  The evening is turning out to be a great forum and the hope is that more events in the area will follow.  If you have an interest in the cloud bubble, please come along for a chat over some drinks and some food.

Full details here: http://cloudcamp.org/warrington

Updated OpenStackInstaller script for Precise and Essex installs

I’ve updated the OpenStackInstaller script which now gives you a Development (Trunk) OpenStack Essex installation on Ubuntu Precise (Currently Alpha 2) with the following

Nova Compute (and associated services)
Keystone
Glance

This set up allows you to use nova client tools to launch instances

Install Ubuntu Precise
apt-get update
apt-get dist-upgrade
reboot

(as root)

  1. git clone https://github.com/uksysadmin/OpenStackInstaller.git
  2. cd OpenStackInstaller
  3. git checkout essex
  4. ./OSinstall.sh

A lot of this wouldn’t be possible without the help of people in #openstack on freenode.org.
For an equally awesome installation from scripts for a Diablo release view these scripts: https://github.com/managedit/openstack-setup

OpenStack Auto Assign Floating IP Not Working in Diablo

Being able to spin up instances in OpenStack is one thing, but they’re not much use if you can’t connect to them using the public network you’ve assigned to it.

Unfortunately in Diablo, the flag –auto_assign_floating_ip=true causes instances to be stuck at pending, and the nova-network.log spews out the something like the following snippet:

(nova.rpc): TRACE:     raise exception.FloatingIpNotFoundForAddress(address=address)
(nova.rpc): TRACE: FloatingIpNotFoundForAddress: Floating ip not found for address
<nova.db.sqlalchemy.models.FloatingIp object at 0x2fc5d90>.

This is down to a bug introduced in Diablo, https://bugs.launchpad.net/nova/+bug/834633

The fix is simple though (tested on Ubuntu 11.10 running Python 2.7):

  1. wget https://review.openstack.org/cat/1328%2C3%2Cnova/network/manager.py%5E0 -O nova_network_manager.zip
  2. unzip nova_network_manager.zip
  3. mv /usr/lib/python2.7/dist-packages/nova/network/manager.py{,.orig}
  4. cp manager_new-305ad3be8272f0c69fa9caa8707994ee9233201f.py /usr/lib/python2.7/dist-packages/nova/network/manager.py
  5. restart nova-network
  6. restart nova-compute

 

Update 08/01/2012:  Alternatively you can use the oneiric-proposed repository that has the fix in for Diablo:

Add the following to /etc/apt/sources.list

 deb http://archive.ubuntu.com/ubuntu oneiric-proposed main restricted universe multiverse

Then run

apt-get update
apt-get -y dist-upgrade

Then reboot your host.

OpenStack Diablo, updates and work in progress!

It has been a while since I blogged, and in that time OpenStack has come on leaps and bounds with Diablo being the latest official release. This will change as I work pretty much full-time on testing OpenStack as an end-user (and day job as architect) based on Diablo. This will also help with some book projects that are in the pipe-line for which I’m very humbled and excited about. I’ll blog my experiences as I go along – after all, it’s the reason you’ve stumbled upon this corner of the internet in the first place to learn from my experiences in using OpenStack.
The project I’m working on will be based on Ubuntu running the latest release of OpenStack, Diablo (2011.3). I’ll be investigating Crowbar from Dell to see how remote bare-metal provisioning of OpenStack is coming along – a crucial element for this to be adopted in established enterprises where it is the norm to roll-out enterprise class software in this way. I’ll try to squeeze in JuJu too. Most importantly though is playing catch up on the raft of projects that are flowing through OpenStack from Keystone for authentication, Quantum (although probably more relevant to Essex as this develops) as well as playing catch up on where Swift, Glance and the Dashboard are.

OpenStack troubleshooting basics

If you’ve been running OpenStack from the developer trunk (as per my blog) you will occasionally come across some bugs. This is the nature of the beast for running bleeding edge code.
So how do you track down a solution for them?

Step 1. Check the logs

First place to look is in /var/log/nova where you will see the logs related to OpenStack.
Some bugs will be related to changes in the software, so maybe an extra config line is needed in /etc/nova/nova.conf.
For example you may have seen this in /var/log/nova/nova-network.log:

2011-03-15 17:33:35,732 CRITICAL nova [-] failed to create /usr/lib/pymodules/python2.6/cloud2.MainThread-18360
(nova): TRACE: Traceback (most recent call last):
(nova): TRACE:   File "/usr/bin/nova-network", line 48, in
(nova): TRACE:     service.serve()
(nova): TRACE:   File "/usr/lib/pymodules/python2.6/nova/service.py", line 284, in serve
(nova): TRACE:     x.start()
(nova): TRACE:   File "/usr/lib/pymodules/python2.6/nova/service.py", line 84, in start
(nova): TRACE:     self.manager.init_host()
(nova): TRACE:   File "/usr/lib/pymodules/python2.6/nova/network/manager.py", line 489, in init_host
(nova): TRACE:     super(VlanManager, self).init_host()
(nova): TRACE:   File "/usr/lib/pymodules/python2.6/nova/network/manager.py", line 125, in init_host
(nova): TRACE:     self.driver.init_host()
(nova): TRACE:   File "/usr/lib/pymodules/python2.6/nova/network/linux_net.py", line 394, in init_host
(nova): TRACE:     iptables_manager.apply()
(nova): TRACE:   File "/usr/lib/pymodules/python2.6/nova/utils.py", line 523, in inner
(nova): TRACE:     with lock:
(nova): TRACE:   File "/usr/lib/pymodules/python2.6/lockfile.py", line 223, in __enter__
(nova): TRACE:     self.acquire()
(nova): TRACE:   File "/usr/lib/pymodules/python2.6/lockfile.py", line 239, in acquire
(nova): TRACE:     raise LockFailed("failed to create %s" % self.unique_name)
(nova): TRACE: LockFailed: failed to create /usr/lib/pymodules/python2.6/cloud2.MainThread-18360
(nova): TRACE:

There was a change between releases that required the following lines present in /etc/nova/nova.conf to solve this:

--state_path=/var/lib/nova
--lock_path=/var/lock/nova

Step 2. Check https://bugs.launchpad.net/nova and https://bugs.launchpad.net/swift

A recent one I came across this morning was the following:

2011-03-17 08:49:19,160 ERROR nova.api [GXEJM3P1HVP7N53IGI5J admin myproject] Unexpected error raised: invalid literal for int() with base 16: 'ami-jqxvgtmd'
(nova.api): TRACE: Traceback (most recent call last):
(nova.api): TRACE:   File "/usr/lib/pymodules/python2.6/nova/api/ec2/__init__.py", line 318, in __call__
(nova.api): TRACE:     result = api_request.invoke(context)
(nova.api): TRACE:   File "/usr/lib/pymodules/python2.6/nova/api/ec2/apirequest.py", line 150, in invoke
(nova.api): TRACE:     result = method(context, **args)
(nova.api): TRACE:   File "/usr/lib/pymodules/python2.6/nova/api/ec2/cloud.py", line 906, in describe_images
(nova.api): TRACE:     images = self.image_service.detail(context)
(nova.api): TRACE:   File "/usr/lib/pymodules/python2.6/nova/image/s3.py", line 76, in detail
(nova.api): TRACE:     images = self.service.detail(context)
(nova.api): TRACE:   File "/usr/lib/pymodules/python2.6/nova/image/local.py", line 58, in detail
(nova.api): TRACE:     for image_id in self._ids():
(nova.api): TRACE:   File "/usr/lib/pymodules/python2.6/nova/image/local.py", line 50, in _ids
(nova.api): TRACE:     return [int(i, 16) for i in os.listdir(self._path)]
(nova.api): TRACE: ValueError: invalid literal for int() with base 16: 'ami-jqxvgtmd'
(nova.api): TRACE:

I found this related bug: https://bugs.launchpad.net/nova/+bug/735641 by searching the bug database for the error. In this case the solution is to remove my images from my objectstore and re-upload them due to changes in how the images are stored and retrieved.

Step 3. Always a good place to go is on IRC @ freenode.net

(http://webchat.freenode.net/) and join #openstack where the developers and contributors will answer your questions. Have patience though, they do have work to do.

Step 4. You can also ask questions on Launchpad: https://answers.launchpad.net/nova/+addquestion (and similar for swift).

I also find its handy to not be too vague – describe your set up instead of saying “I launch an instance and it’s stuck on “Scheduling, can you help?” doesn’t give anyone any details of why that could be the case. As you can imagine, this could be anything from user-error, hardware errors, software errors or misconfigured environments, etc. – all requiring many different ways to troubleshoot so help yourself by being more specific.

For more information check out the OpenStack Wiki on contributing to the project: http://wiki.openstack.org/HowToContribute and this information on support and troubleshooting from the docs: http://docs.openstack.org/openstack-compute/admin/content/ch08.html