haiyanmeng / runc

runc container cli tools
https://www.opencontainers.org/
Apache License 2.0
0 stars 0 forks source link

checkpoint is failing on Fedora 23 #1

Closed haiyanmeng closed 8 years ago

haiyanmeng commented 8 years ago

Currently the test suite of runc is based on a ubuntu docker image (runc/script/test_Dockerfile). I am trying to write a Dockerfile, runc/script/test_Dockerfile_1, for testing runc on fedora 23.

You can find test_Dockerfile_1 here: https://github.com/hmeng-19/logs/blob/master/test_Dockerfile_1 test_Dockerfile_1 tries to mimic the summary of the following two ubuntu-oriented Dockerfiles: 1) https://github.com/docker-library/golang/blob/d7e2a8d90a9b8f5dfd5bcd428e0c33b68c40cc19/1.5/alpine/Dockerfile 2) https://github.com/opencontainers/runc/blob/master/script/test_Dockerfile

The docker image is created successfully after docker build:

docker build -t runc_test:fedora -f script/test_Dockerfile_1 .

However, TestCheckpoint for checkpoint_test.go failed for both the test commands:

docker run -e TESTFLAGS -ti --privileged --rm -v /home/hmeng/go/src/github.com/hmeng-19/runc:/go/src/github.com/opencontainers/runc runc_test:fedora make localunittest
docker run -e TESTFLAGS -t --privileged --rm -v /home/hmeng/go/src/github.com/hmeng-19/runc:/go/src/github.com/opencontainers/runc runc_test:fedora make localintegration

The output of docker run .... make localunittest is here: https://github.com/hmeng-19/logs/blob/master/localunittest.log . The failure happened at TestCheckpoint, starting from line 267.

The output of docker run .... make localintegration is here: https://github.com/hmeng-19/logs/blob/master/localintegration.log . The 3rd test failed.

Clearly, both of these two failures are related to checkpoint and restore function of runc. As for as I see, there may have two reasons for the failure: 1) The test_Dockerfile_1 file does not completely mimic the original ubuntu-oriented test_Dockerfile. This may happen because some packages mentioned in ubuntu-version Dockerfile, such as build-essential and python-minimal are difficult to mapped to fedora packages.

2) The setting of fedora:23 docker image relavant to the checkpointing and restoring function does not match the setting on ubuntu.

3) Some other reasons I did not realize?

haiyanmeng commented 8 years ago

@mrunalp, @rhatdan , I moved this issue to my own fork. Hope it does not create too much confusion on the upstream.

haiyanmeng commented 8 years ago

@rhatdan , the test using the default Ubuntu Dockerfile can finish successfully on my Fedora system.

docker run -e TESTFLAGS -ti --privileged --rm -v /home/hmeng/go/src/github.com/hmeng-19/runc:/go/src/github.com/opencontainers/runc runc_test make localunittest
docker run -e TESTFLAGS -t --privileged --rm -v /home/hmeng/go/src/github.com/hmeng-19/runc:/go/src/github.com/opencontainers/runc runc_test make localintegration
rhatdan commented 8 years ago

Ok lets look at this on Monday.

haiyanmeng commented 8 years ago

@rhatdan , the problem was solved. I double-checked all the dependencies listed on the criu's installation page (https://criu.org/Installation), and added the following deps into test_Dockerfile_fedora. However, I think the real deps we were missing yesterday is libnl3 and libnl3-devel.

libnl3 
libnl3-devel 
glibc-devel.i686 
iproute 
protobuf-c
protobuf-python 
python-ipaddr
mrunalp commented 8 years ago

Nice!

Sent from my iPhone

On Jun 7, 2016, at 7:25 AM, hmeng-19 notifications@github.com wrote:

@rhatdan , the problem was solved. I double-checked all the dependencies listed on the criu's installation page (https://criu.org/Installation), and added the following deps into test_Dockerfile_fedora. However, I think the real deps we were missing yesterday is libnl3 and libnl3-devel.

libnl3 libnl3-devel glibc-devel.i686 iproute protobuf-c protobuf-python python-ipaddr — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

rhatdan commented 8 years ago

Awesome job. Now show me it working on RHEL and Centos. :^)

