It took more than a couple of attempts to get a running devstack instance on Fedora-18. I was following danpb’s notes. Here are a few tweaks I had to do get it working:
That’s the localrc file I had, before proceeding ahead:
$ cat localrc DESTDIR=$HOME/src/openstack DATA_DIR=$DESTDIR/data LOGFILE=$DATA_DIR/logs/stack.log SCREEN_LOGDIR=$DATA_DIR/logs # Switch to use QPid instead of RabbitMQ disable_service rabbit enable_service qpid # Replace with your primary interface name HOST_IP_IFACE=eth0 PUBLIC_INTERFACE=eth0 VLAN_INTERFACE=eth0 FLAT_INTERFACE=eth0 # Replace with whatever password you wish to use MYSQL_PASSWORD=testpwd SERVICE_TOKEN=testpwd SERVICE_PASSWORD=testpwd ADMIN_PASSWORD=testpwd # Pre-populate glance with a minimal image and a Fedora 17 image IMAGE_URLS="http://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-uec.tar.gz,http://berrange.fedorapeople.org/images/2012-11-15/f17-x86_64-openstack-sda.qcow2" $
After running stack.sh, you might see some failures — like tgtd service failing to start. The below is what I had in my tgtd.conf and stack.conf.
==== # rpm -q scsi-target-utils scsi-target-utils-1.0.32-2.fc18.x86_64 ==== $ cat /etc/tgt/tgtd.conf # The default config file include /etc/tgt/targets.conf # Config files from other packages etc. #include /etc/tgt/conf.d/*.conf # Explicitly import the stack.conf file include /etc/tgt/conf.d/stack.conf ==== $ cat /etc/tgt/conf.d/stack.conf include /home/tuser1/src/openstack/data/cinder/volumes/* $ ====
And restart tgtd service:
$ systemctl restart tgtd.service $ systemctl status tgtd.service tgtd.service - tgtd iSCSI target daemon Loaded: loaded (/usr/lib/systemd/system/tgtd.service; disabled) Active: active (running) since Wed 2013-02-27 06:28:13 EST; 5s ago Process: 26826 ExecStop=/usr/sbin/tgtadm --op delete --mode system (code=exited, status=0/SUCCESS) Process: 26822 ExecStop=/usr/sbin/tgt-admin --update ALL -c /dev/null (code=exited, status=0/SUCCESS) Process: 26820 ExecStop=/usr/sbin/tgtadm --op update --mode sys --name State -v offline (code=exited, status=0/SUCCESS) Process: 26888 ExecStartPost=/usr/sbin/tgtadm --op update --mode sys --name State -v ready (code=exited, status=0/SUCCESS) Process: 26882 ExecStartPost=/usr/sbin/tgt-admin -e -c $TGTD_CONFIG (code=exited, status=0/SUCCESS) Process: 26880 ExecStartPost=/usr/sbin/tgtadm --op update --mode sys --name State -v offline (code=exited, status=0/SUCCESS) Main PID: 26879 (tgtd) CGroup: name=systemd:/system/tgtd.service └─26879 /usr/sbin/tgtd -f Feb 27 06:28:12 devstack-fedenglabfoobarcom tgtd[26879]: librdmacm: Warning: couldn't read ABI version. Feb 27 06:28:12 devstack-fedenglabfoobarcom tgtd[26879]: librdmacm: Warning: assuming: 4 Feb 27 06:28:12 devstack-fedenglabfoobarcom tgtd[26879]: librdmacm: Fatal: unable to get RDMA device list Feb 27 06:28:12 devstack-fedenglabfoobarcom tgtd[26879]: tgtd: iser_ib_init(3376) Failed to initialize RDMA; load kernel modules? Feb 27 06:28:12 devstack-fedenglabfoobarcom tgtd[26879]: tgtd: work_timer_start(146) use timer_fd based scheduler Feb 27 06:28:12 devstack-fedenglabfoobarcom tgtd[26879]: tgtd: bs_init(313) use signalfd notification Feb 27 06:28:13 devstack-fedenglabfoobarcom systemd[1]: Started tgtd iSCSI target daemon.
Source the openrc file which will do few things: configure keystone authentication credentials, set up nova’s compute api version, etc:
$ . openrc $
Let’s list images in Glance:
$ glance image-list +--------------------------------------+---------------------------------+-------------+------------------+-----------+--------+ | ID | Name | Disk Format | Container Format | Size | Status | +--------------------------------------+---------------------------------+-------------+------------------+-----------+--------+ | fa1adc47-1ff3-4394-99b3-e782a27762b0 | cirros-0.3.0-x86_64-uec | ami | ami | 25165824 | active | | b6137e19-fe48-40a1-81d8-ccbbae6bfc2b | cirros-0.3.0-x86_64-uec-kernel | aki | aki | 4731440 | active | | 3780a3bd-e3ad-4323-908e-8f22789e44e1 | cirros-0.3.0-x86_64-uec-ramdisk | ari | ari | 2254249 | active | | 0c445018-f23c-4e5a-876b-912ea8f6c636 | f17-x86_64-openstack-sda | qcow2 | bare | 251985920 | active | +--------------------------------------+---------------------------------+-------------+------------------+-----------+--------+ $
Add a new key pair:
$ nova keypair-add oskey > oskey.priv $ ls accrc eucarc exercises extras.d functions lib localrc oskey.priv rejoin-stack.sh stackrc stack.sh tools AUTHORS exerciserc exercise.sh files HACKING.rst LICENSE openrc README.md samples stack-screenrc tests unstack.sh $
Boot a flavor:
$ nova boot --key-name oskey --image f17-x86_64-openstack-sda --flavor m1.tiny f17demo1 +-----------------------------+--------------------------------------+ | Property | Value | +-----------------------------+--------------------------------------+ | status | BUILD | | updated | 2013-02-27T11:58:58Z | | OS-EXT-STS:task_state | scheduling | | key_name | oskey | | image | f17-x86_64-openstack-sda | | hostId | | | OS-EXT-STS:vm_state | building | | flavor | m1.tiny | | id | 5eaf23b5-3558-4b07-8195-9d24734beced | | security_groups | [{u'name': u'default'}] | | user_id | f28638e924a645e1b69650b8acc99283 | | name | f17demo1 | | adminPass | e9LZqPFdBvjq | | tenant_id | 9b54eaecedb149de9d1d48c43210d463 | | created | 2013-02-27T11:58:58Z | | OS-DCF:diskConfig | MANUAL | | metadata | {} | | accessIPv4 | | | accessIPv6 | | | progress | 0 | | OS-EXT-STS:power_state | 0 | | OS-EXT-AZ:availability_zone | None | | config_drive | | +-----------------------------+--------------------------------------+ $
Now, list the running nova instances:
$ nova list +--------------------------------------+----------+--------+----------+ | ID | Name | Status | Networks | +--------------------------------------+----------+--------+----------+ | 5eaf23b5-3558-4b07-8195-9d24734beced | f17demo1 | ERROR | | +--------------------------------------+----------+--------+----------+ $
Oh, it says ERROR, let’s take a look at logs.
NOTE1: Log files to see: screen-n-cpu.log, screen-n-sch.log (located in $HOME/src/openstack/devstack/data/logs).
NOTE2: Use ‘less -r’ to view the above log files, so they’re presented in a readable format. Otherwise all control characters (ESC, Carriage return) are displayed in caret notataion, and it’s unpleasant to look at.
So, I missed to add executable bit to $HOME directory, let’s set it:
$ sudo chmod -R +x /home/tuser1/ $
Let’s delete the old instance, boot a flavor (in this case, a tiny one – 512 MB memory), & list the running nova instance, and ensure it’s ACTIVE:
#----------# $ nova delete 5eaf23b5-3558-4b07-8195-9d24734beced $ #----------# $ nova boot --key-name oskey --image f17-x86_64-openstack-sda --flavor m1.tiny f17demo1 #----------# $ nova list +--------------------------------------+----------+--------+------------------+ | ID | Name | Status | Networks | +--------------------------------------+----------+--------+------------------+ | 5710ba30-499e-4c2a-872c-327217e229c6 | f17demo1 | ACTIVE | private=10.0.0.3 | +--------------------------------------+----------+--------+------------------+ $ #----------#
List the running openstack services:
$ openstack-status == Support services == mysqld: active (disabled on boot) libvirtd: active qpidd: active $