Installing Docker plugin for Heat breaks the h-eng

Bug #1438739 reported by Oguz Yarimtepe
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Heat
Invalid
Undecided
Unassigned
devstack
Invalid
Undecided
Unassigned
heat (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

I am using Juno for my devstack environment. After entering /opt/stack/heat/contrib/heat_docker and running pip install -r requirements.txt, i started to get error while running h-eng.

2015-03-31 15:35:07.545 10057 CRITICAL heat.engine [-] Could not load AWSTemplateFormatVersion.2010-09-09: (requests 2.6.0 (/usr/local/lib/python2.7/dist-packages), Requirement.parse('requests!=2.4.0,<=2.2.1,>=2.1.0'))
ERROR: No template format plugins registered

is the error at the screen where /opt/stack/heat/bin/heat-engine --config-file=/etc/heat/heat.conf runs.

It seems that there is a version conflict because,
cat requirements.txt | grep requests
requests>=2.1.0,!=2.4.0,<=2.2.1

is the output when i run the commant under /opt/stack/heat

This is what docker-py does with the pip command

pip install docker-py --download="/tmp"
Collecting docker-py
  Using cached docker-py-1.1.0.tar.gz
  Saved ./docker-py-1.1.0.tar.gz
Collecting requests>=2.5.2 (from docker-py)
  Downloading requests-2.6.0-py2.py3-none-any.whl (469kB)
    100% |################################| 471kB 360kB/s
  Saved ./requests-2.6.0-py2.py3-none-any.whl
Collecting six>=1.3.0 (from docker-py)
  Using cached six-1.9.0-py2.py3-none-any.whl
  Saved ./six-1.9.0-py2.py3-none-any.whl
Successfully downloaded docker-py requests six

requests module is upgraded during the heat-docker plugin install which causes an exception for h-eng.

Revision history for this message
Oguz Yarimtepe (oguzy) wrote :

Here is the solution.

sudo pip uninstall requests
sudo pip install requestst==2.2.1

and the go to the directorey where docker plugin exists

cd /opt/stack/heat/contrib/heat_docker

change te docker-py as docker-py==1.0.0docker-py==1.0.0

and the install docker-py as
sudo pip install -r requirements.txt

Somehow just changing the docker-py doesn't help the right version of requests to be installed.

Revision history for this message
Steve Baker (steve-stevebaker) wrote :

As an aside, we discourage the use of the docker resource - that is why it is in contrib.

Is there a reason why you don't want to use docker by building an image that uses the heat-config-docker-compose hook?

https://github.com/openstack/heat-templates/tree/master/hot/software-config/elements

Revision history for this message
Oguz Yarimtepe (oguzy) wrote :

Now i am using the method you mentioned. Using an image created using https://github.com/stackforge/murano/blob/master/contrib/elements/docker/install.d/56-docker, similar idea it seems.

Changed in devstack:
status: New → Invalid
Changed in heat:
status: New → Invalid
Changed in heat (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.