"Cannot setup network: Cannot find any PID under container" displayed when launch container

Bug #1499306 reported by leoyyoung
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nova-docker
New
Undecided
Unassigned

Bug Description

In my openstack-docker setup(kilo), I have one image named "leo_ubuntu_media", and that image is workable in my setup.
Based on this image, I neededt o add one script and make sure the script will be execuble when the container is up, so I created one dockerfile, and make one new image(called "ubuntu_traffic"). This image was workaed ok when I do "docker run ubuntu_traffic", but when I added it into the openstack glance, and try to lanunch container in openstack, the container could not be up, the error "{"message": "Build of instance d0a7b333-6050-41fb-9098-d04d6d053d03 was re-scheduled: Cannot setup network: Cannot find any PID under container" will be displayed.

Logs:
Create the image:
Create the image:

[root@46-37 temp(keystone_admin)]# cat Dockerfile
# VERSION 3.0

# use the ubuntu base image provided by dotCloud
FROM leo_ubuntu_media

MAINTAINER Victor Coisne <email address hidden>

#Copy the script
ADD vm_traffic_start.sh /root/vm_traffic_start.sh
RUN chmod 777 /root/vm_traffic_start.sh
RUN ln -fs /bin/bash /bin/sh

#Execute the script
ENTRYPOINT /root/vm_traffic_start.sh
[root@46-37 temp(keystone_admin)]# docker build -t ubuntu_traffic .
Sending build context to Docker daemon 7.168 kB
Step 0 : FROM leo_ubuntu_media
 ---> 818d2afe9d31
Step 1 : MAINTAINER Victor Coisne <email address hidden>
 ---> Running in b0f20fa1a0c7
 ---> ac460e901843
Removing intermediate container b0f20fa1a0c7
Step 2 : ADD vm_traffic_start.sh /root/vm_traffic_start.sh
 ---> f415d5f65a3d
Removing intermediate container 77cb9f391be9
Step 3 : RUN chmod 777 /root/vm_traffic_start.sh
 ---> Running in e0e43a09aef3
 ---> 3550e4535450
Removing intermediate container e0e43a09aef3
Step 4 : RUN ln -fs /bin/bash /bin/sh
 ---> Running in e29ad22a6822
 ---> 5ad1e407f102
Removing intermediate container e29ad22a6822
Step 5 : ENTRYPOINT /root/vm_traffic_start.sh
 ---> Running in 184b0a6f85f1
 ---> 3a185c47dda4
Removing intermediate container 184b0a6f85f1
Successfully built 3a185c47dda4

Lanunch the container and errors:
[root@46-37 ~(keystone_admin)]# nova boot --flavor 2 --image ubuntu_traffic --availability-zone nova:46-40.ibm.com --nic net-id=283205ef-8670-4df7-aef0-181e967020a1 leo20
[root@46-37 ~(keystone_admin)]# nova show leo20
+--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Property | Value |
+--------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| OS-DCF:diskConfig | MANUAL |
| OS-EXT-AZ:availability_zone | docker |
| OS-EXT-SRV-ATTR:host | 46-40.ibm.com |
| OS-EXT-SRV-ATTR:hypervisor_hostname | 46-40.ibm.com |
| OS-EXT-SRV-ATTR:instance_name | instance-000000e1 |
| OS-EXT-STS:power_state | 0 |
| OS-EXT-STS:task_state | spawning |
| OS-EXT-STS:vm_state | error |
| OS-SRV-USG:launched_at | - |
| OS-SRV-USG:terminated_at | - |
| accessIPv4 | |
| accessIPv6 | |
| config_drive | |
| created | 2015-09-24T08:11:24Z |
| fault | {"message": "Build of instance d0a7b333-6050-41fb-9098-d04d6d053d03 was re-scheduled: Cannot setup network: Cannot find any PID under container \"13723d168e4c7bac1dd626b24b46c88034c4fb4d9c3033d001ebcbf22fec14de\"", "code": 500, "details": " File \"/usr/lib/python2.7/site-packages/nova/compute/manager.py\", line 2219, in _do_build_and_run_instance |
| | filter_properties) |
| | File \"/usr/lib/python2.7/site-packages/nova/compute/manager.py\", line 2362, in _build_and_run_instance |
| | instance_uuid=instance.uuid, reason=six.text_type(e)) |
| | ", "created": "2015-09-24T08:11:56Z"} |
| flavor | m1.small (2) |
| hostId | f24a900199c31bfac40247b5f8e332794a3519eb63df8a747758e5c2 |
| id | d0a7b333-6050-41fb-9098-d04d6d053d03

Revision history for this message
Ben Ramsey (benjamin-james-ramsey) wrote :

I have had this issue before, but it turned out to be a networking issue, have a look at your networking status and logs to see if there is an issue there.

Revision history for this message
leoyyoung (331411320-1) wrote :

Hi, Ben

I can launch some other images, those work fine. The networking is ok.
For the problem image, it is ok when use docker to start it, but in openstack, it does not work.

Revision history for this message
hgangwx (hgangwx) wrote :

I met the same error on Kilo ubuntu 14.04, pull a ubuntu image( docker pull rastasheep/ubuntu-sshd), run this docker image(dock run -it rastasheep/ubuntu-sshd /bin/bash), after installed some softwares, e.g.

apt-get install curl
apt-get install apache2
a2enmod ssl
a2ensite default-ssl

then commit and save the image and add into openstack glance, but the new image can't be launched successfully, it is in ERROR state and give error "Cannot setup network: Cannot find any PID under container"

I tried it on Kilo Centos7 setup, there is no such issue, the new created image can be launched.

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.