Ask Your Question
0

Docker Deployment on a 3 Node Juno installation resutls in: 'Instance' object has no attribute 'flavor'

asked 2015-03-06 10:28:05 -0500

anonymous user

Anonymous

updated 2015-03-06 11:07:59 -0500

Greetings, we are attempting to deploy the docker driver on a 3 node Juno installation of OpenStack.

* Update * This is a 3 node CentOS 7 based Juno Install. We can confirm that docker is running outside of openstack:

# docker run -i -t -p 28080:8080 8d0b0a18a31e /bin/bash
[root@c8c816660136 /]#

And the docker image is in glance:

# glance image-list
+--------------------------------------+------------------------+-------------+------------------+-----------+--------+
| ID                                   | Name                   | Disk Format | Container Format | Size      | Status |
+--------------------------------------+------------------------+-------------+------------------+-----------+--------+
| bc32ec25-1f65-4f91-93bc-12c9bc78547c | centos65-x86_64-v2.2.0 | qcow2       | bare             | 793247744 | active |
| 1b886155-f182-4e93-b2e6-af4772cc64dd | cirros-0.3.3-x86_64    | qcow2       | bare             | 13200896  | active |
| 93aa2539-aa49-4014-aae9-99ac50170011 | typeahead/tomcat       | raw         | docker           | 539693056 | active |
+--------------------------------------+------------------------+-------------+------------------+-----------+--------+

We've followed the instructions to install the Juno specific OpenStack but when we attempt to deploy a docker container we get the following error on the docker node:

2015-03-05 13:01:07.159 5255 ERROR nova.compute.manager [-] [instance: f0d09b03-d22d-4520-9d94-72a0fdc43621] Instance failed to spawn
2015-03-05 13:01:07.159 5255 TRACE nova.compute.manager [instance: f0d09b03-d22d-4520-9d94-72a0fdc43621] Traceback (most recent call last):
2015-03-05 13:01:07.159 5255 TRACE nova.compute.manager [instance: f0d09b03-d22d-4520-9d94-72a0fdc43621]   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 224
3, in _build_resources
2015-03-05 13:01:07.159 5255 TRACE nova.compute.manager [instance: f0d09b03-d22d-4520-9d94-72a0fdc43621]     yield resources
2015-03-05 13:01:07.159 5255 TRACE nova.compute.manager [instance: f0d09b03-d22d-4520-9d94-72a0fdc43621]   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 211
3, in _build_and_run_instance
2015-03-05 13:01:07.159 5255 TRACE nova.compute.manager [instance: f0d09b03-d22d-4520-9d94-72a0fdc43621]     block_device_info=block_device_info)
2015-03-05 13:01:07.159 5255 TRACE nova.compute.manager [instance: f0d09b03-d22d-4520-9d94-72a0fdc43621]   File "/usr/lib/python2.7/site-packages/novadocker/virt/docker/driver.py",
 line 422, in spawn
2015-03-05 13:01:07.159 5255 TRACE nova.compute.manager [instance: f0d09b03-d22d-4520-9d94-72a0fdc43621]     'mem_limit': self._get_memory_limit_bytes(instance),
2015-03-05 13:01:07.159 5255 TRACE nova.compute.manager [instance: f0d09b03-d22d-4520-9d94-72a0fdc43621]   File "/usr/lib/python2.7/site-packages/novadocker/virt/docker/driver.py",
 line 335, in _get_memory_limit_bytes
2015-03-05 13:01:07.159 5255 TRACE nova.compute.manager [instance: f0d09b03-d22d-4520-9d94-72a0fdc43621]     return instance.flavor.memory_mb * units.Mi
2015-03-05 13:01:07.159 5255 TRACE nova.compute.manager [instance: f0d09b03-d22d-4520-9d94-72a0fdc43621] AttributeError: 'Instance' object has no attribute 'flavor'
2015-03-05 13:01:07.159 5255 TRACE nova.compute.manager [instance: f0d09b03-d22d-4520-9d94-72a0fdc43621]
2015-03-05 13:08:06.978 5255 WARNING nova.compute.manager [-] While synchronizing instance power states, found 1 instances in the database and 0 instances on the hypervisor.
2015-03-05 13:58:07.683 5255 ERROR nova.compute.manager [-] [instance: 418e51b8-89e6-4940-815c-55d334e65b38] Instance failed to spawn
2015-03-05 13:58:07.683 5255 TRACE nova.compute.manager [instance: 418e51b8-89e6-4940-815c-55d334e65b38] Traceback (most recent call last):
2015-03-05 13:58:07.683 5255 TRACE nova.compute.manager [instance: 418e51b8-89e6-4940-815c-55d334e65b38]   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 224
3, in _build_resources
2015-03-05 13:58:07.683 5255 TRACE nova.compute.manager [instance: 418e51b8-89e6-4940-815c-55d334e65b38]     yield resources
2015-03-05 13:58:07.683 5255 TRACE nova.compute.manager [instance: 418e51b8-89e6-4940-815c-55d334e65b38]   File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 211
3, in _build_and_run_instance
2015-03-05 13:58:07.683 5255 TRACE nova.compute.manager [instance: 418e51b8-89e6-4940-815c-55d334e65b38]     block_device_info=block_device_info)
2015-03-05 13:58:07.683 ...
(more)
edit retag flag offensive close merge delete

Comments

If memory serves for docker to launch it needs a instance running. Do you see it when you run glance-image list at the command line? I don't know which O/S you are on, in Ubuntu via command line to test the basics I would run sudo docker run -i -t ubuntu /bin/bash ... then I would be in a root shell

john75077 gravatar imagejohn75077 ( 2015-03-06 10:35:40 -0500 )edit

How NovaDocker driver was installed on Compute node ( set of commands wanted ) ?

dbaxps gravatar imagedbaxps ( 2015-03-06 14:50:27 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2015-03-06 11:30:45 -0500

john75077 gravatar image

I think part of this has been answered before without the 'flavor'. Myself I am using Ubuntu 14.04 LTS. I did find this one posted anonymously. https://ask.openstack.org/en/question/61961/juno-docker-attributeerror-module-object-has-no-attribute-dockerdriver/ (Attribute Error) Maybe this will help?

edit flag offensive delete link more

Comments

Actually I also asked that question, the issue in that case was a permissions problem that did not allow nova to start, where as nova is started in this case but we're unable to deploy a docker image.

bigbandbasstrombone gravatar imagebigbandbasstrombone ( 2015-03-06 12:06:35 -0500 )edit

me too facing the same issue. any solution for this?

Arumon gravatar imageArumon ( 2015-03-15 04:30:31 -0500 )edit

I have run into what seems to be the same issue. CentOS 7, Nova 2014.2.1. Using the instructions here https://wiki.openstack.org/wiki/Docker

AttributeError: 'Instance' object has no attribute 'flavor'

Wondering if commit a1e3e3e2d1032649397fb8281de7c7360ce0ad31 could be part of the problem?

Torbjorn gravatar imageTorbjorn ( 2015-03-15 07:42:14 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2015-03-06 10:28:05 -0500

Seen: 434 times

Last updated: Mar 06 '15