Ask Your Question

Revision history [back]

What Linux distribution versions does openstack support with heat?

I've set up an openstack host on RHEL 6. I want to run VMs of RHEL 5.

I can spin up instances without any problem, but using heat templates doesn't work. As soon as I add a user_data script:

resources:
  my_instance:
    type: OS::Nova::Server
    properties:
      user_data:
        str_replace:
          template: |
            #!/bin/bash -v

            echo 'hello'

My script does not end up running. /var/log/cloud-init-output.log shows:

  File "/var/lib/cloud/instance/scripts/loguserdata.py", line 39
    os.chmod(fh.baseFilename, 0o600)
                                  ^
SyntaxError: invalid syntax
/var/lib/cloud/instance/scripts/loguserdata.py failed; code 1
2014-09-16 10:19:47,655 - cc_scripts_user.py[WARNING]: failed to run-parts in /var/lib/cloud/instance/scripts
2014-09-16 10:19:47,879 - __init__.py[WARNING]: Traceback (most recent call last):
  File "/usr/lib/python2.6/site-packages/cloudinit/CloudConfig/__init__.py", line 118, in run_cc_modules
    cc.handle(name, run_args, freq=freq)
  File "/usr/lib/python2.6/site-packages/cloudinit/CloudConfig/__init__.py", line 79, in handle
    [name, self.cfg, self.cloud, cloudinit.log, args])
  File "/usr/lib/python2.6/site-packages/cloudinit/__init__.py", line 324, in sem_and_run
    func(*args)
  File "/usr/lib/python2.6/site-packages/cloudinit/CloudConfig/cc_scripts_user.py", line 31, in handle
    util.runparts(runparts_path)
  File "/usr/lib/python2.6/site-packages/cloudinit/util.py", line 222, in runparts
    raise RuntimeError('runparts: %i failures' % failed)
RuntimeError: runparts: 1 failures

2014-09-16 10:19:47,879 - __init__.py[ERROR]: config handling of scripts-user, None, [] failed

2014-09-16 10:19:48,332 - cloud-init-cfg[ERROR]: errors running cloud_config [final]: ['scripts-user']
errors running cloud_config [final]: ['scripts-user']

This looks like heat is trying to run loguserdata.py, but loguserdata.py contains syntax that requires Python 2.6 or later. RHEL 5 has Python 2.4 as its default Python version (and yum depends upon this).

Can I use heat on RHEL 5? Is there are list of supported distributions anywhere?