The purpose of this page is to describe the minimal steps required to get devstack working on a standard installation of the operating systems that were worked with.

Ubuntu-12.04.2-server-amd64 VM

Minimal install (VM)

Ubuntu and Devstack are pretty straightforward to get working. The primary issues I had with getting the provided exercises to run through without reporting a failure were the timeouts. I overrided the default timeouts by using the localrc file (shown below) and the exercises completed successfully. These changes would possibly not be necessary if I were not running within a VM.

Install Prerequisites

sudo apt-get install git

Get devstack

git clone git://github.com/openstack-dev/devstack.git
cd devstack/

Update localrc

localrc:

   1 DATABASE_PASSWORD=linaro
   2 RABBIT_PASSWORD=linaro
   3 SERVICE_TOKEN=linaro
   4 SERVICE_PASSWORD=linaro
   5 ADMIN_PASSWORD=linaro
   6 
   7 DEST=/opt/stack
   8 LOGFILE=stack.sh.log
   9 SCREEN_LOGDIR=$DEST/logs/screen
  10 VERBOSE=False
  11 
  12 BOOT_TIMEOUT=360
  13 ACTIVE_TIMEOUT=360 
  14 ASSOCIATE_TIMEOUT=360
  15 RUNNING_TIMEOUT=360
  16 VOLUME_TIMEOUT=360
  17 TERMINATE_TIMEOUT=360

Install devstack

cd devstack/
./stack.sh

Linaro 2013.04 on Arndale

Create a custom SD card

A pre-build image won't work because there is not enough free space). I used a 32GB SD card.

sudo linaro-media-create --mmc /dev/sdc --dev arndale --hwpack hwpack_linaro-*_armhf_supported.tar.gz --hwpack-force --binary linaro-*.tar.gz

Install Prerequisites

sudo apt-get install git

Get devstack

git clone git://github.com/openstack-dev/devstack.git
cd devstack/

Update localrc

localrc:

   1 DATABASE_PASSWORD=linaro
   2 RABBIT_PASSWORD=linaro
   3 SERVICE_TOKEN=linaro
   4 SERVICE_PASSWORD=linaro
   5 MYSQL_PASSWORD=linaro
   6 ADMIN_PASSWORD=linaro
   7 
   8 DEST=/opt/stack
   9 LOGFILE=stack.sh.log
  10 SCREEN_LOGDIR=$DEST/logs/screen
  11 VERBOSE=False
  12 
  13 BOOT_TIMEOUT=360
  14 ACTIVE_TIMEOUT=360
  15 ASSOCIATE_TIMEOUT=360
  16 RUNNING_TIMEOUT=360
  17 VOLUME_TIMEOUT=360
  18 
  19 TERMINATE_TIMEOUT=360

Modifications needed to devstack/functions

The following modifications need to be made to devstack/functions to properly recognize the Linaro distribution:

