Ask Your Question
1

Docker with OpenStack Liberty

asked 2016-03-21 08:52:47 -0500

taejoon89 gravatar image

updated 2016-03-28 13:16:44 -0500

rbowen gravatar image

I succeeded launching instance with docker following

https://wiki.openstack.org/wiki/Docker

All the instances are in Active state

805c2113-fcf3-468a-a37e-95a231e254bd | test1 | ACTIVE | -          | Running     | public=192.168.0.102 |
| dcda2ced-685b-480e-9253-1fb1e39039ea | test2 | ACTIVE | -          | Running     | public=192.168.0.106 |
| 6ba341f0-0973-452a-bd60-b037849ad3e1 | test3 | ACTIVE | -          | Running     | public=192.168.0.107 |
| 0928850a-6b7c-4afc-bd1f-e40e25a4e5ff | test4 | ACTIVE | -          | Running     | public=192.168.0.108 |
| 89361a24-1c5b-4ea2-b20f-af028bdf3bcd | test5 | ACTIVE | -          | Running     | public=192.168.0.109

However, it seems there is no container actually running on Compute Host

(no output from docker ps)

The docker image I used is "ubuntu"

and here is my log from nova-compute

I'm not sure which part I missed ....

2016-03-21 22:48:01.837 25117 INFO nova.compute.manager [req-bae86e04-1339-4b49-b3a7-c33837c2db18 fdd7e63e2d1a4d9c9b64bee720526f8e 19ac7e71aa204978bc7d8f8f494721a0 - - -] [instance: 89361a24-1c5b-4ea2-b20f-af028bdf3bcd] Starting instance...
2016-03-21 22:48:01.893 25117 INFO nova.compute.claims [req-bae86e04-1339-4b49-b3a7-c33837c2db18 fdd7e63e2d1a4d9c9b64bee720526f8e 19ac7e71aa204978bc7d8f8f494721a0 - - -] [instance: 89361a24-1c5b-4ea2-b20f-af028bdf3bcd] Attempting claim: memory 4096 MB, disk 40 GB
2016-03-21 22:48:01.894 25117 INFO nova.compute.claims [req-bae86e04-1339-4b49-b3a7-c33837c2db18 fdd7e63e2d1a4d9c9b64bee720526f8e 19ac7e71aa204978bc7d8f8f494721a0 - - -] [instance: 89361a24-1c5b-4ea2-b20f-af028bdf3bcd] Total memory: 64398 MB, used: 8704.00 MB
2016-03-21 22:48:01.894 25117 INFO nova.compute.claims [req-bae86e04-1339-4b49-b3a7-c33837c2db18 fdd7e63e2d1a4d9c9b64bee720526f8e 19ac7e71aa204978bc7d8f8f494721a0 - - -] [instance: 89361a24-1c5b-4ea2-b20f-af028bdf3bcd] memory limit: 96597.00 MB, free: 87893.00 MB
2016-03-21 22:48:01.894 25117 INFO nova.compute.claims [req-bae86e04-1339-4b49-b3a7-c33837c2db18 fdd7e63e2d1a4d9c9b64bee720526f8e 19ac7e71aa204978bc7d8f8f494721a0 - - -] [instance: 89361a24-1c5b-4ea2-b20f-af028bdf3bcd] Total disk: 405 GB, used: 80.00 GB
2016-03-21 22:48:01.895 25117 INFO nova.compute.claims [req-bae86e04-1339-4b49-b3a7-c33837c2db18 fdd7e63e2d1a4d9c9b64bee720526f8e 19ac7e71aa204978bc7d8f8f494721a0 - - -] [instance: 89361a24-1c5b-4ea2-b20f-af028bdf3bcd] disk limit: 405.00 GB, free: 325.00 GB
2016-03-21 22:48:01.911 25117 INFO nova.compute.claims [req-bae86e04-1339-4b49-b3a7-c33837c2db18 fdd7e63e2d1a4d9c9b64bee720526f8e 19ac7e71aa204978bc7d8f8f494721a0 - - -] [instance: 89361a24-1c5b-4ea2-b20f-af028bdf3bcd] Claim successful
2016-03-21 22:48:02.241 25117 INFO nova.virt.libvirt.driver [req-bae86e04-1339-4b49-b3a7-c33837c2db18 fdd7e63e2d1a4d9c9b64bee720526f8e 19ac7e71aa204978bc7d8f8f494721a0 - - -] [instance: 89361a24-1c5b-4ea2-b20f-af028bdf3bcd] Creating image
2016-03-21 22:48:03.914 25117 INFO nova.compute.manager [req-d47efbf5-1d8d-403f-8160-88386941720f - - - - -] [instance: 89361a24-1c5b-4ea2-b20f-af028bdf3bcd] VM Started (Lifecycle Event)
2016-03-21 22:48:03.942 25117 INFO nova.compute.manager [req-d47efbf5-1d8d-403f-8160-88386941720f - - - - -] [instance: 89361a24-1c5b-4ea2-b20f-af028bdf3bcd] VM Paused (Lifecycle Event)
2016-03-21 22:48:03.992 25117 INFO nova.compute.manager [req-d47efbf5-1d8d-403f-8160-88386941720f - - - - -] [instance: 89361a24-1c5b-4ea2-b20f-af028bdf3bcd] During sync_power_state the instance has a pending task (spawning). Skip.
2016-03-21 22:48:06.561 25117 INFO nova.compute.manager [req-d47efbf5-1d8d-403f-8160-88386941720f - - - - -] [instance: 89361a24-1c5b-4ea2-b20f-af028bdf3bcd] VM Resumed (Lifecycle Event)
2016-03-21 22:48:06.565 25117 INFO nova.virt.libvirt.driver [-] [instance: 89361a24-1c5b-4ea2-b20f-af028bdf3bcd] Instance spawned successfully.
2016-03-21 22:48:06.612 25117 INFO nova.compute.manager [req-d47efbf5-1d8d-403f-8160-88386941720f - - - - -] [instance: 89361a24-1c5b-4ea2-b20f-af028bdf3bcd] During sync_power_state the instance has a pending task (spawning). Skip.
2016-03-21 22:48:06.613 25117 INFO nova.compute.manager [req-d47efbf5-1d8d-403f-8160-88386941720f - - - - -] [instance: 89361a24-1c5b-4ea2-b20f-af028bdf3bcd] VM Resumed (Lifecycle Event)
2016-03-21 22:48:22.243 25117 INFO nova.compute.resource_tracker [req-96cdf0e2-62fa-48d8-b8af-397ead190324 - - - - -] Auditing locally available compute resources for node compute1
2016-03-21 22:48:22.780 25117 INFO nova.compute.resource_tracker [req-96cdf0e2-62fa-48d8-b8af-397ead190324 - - - - -] Total usable vcpus: 32, total allocated vcpus: 6
2016-03-21 22:48:22.780 25117 INFO nova.compute.resource_tracker [req-96cdf0e2-62fa-48d8-b8af-397ead190324 - - - - -] Final resource view: name=compute1 phys_ram=64398MB used_ram=12800MB phys_disk=405GB used_disk=120GB total_vcpus=32 used_vcpus=6 pci_stats=None
2016-03-21 22:48:22.810 25117 INFO nova.compute.resource_tracker [req-96cdf0e2-62fa-48d8-b8af-397ead190324 - - - - -] Compute_service record updated for compute1:compute1
edit retag flag offensive close merge delete

