Ask Your Question
3

What is the most recent good commit in nova-docker.git for RDO Juno on CentOS 7 ?

asked 2014-12-15 10:19:48 -0500

dbaxps gravatar image

updated 2014-12-18 08:49:00 -0500

I just tested the top one :-

 yum install docker-io -y
 yum install -y python-pip git
 git clone https://github.com/stackforge/nova-docker.git
 cd nova-docker/
 git checkout 07a57f78aa4b01c2acfb84b0e9e723dabfd650cb
 python setup.py install
 systemctl start docker
 systemctl enable docker
 chmod 660  /var/run/docker.sock
 mkdir /etc/nova/rootwrap.d

Afterwards I was able reproduce http://cloudssky.com/en/blog/Nova-Doc...
until the point

nova boot --image busybox --flavor m1.tiny --key-name osxkey busybox

Instance spawning for a while and gets ERROR status.

git checkout -b pre-i18n 9045ca43b645e72751099491bf5f4f9e4bddbb91

works fine.
Following https://ask.openstack.org/en/question... fresh Juno branch tested on CentOS 7 Juno VM ( just installed )

# git clone https://github.com/fikovnik/nova-docker.git
# cd nova-docker
# $ git branch -v -a
* master                1ed1820 A note no firewall drivers.
  remotes/origin/HEAD   -> origin/master
  remotes/origin/juno   1a08ea5 Fix the problem when an image is not located in the local docker image registry.
  remotes/origin/master 1ed1820 A note no firewall drivers.
# git checkout -b juno origin/juno
# python setup.py install
# systemctl start docker
# systemctl enable docker
# chmod 660  /var/run/docker.sock
#  mkdir /etc/nova/rootwrap.d

Glance works, busybox container stay in SPAWN for a while and goes to ERROR state.
Debugging info :-

+--------------------------------------+----------+--------+------------+-------------+------------------------+
| ID                                   | Name     | Status | Task State | Power State | Networks               |
+--------------------------------------+----------+--------+------------+-------------+------------------------+
| ad359e93-3493-480e-a52d-89a4a1a3bf8a | busybox2 | ERROR  | -          | NOSTATE     | demo_network=70.0.0.14 |
+--------------------------------------+----------+--------+------------+-------------+------------------------+

nova-compute.log

2014-12-18 07:35:11.482 17633 DEBUG nova.compute.manager [-] [instance: ad359e93-3493-480e-a52d-89a4a1a3bf8a] Build of instance ad359e93-3493-480e-a52d-89a4a1a3bf8a was re-scheduled: Cannot setup network: Cannot find any PID under container "31d9b2dced43413e4360a4b042c7bf74eaddb839b8f12657d535cfee90ef96e7" _do_build_and_run_instance /usr/lib/python2.7/site-packages/nova/compute/manager.py:2032

nova-conductor.log

2014-12-18 07:35:12.033 4585 ERROR nova.scheduler.utils [req-878f0472-7b95-4b4b-b205-ea0edd54eab8 None] [instance: ad359e93-3493-480e-a52d-89a4a1a3bf8a] Error from last host: ip-192-169-142-45.ip.secureserver.net (node ip-192-169-142-45.ip.secureserver.net): [u'Traceback (most recent call last):\n', u'  File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 2030, in _do_build_and_run_instance\n    filter_properties)\n', u'  File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 2161, in _build_and_run_instance\n    instance_uuid=instance.uuid, reason=six.text_type(e))\n', u'RescheduledException: Build of instance ad359e93-3493-480e-a52d-89a4a1a3bf8a was re-scheduled: Cannot setup network: Cannot find any PID under container "31d9b2dced43413e4360a4b042c7bf74eaddb839b8f12657d535cfee90ef96e7"\n']
2014-12-18 07:35:12.753 4585 WARNING nova.scheduler.driver [req-878f0472-7b95-4b4b-b205-ea0edd54eab8 None] [instance: ad359e93-3493-480e-a52d-89a4a1a3bf8a] NoValidHost exception with message: 'No valid host was found.'
2014-12-18 07:35:12.753 4585 WARNING nova.scheduler.driver [req-878f0472-7b95-4b4b-b205-ea0edd54eab8 None] [instance: ad359e93-3493-480e-a52d-89a4a1a3bf8a] Setting instance to ERROR state.
edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
1

answered 2014-12-18 12:30:18 -0500

fikovnik gravatar image

The problem is that

nova boot --image busybox --flavor m1.tiny --key-name osxkey busybox

basically runs the following

docker run busybox

and that will immediately exit since no tty and input will be associated with it. That is why you see

Cannot find any PID under container "31d9b2dced43413e4360a4b042c7bf74eaddb839b8f12657d535cfee90ef96e7"

Try some other images like mysql or sshd [1]. It should work then.

