RDO on CentOS 7

With CentOS 7 now available, I quickly put it on my OpenStack demo laptop, and started installing RDO. It mostly just worked, but there were a few roadblocks to circumvent.

As usual, I followed the RDO Quickstart, so I won't duplicate those steps here, in detail, but it goes like:

sudo yum update -y && sudo yum install -y http://rdo.fedorapeople.org/rdo-release.rpm && sudo yum install -y openstack-packstack && packstack --allinone

Comparison of string with 7 failed

The first problem occurs pretty quickly, in prescript.pp, with the following error message:

Comparison of String with 7 failed

This is due to the change in CentOS versioning scheme - the latest release of CentOS is version 7.0.1406, which is not a number. The script in question assumes that the version number is a number, and does a numerical comparison:

if $::operatingsystem in $el_releases and $::operatingsystemrelease 7 { ...

This fails, because $::operatingsystemrelease is a string, not a number.

The solution here is to edit the file /usr/lib/python2.7/site-packages/packstack/puppet/templates/prescript.pp and replace the variable $::operatingsystemrelease with $::operatingsystemmajrelease around line 15.

While you're at it, do this for every file in that directory, where $operatingsystemrelease is compared to 7.

See https://bugzilla.redhat.com/show_bug.cgi?id=1117035 for more detail, and to track when this is fixed.

mysql vs mariadb

The second problem, I'm not sure I understand just yet. The symptom is that mysql.pp fails with

Error: Could not enable mysqld:

To skip to the end of the story, this appears to be related to the switch from mysql to mariadb about a year ago, finally catching up with CentOS. The related bug is at https://bugzilla.redhat.com/show_bug.cgi?id=981116

The workaround that I used was:

# rm /usr/lib/systemd/system/mysqld.service 
# cp /usr/lib/systemd/system/mariadb.service /usr/lib/systemd/system/mysqld.service
# systemctl stop mariadb
# pkill mysql
# rm -f /var/lib/mysql/mysql.sock

Then run packstack again with the generated answer file from the last time.

However, elsewhere in the thread, we were assured that this shouldn't be necessary, so YMMV. See https://www.redhat.com/archives/rdo-list/2014-July/msg00055.html for further discussion.

That's all, folks

After those two workarounds, packstack completed successfully, and I have a working allinone install.

Hope this was helpful to someone.

UPDATE: The next time through, I encountered https://ask.openstack.org/en/question/35705/attempt-of-rdo-aio-install-icehouse-on-centos-7/

The workaround is to replace contents of /etc/redhat-release with "Fedora release 20 (Heisenbug)" and rerun packstack.


2 Responses to RDO on CentOS 7

  1. 104847 OpenStack Community Weekly Newsletter (July 4 – 11) » The OpenStack Blog 2014-07-11 18:21:23

    …, US
    Sep 19, 2014 – Bussum, The Netherlands
    Nov 03 – 07, 2014 – Paris, France Other News RDO on CentOS 7

    OpenStack Project Meeting: and . Got Answers?
    is the go-to destination for OpenStack users. Int…

  2. 104849 John Haller 2014-07-12 21:17:34

    What happened is that mysql_install.pp needs the check for 7 changed operatingsystemrelease to operatingsystemmajrelease and Centos to CentOS as well (line 2). Next problem is in /usr/share/openstack-puppet/modules/mysql/manifests/params.pp, where the following changes are neeeded, from:
    'RedHat': {
    if $::operatingsystemrelease >= 7 {
    to
    'RedHat','CentOS': {
    if $::operatingsystemmajrelease >= 7 {

    Then, mysql installed.

Leave a Reply





About

Some people are heroes. And some people jot down notes. Sometimes, they're the same person. (The Truth. Terry Pratchett)