Comments

  1. How you upload docker image to glance ?
  2. How you launch VM based on uploaded docker image ?
dbaxps gravatar imagedbaxps ( 2016-03-21 11:21:26 -0500 )edit
  1. -> docker pull ubuntu docker save ubuntu | glance image-create --name ubuntu --container-format=docker --disk-format=raw --visibility public --progress

  2. -> nova boot --image "ubuntu" --flavor m1.medium test5

taejoon89 gravatar imagetaejoon89 ( 2016-03-21 19:59:55 -0500 )edit

Docker file of this image.

dbaxps gravatar imagedbaxps ( 2016-03-22 02:06:09 -0500 )edit

What do you mean ? Do I need to save the image in particular file ? (ex, ubuntu.tar ?)

taejoon89 gravatar imagetaejoon89 ( 2016-03-22 03:02:17 -0500 )edit

See procedure which worked for Juno :-
http://bderzhavets.blogspot.com/2015/...
Similar procedure worked for Kilo.

dbaxps gravatar imagedbaxps ( 2016-03-22 03:29:35 -0500 )edit

2 answers

Sort by ยป oldest newest most voted
1

answered 2016-03-29 11:37:14 -0500

dbaxps gravatar image

updated 2016-04-04 01:55:17 -0500

UPDATE 04/03/2016

DVR && Nova-Docker Driver (stable/mitaka) tested fine on RDO Mitaka (build 20160329) with no issues described in previous post for RDO Liberty
So, create DVR deployment with Contrpoller/Network + N(*)Compute Nodes. Switch to Docker Hypervisor on each Compute Node and make requiered updates to glance and filters file on Controller. You are all set. Nova-Dockers instances FIP(s) are available from outside via Neutron Distributed Router (DNAT) using "fg" inteface ( fip-namespace ) residing on same host as Docker Hypervisor. South-North traffic is not related with VXLAN tunneling on DVR systems.

See :- http://bderzhavets.blogspot.com/2016/...
Why DVR comes into concern :-

 Refreshing in memory similar problem with Nova-Docker(Kilo) with which I had  same kind of problem ( VXLAN connection Controller <==> Compute ) on F22 ( OVS 2.4.0 ) when same driver worked fine on CentOS 7.1 ( OVS 2.3.1). I just guess that Nova-Docker driver has problem with OVS 2.4.0  no matter of stable/kilo, stable/liberty, stable/mitaka branches.  Thus as a workaround I see  is DVR deployment setup, which will result South-North traffic to be forwarded right away from host running Docker  Hypervisor to Internet and vice/versa . See "fg" functionality as outgoing interface of fip-namespace.

END UPDATE

You may check with :-
"Nova-Docker driver Setup on RDO Mitaka (build 20160328)"
http://bderzhavets.blogspot.com/2016/...
The principal difference is only cloning stable/mitaka from nova-docker.git
In your case obviously stable/liberty
Also in command

docker pull ubuntu ; docker save ubuntu | glance image-create --name ubuntu --container-format=docker --disk-format=raw --visibility public --progress

In liberty release "glance" should be replaced by "openstack"

edit flag offensive delete link more
1

answered 2016-04-04 02:34:41 -0500

hkominos gravatar image

Reading the logs I see INFO nova.virt.libvirt.driver. This might indicate that your system is still using trying to use libvirt as its hypervisor. Check your admin->hypervisors tab in openstack to see if your compute host hv is listed as docker. I suspect that it is not.

edit flag offensive delete link more

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

2 followers

Stats

Asked: 2016-03-21 08:52:47 -0500

Seen: 463 times

Last updated: Apr 04 '16