diff --git a/functions b/functions
index 02c2b3a..3092a6f 100644
--- a/functions
+++ b/functions
@@ -331,7 +331,7 @@ GetOSVersion() {
os_RELEASE=$(lsb_release -r -s)
os_UPDATE=""
os_PACKAGE="rpm"
- if [[ "Debian,Ubuntu,LinuxMint" =~ $os_VENDOR ]]; then
+ if [[ "Linaro,Debian,Ubuntu,LinuxMint" =~ $os_VENDOR ]]; then
os_PACKAGE="deb"
elif [[ "SUSE LINUX" =~ $os_VENDOR ]]; then
lsb_release -d -s | grep -q openSUSE
@@ -428,6 +428,9 @@ function GetDistro() {
if [[ "$os_VENDOR" =~ (Ubuntu) ]]; then
# 'Everyone' refers to Ubuntu releases by the code name adjective
DISTRO=$os_CODENAME
+ elif [[ "$os_VENDOR" =~ (Linaro) ]]; then
+ # 'Everyone' refers to Ubuntu releases by the code name adjective
+ DISTRO=$os_CODENAME
elif [[ "$os_VENDOR" =~ (Fedora) ]]; then
# For Fedora, just use 'f' and the release
DISTRO="f$os_RELEASE"

Current Issues

  • The ip_tables kernel module is not present in Linaro 13.04. I do not know if this is causing any failures, but it is generating errors in the nova logs... specifically an error trying to call 'iptables-restore'.

iptables v1.4.12: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.
  • libvirtd is unable to find an appropriate driver for the platform. I have tried installing additional qemu packages (apt-get install qemu qemu-system qemu-user) which appear to be lacking from the default image, but it still fails. I have not yet determined what libvirt is looking for.

libvir: QEMU Driver error : internal error Cannot find suitable emulator for armv7l
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/eventlet/hubs/hub.py", line 336, in fire_timers
    timer()
  File "/usr/lib/python2.7/dist-packages/eventlet/hubs/timer.py", line 56, in __call__
    cb(*args, **kw)
  File "/usr/lib/python2.7/dist-packages/eventlet/event.py", line 163, in _do_send
    waiter.switch(result)
  File "/usr/lib/python2.7/dist-packages/eventlet/greenthread.py", line 192, in main
    result = function(*args, **kwargs)
  File "/opt/stack/nova/nova/service.py", line 148, in run_server
    server.start()
  File "/opt/stack/nova/nova/service.py", line 430, in start
    self.manager.init_host()
  File "/opt/stack/nova/nova/compute/manager.py", line 636, in init_host
    self._report_driver_status(context)
  File "/opt/stack/nova/nova/compute/manager.py", line 3802, in _report_driver_status
    capabilities = self.driver.get_host_stats(refresh=True)
  File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 3440, in get_host_stats
    return self.host_state.get_host_stats(refresh=refresh)
  File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 364, in host_state
    self._host_state = HostState(self)
  File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 3729, in __init__
    self.update_status()
  File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 3754, in update_status
    data["hypervisor_version"] = self.driver.get_hypervisor_version()
  File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 2660, in get_hypervisor_version
    return method()
  File "/usr/lib/python2.7/dist-packages/eventlet/tpool.py", line 187, in doit
    result = proxy_call(self._autowrap, f, *args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/eventlet/tpool.py", line 147, in proxy_call
    rv = execute(f,*args,**kwargs)
  File "/usr/lib/python2.7/dist-packages/eventlet/tpool.py", line 76, in tworker
    rv = meth(*args,**kwargs)
  File "/usr/lib/python2.7/dist-packages/libvirt.py", line 3230, in getVersion
    if ret == -1: raise libvirtError ('virConnectGetVersion() failed', conn=self)
libvirtError: internal error Cannot find suitable emulator for armv7l
2013-05-14 19:53:03.991 CRITICAL nova [-] internal error Cannot find suitable emulator for armv7l
2013-05-14 19:53:03.991 TRACE nova Traceback (most recent call last):
2013-05-14 19:53:03.991 TRACE nova   File "/opt/stack/nova/bin/nova-compute", line 22, in <module>
2013-05-14 19:53:03.991 TRACE nova     compute.main()
2013-05-14 19:53:03.991 TRACE nova   File "/opt/stack/nova/nova/cmd/compute.py", line 65, in main
2013-05-14 19:53:03.991 TRACE nova     service.wait()
2013-05-14 19:53:03.991 TRACE nova   File "/opt/stack/nova/nova/service.py", line 690, in wait
2013-05-14 19:53:03.991 TRACE nova     _launcher.wait()
2013-05-14 19:53:03.991 TRACE nova   File "/opt/stack/nova/nova/service.py", line 210, in wait
2013-05-14 19:53:03.991 TRACE nova     super(ServiceLauncher, self).wait()
2013-05-14 19:53:03.991 TRACE nova   File "/opt/stack/nova/nova/service.py", line 180, in wait
2013-05-14 19:53:03.991 TRACE nova     service.wait()
2013-05-14 19:53:03.991 TRACE nova   File "/usr/lib/python2.7/dist-packages/eventlet/greenthread.py", line 166, in wait
2013-05-14 19:53:03.991 TRACE nova     return self._exit_event.wait()
2013-05-14 19:53:03.991 TRACE nova   File "/usr/lib/python2.7/dist-packages/eventlet/event.py", line 116, in wait
2013-05-14 19:53:03.991 TRACE nova     return hubs.get_hub().switch()
2013-05-14 19:53:03.991 TRACE nova   File "/usr/lib/python2.7/dist-packages/eventlet/hubs/hub.py", line 177, in switch
2013-05-14 19:53:03.991 TRACE nova     return self.greenlet.switch()
2013-05-14 19:53:03.991 TRACE nova   File "/usr/lib/python2.7/dist-packages/eventlet/greenthread.py", line 192, in main
2013-05-14 19:53:03.991 TRACE nova     result = function(*args, **kwargs)
2013-05-14 19:53:03.991 TRACE nova   File "/opt/stack/nova/nova/service.py", line 148, in run_server
2013-05-14 19:53:03.991 TRACE nova     server.start()
2013-05-14 19:53:03.991 TRACE nova   File "/opt/stack/nova/nova/service.py", line 430, in start
2013-05-14 19:53:03.991 TRACE nova     self.manager.init_host()
2013-05-14 19:53:03.991 TRACE nova   File "/opt/stack/nova/nova/compute/manager.py", line 636, in init_host
2013-05-14 19:53:03.991 TRACE nova     self._report_driver_status(context)
2013-05-14 19:53:03.991 TRACE nova   File "/opt/stack/nova/nova/compute/manager.py", line 3802, in _report_driver_status
2013-05-14 19:53:03.991 TRACE nova     capabilities = self.driver.get_host_stats(refresh=True)
2013-05-14 19:53:03.991 TRACE nova   File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 3440, in get_host_stats
2013-05-14 19:53:03.991 TRACE nova     return self.host_state.get_host_stats(refresh=refresh)
2013-05-14 19:53:03.991 TRACE nova   File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 364, in host_state
2013-05-14 19:53:03.991 TRACE nova     self._host_state = HostState(self)
2013-05-14 19:53:03.991 TRACE nova   File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 3729, in __init__
2013-05-14 19:53:03.991 TRACE nova     self.update_status()
2013-05-14 19:53:03.991 TRACE nova   File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 3754, in update_status
2013-05-14 19:53:03.991 TRACE nova     data["hypervisor_version"] = self.driver.get_hypervisor_version()
2013-05-14 19:53:03.991 TRACE nova   File "/opt/stack/nova/nova/virt/libvirt/driver.py", line 2660, in get_hypervisor_version
2013-05-14 19:53:03.991 TRACE nova     return method()
2013-05-14 19:53:03.991 TRACE nova   File "/usr/lib/python2.7/dist-packages/eventlet/tpool.py", line 187, in doit
2013-05-14 19:53:03.991 TRACE nova     result = proxy_call(self._autowrap, f, *args, **kwargs)
2013-05-14 19:53:03.991 TRACE nova   File "/usr/lib/python2.7/dist-packages/eventlet/tpool.py", line 147, in proxy_call
2013-05-14 19:53:03.991 TRACE nova     rv = execute(f,*args,**kwargs)
2013-05-14 19:53:03.991 TRACE nova   File "/usr/lib/python2.7/dist-packages/eventlet/tpool.py", line 76, in tworker
2013-05-14 19:53:03.991 TRACE nova     rv = meth(*args,**kwargs)
2013-05-14 19:53:03.991 TRACE nova   File "/usr/lib/python2.7/dist-packages/libvirt.py", line 3230, in getVersion
2013-05-14 19:53:03.991 TRACE nova     if ret == -1: raise libvirtError ('virConnectGetVersion() failed', conn=self)
2013-05-14 19:53:03.991 TRACE nova libvirtError: internal error Cannot find suitable emulator for armv7l

ChrUbuntu-13.04 on ChromeBook Series 3

The functionality of Devstack was not verified because I stopped working on the ChromeBook when my Arndale board arrived.

Install ChrUbuntu

I followed the instructions on this page: http://www.whatthetech.info/installing-ubuntu-13-04-samsung-chromebook/

Install Prerequisites

sudo apt-get install git

Get devstack

git clone git://github.com/openstack-dev/devstack.git
cd devstack/

Update localrc

localrc:

   1 DATABASE_PASSWORD=linaro
   2 RABBIT_PASSWORD=linaro
   3 SERVICE_TOKEN=linaro
   4 SERVICE_PASSWORD=linaro
   5 ADMIN_PASSWORD=linaro
   6 
   7 DEST=/opt/stack
   8 LOGFILE=stack.sh.log
   9 SCREEN_LOGDIR=$DEST/logs/screen
  10 VERBOSE=False
  11 
  12 BOOT_TIMEOUT=360
  13 ACTIVE_TIMEOUT=360
  14 ASSOCIATE_TIMEOUT=360
  15 RUNNING_TIMEOUT=360
  16 VOLUME_TIMEOUT=360
  17 TERMINATE_TIMEOUT=360
  18 
  19 IMAGE_URLS=https://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-arm-uec.tar.gz
  20 DEFAULT_IMAGE_NAME=cirros-0.3.0-arm-uec

Install devstack

cd devstack/
./stack.sh

Fedora-18-x86_64 VM

Fedora is a bit trickier.... devstack currently has some problems working "out of the box" on Fedora 18.

The most important thing to do is: sudo yum update first!!! to make sure all packages are updated to the latest versions.

Install Prerequisites

sudo yum install git

Additional prerequisites not installed by stack.sh:

sudo yum install nodejs npm python-psycopg

Get devstack

git clone git://github.com/openstack-dev/devstack.gi

Update localrc

localrc:

   1 DATABASE_PASSWORD=linaro
   2 RABBIT_PASSWORD=linaro
   3 SERVICE_TOKEN=linaro
   4 SERVICE_PASSWORD=linaro
   5 ADMIN_PASSWORD=linaro
   6 
   7 DEST=/opt/stack
   8 LOGFILE=stack.sh.log
   9 SCREEN_LOGDIR=$DEST/logs/screen
  10 VERBOSE=False
  11 
  12 BOOT_TIMEOUT=360
  13 ACTIVE_TIMEOUT=360
  14 ASSOCIATE_TIMEOUT=360
  15 RUNNING_TIMEOUT=360
  16 VOLUME_TIMEOUT=360
  17 TERMINATE_TIMEOUT=360
  18 
  19 disable_service rabbit
  20 enable_service qpid
  21 disable_service tempest
  22 disable_service mysql
  23 enable_service postgresql

SELinux Configuration

SELinux interferes with many things... not sure if a production installation of Openstack performs all the correct SELinux configuration to work correctly, but devstack does not. So, it's just easier to change SELinux to 'permissive'.

setenforce 0

Change SELinux enforcement to permissive:

/etc/selinux/config:

   1 # This file controls the state of SELinux on the system.
   2 # SELINUX= can take one of these three values:
   3 #     enforcing - SELinux security policy is enforced.
   4 #     permissive - SELinux prints warnings instead of enforcing.
   5 #     disabled - No SELinux policy is loaded.
   6 SELINUX=permissive
   7 # SELINUXTYPE= can take one of these two values:
   8 #     targeted - Targeted processes are protected,
   9 #     minimum - Modification of targeted policy. Only selected processes are protected.
  10 #     mls - Multi Level Security protection.
  11 SELINUXTYPE=targeted

Install devstack

cd devstack/
./stack.sh

Update apache virtual host configuration

Launchpad bug

Update horizon.conf to add Require all granted. By default Fedora 18 specifies a global Require all denied -- a change from previous versions from what I've seen.

/etc/httpd/conf.d/horizon.conf:

   1   <Directory /opt/stack/horizon/>
   2     Options Indexes FollowSymLinks MultiViews
   3     AllowOverride None
   4     Order allow,deny
   5     allow from all
   6     Require all granted
   7   </Directory>

After updating the configuration file, restart Apache:

sudo /bin/systemctl restart httpd.service

DevstackOnX86AndARM-Archive (last modified 2014-02-12 20:08:42)