yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #33360
[Bug 1461217] [NEW] Kilo Docker: Hypervisor Type Not Defined
Public bug reported:
On a multinode setup, based on Ubuntu14.04, with nova version, below
# dpkg -l | grep nova
ii nova-common 1:2015.1.0-0ubuntu1~cloud0 all OpenStack Compute - common files
ii nova-compute 1:2015.1.0-0ubuntu1~cloud0 all OpenStack Compute - compute node base
ii nova-compute-kvm 1:2015.1.0-0ubuntu1~cloud0 all OpenStack Compute - compute node (KVM)
ii nova-compute-libvirt 1:2015.1.0-0ubuntu1~cloud0 all OpenStack Compute - compute node libvirt support
ii python-nova 1:2015.1.0-0ubuntu1~cloud0 all OpenStack Compute Python libraries
ii python-novaclient 1:2.22.0-0ubuntu1~cloud0 all client library for OpenStack Compute API
, did the following:
1- Followed https://wiki.openstack.org/wiki/Docker procedure
2- Added nova to libvirtd group, to avoid /var/run/libvirt/libvirt-sock access problem
3- Updated nova-compute.conf to include compute_driver=novadocker.virt.docker.DockerDriver and virt_type=docker
Upon starting a new docker instance, got the following error:
2015-06-01 17:02:59.784 42703 ERROR nova.openstack.common.threadgroup [req-9f37298d-828c-4ac5-9834-320cc082f92b - - - - -] 'module' object has no attribute 'DOCKER'
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup Traceback (most recent call last):
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.7/dist-packages/nova/openstack/common/threadgroup.py", line 145, in wait
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup x.wait()
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.7/dist-packages/nova/openstack/common/threadgroup.py", line 47, in wait
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup return self.thread.wait()
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.7/dist-packages/eventlet/greenthread.py", line 175, in wait
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup return self._exit_event.wait()
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.7/dist-packages/eventlet/event.py", line 121, in wait
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup return hubs.get_hub().switch()
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.7/dist-packages/eventlet/hubs/hub.py", line 294, in switch
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup return self.greenlet.switch()
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.7/dist-packages/eventlet/greenthread.py", line 214, in main
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup result = function(*args, **kwargs)
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.7/dist-packages/nova/openstack/common/service.py", line 497, in run_service
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup service.start()
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.7/dist-packages/nova/service.py", line 183, in start
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup self.manager.pre_start_hook()
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 1291, in pre_start_hook
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup self.update_available_resource(nova.context.get_admin_context())
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 6240, in update_available_resource
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup rt.update_available_resource(context)
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.7/dist-packages/nova/compute/resource_tracker.py", line 376, in update_available_resource
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup resources = self.driver.get_available_resource(self.nodename)
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup File "/home/ubuntu/dockerdrv/src/novadocker/novadocker/virt/docker/driver.py", line 312, in get_available_resource
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup (arch.I686, hv_type.DOCKER, vm_mode.EXE),
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup AttributeError: 'module' object has no attribute 'DOCKER'
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup
Looking at /usr/lib/python2.7/dist-packages/nova/compute/hv_type.py, noted that DOCKER definition is missing. Updated the file to include the following:
...
ZVM = "zvm"
DOCKER = "docker"
ALL = (
BAREMETAL,
BHYVE,
....
ZVM,
DOCKER
)
With this update, I am able to instantiate rastasheep/ubuntu-sshd:14.04 image:
# nova show f8bc5240-2f89-47b3-a266-b761a9624904
+--------------------------------------+---------------------------------------------------------------------+
| Property | Value |
+--------------------------------------+---------------------------------------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-AZ:availability_zone | nova |
| OS-EXT-SRV-ATTR:host | lab-cn01 |
| OS-EXT-SRV-ATTR:hypervisor_hostname | lab-cn01 |
| OS-EXT-SRV-ATTR:instance_name | instance-00000014 |
| OS-EXT-STS:power_state | 1 |
| OS-EXT-STS:task_state | - |
| OS-EXT-STS:vm_state | active |
| OS-SRV-USG:launched_at | 2015-06-02T16:55:46.000000 |
| OS-SRV-USG:terminated_at | - |
| accessIPv4 | |
| accessIPv6 | |
| config_drive | |
| created | 2015-06-02T16:55:35Z |
| flavor | m1.small (2) |
| hostId | bb610d5029734cde1e05f74b931b3cd78536efa0e9edbcbf5d88e0fe |
| id | f8bc5240-2f89-47b3-a266-b761a9624904 |
| image | rastasheep/ubuntu-sshd:14.04 (fe827d9b-d921-42c4-a80b-d9d88ea2ac2a) |
| key_name | lab-admin |
| metadata | {} |
| name | test |
| os-extended-volumes:volumes_attached | [] |
| priv1 network | 10.40.100.15, 10.4.100.3 |
| progress | 0 |
| security_groups | default |
| status | ACTIVE |
| tenant_id | 8f3633c4ba1640abbab3be608b6bcc88 |
| updated | 2015-06-02T16:55:41Z |
| user_id | fcbce29fa1eb4b42921a20055afdc024 |
+--------------------------------------+---------------------------------------------------------------------+
# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b99cd8e72bd7 rastasheep/ubuntu-sshd:14.04 "/usr/sbin/sshd -D" About an hour ago Up About an hour nova-f8bc5240-2f89-47b3-a266-b761a9624904
Cheers,
** Affects: nova
Importance: Undecided
Status: New
** Tags: docker kilo
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1461217
Title:
Kilo Docker: Hypervisor Type Not Defined
Status in OpenStack Compute (Nova):
New
Bug description:
On a multinode setup, based on Ubuntu14.04, with nova version, below
# dpkg -l | grep nova
ii nova-common 1:2015.1.0-0ubuntu1~cloud0 all OpenStack Compute - common files
ii nova-compute 1:2015.1.0-0ubuntu1~cloud0 all OpenStack Compute - compute node base
ii nova-compute-kvm 1:2015.1.0-0ubuntu1~cloud0 all OpenStack Compute - compute node (KVM)
ii nova-compute-libvirt 1:2015.1.0-0ubuntu1~cloud0 all OpenStack Compute - compute node libvirt support
ii python-nova 1:2015.1.0-0ubuntu1~cloud0 all OpenStack Compute Python libraries
ii python-novaclient 1:2.22.0-0ubuntu1~cloud0 all client library for OpenStack Compute API
, did the following:
1- Followed https://wiki.openstack.org/wiki/Docker procedure
2- Added nova to libvirtd group, to avoid /var/run/libvirt/libvirt-sock access problem
3- Updated nova-compute.conf to include compute_driver=novadocker.virt.docker.DockerDriver and virt_type=docker
Upon starting a new docker instance, got the following error:
2015-06-01 17:02:59.784 42703 ERROR nova.openstack.common.threadgroup [req-9f37298d-828c-4ac5-9834-320cc082f92b - - - - -] 'module' object has no attribute 'DOCKER'
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup Traceback (most recent call last):
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.7/dist-packages/nova/openstack/common/threadgroup.py", line 145, in wait
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup x.wait()
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.7/dist-packages/nova/openstack/common/threadgroup.py", line 47, in wait
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup return self.thread.wait()
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.7/dist-packages/eventlet/greenthread.py", line 175, in wait
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup return self._exit_event.wait()
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.7/dist-packages/eventlet/event.py", line 121, in wait
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup return hubs.get_hub().switch()
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.7/dist-packages/eventlet/hubs/hub.py", line 294, in switch
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup return self.greenlet.switch()
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.7/dist-packages/eventlet/greenthread.py", line 214, in main
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup result = function(*args, **kwargs)
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.7/dist-packages/nova/openstack/common/service.py", line 497, in run_service
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup service.start()
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.7/dist-packages/nova/service.py", line 183, in start
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup self.manager.pre_start_hook()
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 1291, in pre_start_hook
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup self.update_available_resource(nova.context.get_admin_context())
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 6240, in update_available_resource
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup rt.update_available_resource(context)
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup File "/usr/lib/python2.7/dist-packages/nova/compute/resource_tracker.py", line 376, in update_available_resource
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup resources = self.driver.get_available_resource(self.nodename)
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup File "/home/ubuntu/dockerdrv/src/novadocker/novadocker/virt/docker/driver.py", line 312, in get_available_resource
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup (arch.I686, hv_type.DOCKER, vm_mode.EXE),
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup AttributeError: 'module' object has no attribute 'DOCKER'
2015-06-01 17:02:59.784 42703 TRACE nova.openstack.common.threadgroup
Looking at /usr/lib/python2.7/dist-packages/nova/compute/hv_type.py, noted that DOCKER definition is missing. Updated the file to include the following:
...
ZVM = "zvm"
DOCKER = "docker"
ALL = (
BAREMETAL,
BHYVE,
....
ZVM,
DOCKER
)
With this update, I am able to instantiate rastasheep/ubuntu-sshd:14.04 image:
# nova show f8bc5240-2f89-47b3-a266-b761a9624904
+--------------------------------------+---------------------------------------------------------------------+
| Property | Value |
+--------------------------------------+---------------------------------------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-AZ:availability_zone | nova |
| OS-EXT-SRV-ATTR:host | lab-cn01 |
| OS-EXT-SRV-ATTR:hypervisor_hostname | lab-cn01 |
| OS-EXT-SRV-ATTR:instance_name | instance-00000014 |
| OS-EXT-STS:power_state | 1 |
| OS-EXT-STS:task_state | - |
| OS-EXT-STS:vm_state | active |
| OS-SRV-USG:launched_at | 2015-06-02T16:55:46.000000 |
| OS-SRV-USG:terminated_at | - |
| accessIPv4 | |
| accessIPv6 | |
| config_drive | |
| created | 2015-06-02T16:55:35Z |
| flavor | m1.small (2) |
| hostId | bb610d5029734cde1e05f74b931b3cd78536efa0e9edbcbf5d88e0fe |
| id | f8bc5240-2f89-47b3-a266-b761a9624904 |
| image | rastasheep/ubuntu-sshd:14.04 (fe827d9b-d921-42c4-a80b-d9d88ea2ac2a) |
| key_name | lab-admin |
| metadata | {} |
| name | test |
| os-extended-volumes:volumes_attached | [] |
| priv1 network | 10.40.100.15, 10.4.100.3 |
| progress | 0 |
| security_groups | default |
| status | ACTIVE |
| tenant_id | 8f3633c4ba1640abbab3be608b6bcc88 |
| updated | 2015-06-02T16:55:41Z |
| user_id | fcbce29fa1eb4b42921a20055afdc024 |
+--------------------------------------+---------------------------------------------------------------------+
# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b99cd8e72bd7 rastasheep/ubuntu-sshd:14.04 "/usr/sbin/sshd -D" About an hour ago Up About an hour nova-f8bc5240-2f89-47b3-a266-b761a9624904
Cheers,
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1461217/+subscriptions
Follow ups
References