mirror of
https://github.com/containers/podman.git
synced 2025-05-20 00:27:03 +08:00
Update the version of conmon used in test
Also start using podmin in /usr/libexec/podman rather then crio. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #979 Approved by: baude
This commit is contained in:

committed by
Atomic Bot

parent
4ad7e73681
commit
2c81a756e3
@ -14,4 +14,4 @@ fi
|
|||||||
${CONTAINER_RUNTIME} build -t ${IMAGE} -f Dockerfile.${DIST} . 2>build.log
|
${CONTAINER_RUNTIME} build -t ${IMAGE} -f Dockerfile.${DIST} . 2>build.log
|
||||||
|
|
||||||
# Run the tests
|
# Run the tests
|
||||||
${CONTAINER_RUNTIME} run --rm --privileged --net=host -v $PWD:/go/src/github.com/projectatomic/libpod --workdir /go/src/github.com/projectatomic/libpod -e PYTHON=$PYTHON -e STORAGE_OPTIONS="--storage-driver=vfs" -e CRIO_ROOT="/go/src/github.com/projectatomic/libpod" -e PODMAN_BINARY="/usr/bin/podman" -e CONMON_BINARY="/usr/libexec/crio/conmon" -e DIST=$DIST $IMAGE sh .papr.sh
|
${CONTAINER_RUNTIME} run --rm --privileged --net=host -v $PWD:/go/src/github.com/projectatomic/libpod --workdir /go/src/github.com/projectatomic/libpod -e PYTHON=$PYTHON -e STORAGE_OPTIONS="--storage-driver=vfs" -e CRIO_ROOT="/go/src/github.com/projectatomic/libpod" -e PODMAN_BINARY="/usr/bin/podman" -e CONMON_BINARY="/usr/libexec/podman/conmon" -e DIST=$DIST $IMAGE sh .papr.sh
|
||||||
|
20
Dockerfile
20
Dockerfile
@ -1,4 +1,4 @@
|
|||||||
FROM golang:1.8
|
FROM golang:1.10
|
||||||
|
|
||||||
RUN echo 'deb http://httpredir.debian.org/debian jessie-backports main' > /etc/apt/sources.list.d/backports.list
|
RUN echo 'deb http://httpredir.debian.org/debian jessie-backports main' > /etc/apt/sources.list.d/backports.list
|
||||||
|
|
||||||
@ -37,6 +37,7 @@ RUN apt-get update && apt-get install -y \
|
|||||||
socat \
|
socat \
|
||||||
python3-pip \
|
python3-pip \
|
||||||
python3-dateutil \
|
python3-dateutil \
|
||||||
|
python3-setuptools \
|
||||||
--no-install-recommends \
|
--no-install-recommends \
|
||||||
&& apt-get clean
|
&& apt-get clean
|
||||||
|
|
||||||
@ -44,16 +45,8 @@ ADD . /go/src/github.com/projectatomic/libpod
|
|||||||
|
|
||||||
RUN set -x && cd /go/src/github.com/projectatomic/libpod && make install.libseccomp.sudo
|
RUN set -x && cd /go/src/github.com/projectatomic/libpod && make install.libseccomp.sudo
|
||||||
|
|
||||||
# install criu
|
|
||||||
ENV CRIU_VERSION 1.7
|
|
||||||
RUN mkdir -p /usr/src/criu \
|
|
||||||
&& curl -sSL https://github.com/xemul/criu/archive/v${CRIU_VERSION}.tar.gz | tar -v -C /usr/src/criu/ -xz --strip-components=1 \
|
|
||||||
&& cd /usr/src/criu \
|
|
||||||
&& make install-criu \
|
|
||||||
&& rm -rf /usr/src/criu
|
|
||||||
|
|
||||||
# Install runc
|
# Install runc
|
||||||
ENV RUNC_COMMIT 0cbfd8392fff2462701507296081e835b3b0b99a
|
ENV RUNC_COMMIT ad0f5255060d36872be04de22f8731f38ef2d7b1
|
||||||
RUN set -x \
|
RUN set -x \
|
||||||
&& export GOPATH="$(mktemp -d)" \
|
&& export GOPATH="$(mktemp -d)" \
|
||||||
&& git clone https://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \
|
&& git clone https://github.com/opencontainers/runc.git "$GOPATH/src/github.com/opencontainers/runc" \
|
||||||
@ -65,16 +58,15 @@ RUN set -x \
|
|||||||
&& rm -rf "$GOPATH"
|
&& rm -rf "$GOPATH"
|
||||||
|
|
||||||
# Install conmon
|
# Install conmon
|
||||||
ENV CRIO_COMMIT 814c6ab0913d827543696b366048056a31d9529c
|
ENV CRIO_COMMIT 66788a10e57f42faf741c2f149d0ee6635063014
|
||||||
RUN set -x \
|
RUN set -x \
|
||||||
&& export GOPATH="$(mktemp -d)" \
|
&& export GOPATH="$(mktemp -d)" \
|
||||||
&& git clone https://github.com/kubernetes-incubator/cri-o.git "$GOPATH/src/github.com/kubernetes-incubator/cri-o.git" \
|
&& git clone https://github.com/kubernetes-incubator/cri-o.git "$GOPATH/src/github.com/kubernetes-incubator/cri-o.git" \
|
||||||
&& cd "$GOPATH/src/github.com/kubernetes-incubator/cri-o.git" \
|
&& cd "$GOPATH/src/github.com/kubernetes-incubator/cri-o.git" \
|
||||||
&& git fetch origin --tags \
|
&& git fetch origin --tags \
|
||||||
&& git checkout -q "$CRIO_COMMIT" \
|
&& git checkout -q "$CRIO_COMMIT" \
|
||||||
&& mkdir bin \
|
&& make \
|
||||||
&& make conmon \
|
&& install -D -m 755 bin/conmon /usr/libexec/podman/conmon \
|
||||||
&& install -D -m 755 bin/conmon /usr/libexec/crio/conmon \
|
|
||||||
&& rm -rf "$GOPATH"
|
&& rm -rf "$GOPATH"
|
||||||
|
|
||||||
# Install CNI plugins
|
# Install CNI plugins
|
||||||
|
@ -6,6 +6,7 @@ RUN yum -y install btrfs-progs-devel \
|
|||||||
device-mapper-devel \
|
device-mapper-devel \
|
||||||
findutils \
|
findutils \
|
||||||
git \
|
git \
|
||||||
|
glibc-static \
|
||||||
glib2-devel \
|
glib2-devel \
|
||||||
gnupg \
|
gnupg \
|
||||||
golang \
|
golang \
|
||||||
@ -56,16 +57,16 @@ RUN set -x \
|
|||||||
&& go get github.com/onsi/gomega/...
|
&& go get github.com/onsi/gomega/...
|
||||||
|
|
||||||
# Install conmon
|
# Install conmon
|
||||||
ENV CRIO_COMMIT 814c6ab0913d827543696b366048056a31d9529c
|
ENV CRIO_COMMIT 66788a10e57f42faf741c2f149d0ee6635063014
|
||||||
RUN set -x \
|
RUN set -x \
|
||||||
&& export GOPATH="$(mktemp -d)" \
|
&& export GOPATH="$(mktemp -d)" \
|
||||||
&& git clone https://github.com/kubernetes-incubator/cri-o.git "$GOPATH/src/github.com/kubernetes-incubator/cri-o.git" \
|
&& git clone https://github.com/kubernetes-incubator/cri-o.git "$GOPATH/src/github.com/kubernetes-incubator/cri-o.git" \
|
||||||
&& cd "$GOPATH/src/github.com/kubernetes-incubator/cri-o.git" \
|
&& cd "$GOPATH/src/github.com/kubernetes-incubator/cri-o.git" \
|
||||||
&& git fetch origin --tags \
|
&& git fetch origin --tags \
|
||||||
&& git checkout -q "$CRIO_COMMIT" \
|
&& git checkout -q "$CRIO_COMMIT" \
|
||||||
&& mkdir bin \
|
&& make \
|
||||||
&& make conmon \
|
&& make bin/conmon \
|
||||||
&& install -D -m 755 bin/conmon /usr/libexec/crio/conmon \
|
&& install -D -m 755 bin/conmon /usr/libexec/podman/conmon \
|
||||||
&& rm -rf "$GOPATH"
|
&& rm -rf "$GOPATH"
|
||||||
|
|
||||||
# Install cni config
|
# Install cni config
|
||||||
|
@ -8,6 +8,7 @@ RUN dnf -y install btrfs-progs-devel \
|
|||||||
findutils \
|
findutils \
|
||||||
git \
|
git \
|
||||||
glib2-devel \
|
glib2-devel \
|
||||||
|
glibc-static \
|
||||||
gnupg \
|
gnupg \
|
||||||
golang \
|
golang \
|
||||||
golang-github-cpuguy83-go-md2man \
|
golang-github-cpuguy83-go-md2man \
|
||||||
@ -58,16 +59,16 @@ RUN set -x \
|
|||||||
&& go get github.com/onsi/gomega/...
|
&& go get github.com/onsi/gomega/...
|
||||||
|
|
||||||
# Install conmon
|
# Install conmon
|
||||||
ENV CRIO_COMMIT 814c6ab0913d827543696b366048056a31d9529c
|
ENV CRIO_COMMIT 66788a10e57f42faf741c2f149d0ee6635063014
|
||||||
RUN set -x \
|
RUN set -x \
|
||||||
&& export GOPATH="$(mktemp -d)" \
|
&& export GOPATH="$(mktemp -d)" \
|
||||||
&& git clone https://github.com/kubernetes-incubator/cri-o.git "$GOPATH/src/github.com/kubernetes-incubator/cri-o.git" \
|
&& git clone https://github.com/kubernetes-incubator/cri-o.git "$GOPATH/src/github.com/kubernetes-incubator/cri-o.git" \
|
||||||
&& cd "$GOPATH/src/github.com/kubernetes-incubator/cri-o.git" \
|
&& cd "$GOPATH/src/github.com/kubernetes-incubator/cri-o.git" \
|
||||||
&& git fetch origin --tags \
|
&& git fetch origin --tags \
|
||||||
&& git checkout -q "$CRIO_COMMIT" \
|
&& git checkout -q "$CRIO_COMMIT" \
|
||||||
&& mkdir bin \
|
&& make \
|
||||||
&& make conmon \
|
&& make bin/conmon \
|
||||||
&& install -D -m 755 bin/conmon /usr/libexec/crio/conmon \
|
&& install -D -m 755 bin/conmon /usr/libexec/podman/conmon \
|
||||||
&& rm -rf "$GOPATH"
|
&& rm -rf "$GOPATH"
|
||||||
|
|
||||||
# Install cni config
|
# Install cni config
|
||||||
|
@ -80,7 +80,7 @@ BuildRequires: runc
|
|||||||
BuildRequires: skopeo-containers
|
BuildRequires: skopeo-containers
|
||||||
Requires: runc
|
Requires: runc
|
||||||
Requires: skopeo-containers
|
Requires: skopeo-containers
|
||||||
Requires: conmon
|
Requires: conmon >= 1.10.1
|
||||||
Requires: iptables
|
Requires: iptables
|
||||||
Requires: containernetworking-cni
|
Requires: containernetworking-cni
|
||||||
Requires: atomic-registries
|
Requires: atomic-registries
|
||||||
|
@ -54,7 +54,7 @@ $ sudo apt-get install libdevmapper-dev libglib2.0-dev libgpgme11-dev golang lib
|
|||||||
# cd ~/src/github.com/kubernetes-incubator/cri-o
|
# cd ~/src/github.com/kubernetes-incubator/cri-o
|
||||||
# mkdir bin
|
# mkdir bin
|
||||||
# make conmon
|
# make conmon
|
||||||
$ sudo install -D -m 755 bin/conmon /usr/libexec/crio/conmon
|
$ sudo install -D -m 755 bin/conmon /usr/libexec/podman/conmon
|
||||||
```
|
```
|
||||||
#### Adding required configuration files
|
#### Adding required configuration files
|
||||||
```
|
```
|
||||||
|
@ -28,7 +28,7 @@ import (
|
|||||||
"github.com/projectatomic/libpod/pkg/inspect"
|
"github.com/projectatomic/libpod/pkg/inspect"
|
||||||
)
|
)
|
||||||
|
|
||||||
// - CRIO_ROOT=/var/tmp/checkout PODMAN_BINARY=/usr/bin/podman CONMON_BINARY=/usr/libexec/crio/conmon PAPR=1 sh .papr.sh
|
// - CRIO_ROOT=/var/tmp/checkout PODMAN_BINARY=/usr/bin/podman CONMON_BINARY=/usr/libexec/podman/conmon PAPR=1 sh .papr.sh
|
||||||
// PODMAN_OPTIONS="--root $TESTDIR/crio $STORAGE_OPTIONS --runroot $TESTDIR/crio-run --runtime ${RUNTIME_BINARY} --conmon ${CONMON_BINARY} --cni-config-dir ${LIBPOD_CNI_CONFIG}"
|
// PODMAN_OPTIONS="--root $TESTDIR/crio $STORAGE_OPTIONS --runroot $TESTDIR/crio-run --runtime ${RUNTIME_BINARY} --conmon ${CONMON_BINARY} --cni-config-dir ${LIBPOD_CNI_CONFIG}"
|
||||||
|
|
||||||
//TODO do the image caching
|
//TODO do the image caching
|
||||||
@ -131,7 +131,7 @@ func PodmanCreate(tempDir string) PodmanTest {
|
|||||||
if os.Getenv("PODMAN_BINARY") != "" {
|
if os.Getenv("PODMAN_BINARY") != "" {
|
||||||
podmanBinary = os.Getenv("PODMAN_BINARY")
|
podmanBinary = os.Getenv("PODMAN_BINARY")
|
||||||
}
|
}
|
||||||
conmonBinary := filepath.Join("/usr/libexec/crio/conmon")
|
conmonBinary := filepath.Join("/usr/libexec/podman/conmon")
|
||||||
altConmonBinary := "/usr/libexec/podman/conmon"
|
altConmonBinary := "/usr/libexec/podman/conmon"
|
||||||
if _, err := os.Stat(altConmonBinary); err == nil {
|
if _, err := os.Stat(altConmonBinary); err == nil {
|
||||||
conmonBinary = altConmonBinary
|
conmonBinary = altConmonBinary
|
||||||
|
@ -46,16 +46,17 @@ var _ = Describe("Podman run ns", func() {
|
|||||||
})
|
})
|
||||||
|
|
||||||
It("podman run ipcns test", func() {
|
It("podman run ipcns test", func() {
|
||||||
setup := podmanTest.SystemExec("mktemp", []string{"/dev/shm/podmantest.XXXX)"})
|
testFile := "/dev/shm/podmantest"
|
||||||
|
setup := podmanTest.SystemExec("touch", []string{testFile})
|
||||||
setup.WaitWithDefaultTimeout()
|
setup.WaitWithDefaultTimeout()
|
||||||
Expect(setup.ExitCode()).To(Equal(0))
|
Expect(setup.ExitCode()).To(Equal(0))
|
||||||
|
|
||||||
session := podmanTest.Podman([]string{"run", "--ipc=host", fedoraMinimal, "ls", setup.OutputToString()})
|
session := podmanTest.Podman([]string{"run", "--ipc=host", fedoraMinimal, "ls", testFile})
|
||||||
session.WaitWithDefaultTimeout()
|
session.WaitWithDefaultTimeout()
|
||||||
Expect(session.ExitCode()).To(Equal(0))
|
Expect(session.ExitCode()).To(Equal(0))
|
||||||
Expect(session.OutputToString()).To(ContainSubstring(setup.OutputToString()))
|
Expect(session.OutputToString()).To(ContainSubstring(testFile))
|
||||||
|
|
||||||
err := os.Remove(setup.OutputToString())
|
err := os.Remove(testFile)
|
||||||
Expect(err).To(BeNil())
|
Expect(err).To(BeNil())
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -133,7 +133,7 @@ var _ = Describe("Podman run with --sig-proxy", func() {
|
|||||||
Expect(killSession.ExitCode()).To(Equal(0))
|
Expect(killSession.ExitCode()).To(Equal(0))
|
||||||
|
|
||||||
session.WaitWithDefaultTimeout()
|
session.WaitWithDefaultTimeout()
|
||||||
Expect(session.ExitCode()).To(Equal(0))
|
Expect(session.ExitCode()).To(Equal(137))
|
||||||
ok, _ = session.GrepString(fmt.Sprintf("Received %d", signal))
|
ok, _ = session.GrepString(fmt.Sprintf("Received %d", signal))
|
||||||
Expect(ok).To(BeFalse())
|
Expect(ok).To(BeFalse())
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user