Then we have to talk about whether we want to have this happen by default like we do with docker.

haiyanmeng commented 8 years ago

As for RHEL docker images, do we have some internal package repository I can use? Running yum install <package_name> inside a docker RHEL container fails without registering the RHEL correctly:

+ yum -y install bash ca-certificates gcc glibc-devel glibc-devel.i686 make openssl tar wget
Loaded plugins: fastestmirror
Determining fastest mirrors
There are no enabled repos.
 Run "yum repolist all" to see the repos you have.
  You can enable repos with yum-config-manager --enable <repo>
haiyanmeng commented 8 years ago

Currently I am pulling the base RHEL7 docker image from docker.io/thezxm/redhat7:latest. Do we have some image registry where I should pull the base RHEL docker image from?

rhatdan commented 8 years ago

On 06/07/2016 05:22 PM, hmeng-19 wrote:

Currently I am pulling the base RHEL7 docker image from |docker.io/thezxm/redhat7:latest|. Do we have some image registry where I should pull the base RHEL docker image from?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/hmeng-19/runc/issues/1#issuecomment-224418659, or mute the thread https://github.com/notifications/unsubscribe/AB6Hw7LvSY-0I44m6fHbAYNlAMoBKjZlks5qJeEUgaJpZM4ItvHZ.

You need to setup credentials via rhn to test this.

haiyanmeng commented 8 years ago

@rhatdan , I am not sure I caught your point.

According to https://access.redhat.com/documentation/en/red-hat-enterprise-linux-atomic-host/version-7/getting-started-with-containers/#get_started_with_docker_formatted_container_images, it seems that the host should be RHEL 7 and register properly to support Docker RHEL images.

Using the RHEL 7 subscription model, if you want to create Docker images or
containers, you must properly register and entitle the host computer on which
you build them. When you use yum install within a container to add packages,
the container automatically has access to entitlements available from the RHEL
7 host, so it can get RPM packages from any repository enabled on that host.
haiyanmeng commented 8 years ago

@rhatdan , @mrunalp , considering I do not have a RHEL 7 server to work on, I plan to give RHEL 7 atomic host a try following the instruction here https://access.redhat.com/documentation/en/red-hat-enterprise-linux-atomic-host/7/installation-and-configuration-guide .

Let me know if this is the right thing to do.

mrunalp commented 8 years ago

You can try to use this http://developers.redhat.com/blog/2016/03/31/no-cost-rhel-developer-subscription-now-available/

Sent from my iPhone

On Jun 8, 2016, at 8:35 AM, hmeng-19 notifications@github.com wrote:

@rhatdan , @mrunalp , considering I do not have a RHEL 7 server to work on, I plan to give RHEL 7 atomic host a try following the instruction here https://access.redhat.com/documentation/en/red-hat-enterprise-linux-atomic-host/7/installation-and-configuration-guide .

Let me know if this is the right thing to do.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

haiyanmeng commented 8 years ago

It seems that runc starts using golang 1.6. My next step will be update the test_Dockerfile_fedora to use golang 1.6.

haiyanmeng commented 8 years ago

@mrunalp , I tried running the tests of runc the RHEL 7 provided by http://developers.redhat.com/products/rhel/get-started/#tab-kvm . Even the test_Dockerfile for ubuntu failed with some errors about nsenter on RHEL 7 virtual machine. However, these tests work fine on my own machine.

For now, I plan to focus on test_Dockerfile_fedora and test_Docker_centos. Sounds good?

mrunalp commented 8 years ago

@hmeng-19 I have created PRs to runc for both the test failures that you reported in #2 Thanks!

mrunalp commented 8 years ago

@hmeng-19 Can you create an issue for what errors you are seeing on RHEL 7? I can take a look. Also, meanwhile making progress on test_Dockerfile_fedora and test_Docker_centos sounds good.

haiyanmeng commented 8 years ago

@mrunalp , sounds good. Thanks for the quick fixing. The runc test inside my RHEL 7 VM today broke the VM heavily, I plan to reinstall the RHEL 7 VM and test the new runc master after your PRs are merged into the master tomorrow.

haiyanmeng commented 8 years ago

@mrunalp , I filed the problem I met during the execution of make test on a RHEL 7 VM at #4 .