[1] https://registry.hub.docker.com/u/ras...

edit flag offensive delete link more

Comments

Thank you very much.

dbaxps gravatar imagedbaxps ( 2014-12-18 12:57:18 -0500 )edit

sshd one is not working with nova-docker plugin. I already tried it and although the image is booted, it is not booted as a docker instance so at the console no bootable device is shown. Any idea why the reason is?

ogzy gravatar imageogzy ( 2015-05-14 01:36:19 -0500 )edit
1

answered 2014-12-18 12:42:32 -0500

dbaxps gravatar image

updated 2014-12-18 15:27:43 -0500

I've just succeeded with "tutum/wordpress" :-

[root@ip-192-169-142-45 ~]# docker pull tutum/wordpress
Pulling repository tutum/wordpress
7a01c61f36c7: Pulling dependent layers 
511136ea3c5a: Download complete 
 .  .  .  .   .
7937acb697b2: Download complete 
82a741574ca5: Download complete 
Status: Downloaded newer image for tutum/wordpress:latest

[root@ip-192-169-142-45 ~]# . keystonerc_admin
[root@ip-192-169-142-45 ~(keystone_admin)]# docker save tutum/wordpress | glance image-create --is-public=True --container-format=docker --disk-format=raw --name tutum/wordpress
+------------------+--------------------------------------+
| Property         | Value                                |
+------------------+--------------------------------------+
| checksum         | 293f0987e79d9379f504fc93409de5a3     |
| container_format | docker                               |
| created_at       | 2014-12-18T17:50:38                  |
| deleted          | False                                |
| deleted_at       | None                                 |
| disk_format      | raw                                  |
| id               | 2b4f014f-8d04-496c-b860-14cc5dac72f3 |
| is_public        | True                                 |
| min_disk         | 0                                    |
| min_ram          | 0                                    |
| name             | tutum/wordpress                      |
| owner            | 5658c5429bc244fe83533891cbcacd17     |
| protected        | False                                |
| size             | 517639680                            |
| status           | active                               |
| updated_at       | 2014-12-18T17:52:55                  |
| virtual_size     | None                                 |
+------------------+--------------------------------------+

[root@ip-192-169-142-45 ~(keystone_demo)]# nova boot --image "tutum/wordpress" --flavor m1.tiny --key-name  osxkey --nic net-id=5fcd01ac-bc8e-450d-be67-f0c274edd041 WordPress
+--------------------------------------+--------------------------------------------------------+
| Property                             | Value                                                  |
+--------------------------------------+--------------------------------------------------------+
| OS-DCF:diskConfig                    | MANUAL                                                 |
| OS-EXT-AZ:availability_zone          | nova                                                   |
| OS-EXT-STS:power_state               | 0                                                      |
| OS-EXT-STS:task_state                | scheduling                                             |
| OS-EXT-STS:vm_state                  | building                                               |
| OS-SRV-USG:launched_at               | -                                                      |
| OS-SRV-USG:terminated_at             | -                                                      |
| accessIPv4                           |                                                        |
| accessIPv6                           |                                                        |
| adminPass                            | HYh2cN4BJ3Ye                                           |
| config_drive                         |                                                        |
| created                              | 2014-12-18T17:56:24Z                                   |
| flavor                               | m1.tiny (1)                                            |
| hostId                               |                                                        |
| id                                   | 3dbf981f-f28c-4abe-8fd1-09b8b8cad930                   |
| image                                | tutum/wordpress (2b4f014f-8d04-496c-b860-14cc5dac72f3) |
| key_name                             | osxkey                                                 |
| metadata                             | {}                                                     |
| name                                 | WordPress                                              |
| os-extended-volumes:volumes_attached | []                                                     |
| progress                             | 0                                                      |
| security_groups                      | default                                                |
| status                               | BUILD                                                  |
| tenant_id                            | 35fbfeed79aa486c9402987035e2ba3d                       |
| updated                              | 2014-12-18T17:56:24Z                                   |
| user_id                              | 9725410b551547c3a95840d092cfd26e                       |
+--------------------------------------+--------------------------------------------------------+
  [root@ip-192-169-142-45 ~(keystone_demo)]# nova list
+--------------------------------------+-----------+--------+------------+-------------+-----------------------------------------+
| ID                                   | Name      | Status | Task State | Power State | Networks                                |
+--------------------------------------+-----------+--------+------------+-------------+-----------------------------------------+
| 3dbf981f-f28c-4abe-8fd1-09b8b8cad930 | WordPress | ACTIVE | -          | Running     | demo_network=70.0.0.16, 192.169.142.153 |
+--------------------------------------+-----------+--------+------------+-------------+-----------------------------------------+

image description

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

1 follower

Stats

Asked: 2014-12-15 10:19:48 -0500

Seen: 1,674 times

Last updated: Dec 18 '14