summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile8
-rw-r--r--contrib/python/podman/test/podman_testcase.py1
-rwxr-xr-xcontrib/python/podman/test/test_runner.sh1
-rw-r--r--libpod.conf2
-rw-r--r--libpod/runtime.go2
-rw-r--r--test/e2e/libpod_suite_test.go11
6 files changed, 17 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index e3baeddff..c87d09a3b 100644
--- a/Makefile
+++ b/Makefile
@@ -148,10 +148,10 @@ dbuild: libpodimage
docker run --name=${LIBPOD_INSTANCE} --privileged ${LIBPOD_IMAGE} -v ${PWD}:/go/src/${PROJECT} --rm ${ENTRYPOINT} make binaries
test: libpodimage
- docker run -e STORAGE_OPTIONS="--storage-driver=vfs" -e TESTFLAGS -e TRAVIS -t --privileged --rm -v ${CURDIR}:/go/src/${PROJECT} ${LIBPOD_IMAGE} ${ENTRYPOINT} make clean all localunit localintegration
+ docker run -e STORAGE_OPTIONS="--storage-driver=vfs" -e TESTFLAGS -e CGROUP_MANAGER=cgroupfs -e TRAVIS -t --privileged --rm -v ${CURDIR}:/go/src/${PROJECT} ${LIBPOD_IMAGE} ${ENTRYPOINT} make clean all localunit localintegration
integration: libpodimage
- docker run -e STORAGE_OPTIONS="--storage-driver=vfs" -e TESTFLAGS -e TRAVIS -t --privileged --rm -v ${CURDIR}:/go/src/${PROJECT} ${LIBPOD_IMAGE} ${ENTRYPOINT} make clean all localintegration
+ docker run -e STORAGE_OPTIONS="--storage-driver=vfs" -e TESTFLAGS -e CGROUP_MANAGER=cgroupfs -e TRAVIS -t --privileged --rm -v ${CURDIR}:/go/src/${PROJECT} ${LIBPOD_IMAGE} ${ENTRYPOINT} make clean all localintegration
integration.fedora:
DIST=Fedora sh .papr_prepare.sh
@@ -160,10 +160,10 @@ integration.centos:
DIST=CentOS sh .papr_prepare.sh
shell: libpodimage
- docker run --tmpfs -e STORAGE_OPTIONS="--storage-driver=vfs" -e TESTFLAGS -e TRAVIS -it --privileged --rm -v ${CURDIR}:/go/src/${PROJECT} ${LIBPOD_IMAGE} ${ENTRYPOINT} sh
+ docker run --tmpfs -e STORAGE_OPTIONS="--storage-driver=vfs" -e CGROUP_MANAGER=cgroupfs -e TESTFLAGS -e TRAVIS -it --privileged --rm -v ${CURDIR}:/go/src/${PROJECT} ${LIBPOD_IMAGE} ${ENTRYPOINT} sh
testunit: libpodimage
- docker run -e STORAGE_OPTIONS="--storage-driver=vfs" -e TESTFLAGS -e TRAVIS -t --privileged --rm -v ${CURDIR}:/go/src/${PROJECT} ${LIBPOD_IMAGE} ${ENTRYPOINT} make localunit
+ docker run -e STORAGE_OPTIONS="--storage-driver=vfs" -e TESTFLAGS -e CGROUP_MANAGER=cgroupfs -e TRAVIS -t --privileged --rm -v ${CURDIR}:/go/src/${PROJECT} ${LIBPOD_IMAGE} ${ENTRYPOINT} make localunit
localunit: varlink_generate
$(GO) test -tags "$(BUILDTAGS)" -cover $(PACKAGES)
diff --git a/contrib/python/podman/test/podman_testcase.py b/contrib/python/podman/test/podman_testcase.py
index f96a3a013..731fa26fc 100644
--- a/contrib/python/podman/test/podman_testcase.py
+++ b/contrib/python/podman/test/podman_testcase.py
@@ -39,6 +39,7 @@ class PodmanTestCase(unittest.TestCase):
tmpdir = os.environ.get('TMPDIR', '/tmp')
podman_args = [
'--storage-driver=vfs',
+ '--cgroup-manager=cgroupfs',
'--root={}/crio'.format(tmpdir),
'--runroot={}/crio-run'.format(tmpdir),
'--cni-config-dir={}/cni/net.d'.format(tmpdir),
diff --git a/contrib/python/podman/test/test_runner.sh b/contrib/python/podman/test/test_runner.sh
index 4afbc260f..c37d9cf6e 100755
--- a/contrib/python/podman/test/test_runner.sh
+++ b/contrib/python/podman/test/test_runner.sh
@@ -111,6 +111,7 @@ PODMAN_ARGS="--storage-driver=vfs \
--root=${TMPDIR}/crio \
--runroot=${TMPDIR}/crio-run \
--cni-config-dir=$CNI_CONFIG_PATH \
+ --cgroup-manager=cgroupfs \
"
if [[ -n $VERBOSE ]]; then
PODMAN_ARGS="$PODMAN_ARGS --log-level=$LOG_LEVEL"
diff --git a/libpod.conf b/libpod.conf
index 3a363e256..cef5a12d8 100644
--- a/libpod.conf
+++ b/libpod.conf
@@ -30,7 +30,7 @@ conmon_env_vars = [
]
# CGroup Manager - valid values are "systemd" and "cgroupfs"
-cgroup_manager = "cgroupfs"
+cgroup_manager = "systemd"
# Directory for persistent libpod files (database, etc)
# By default, this will be configured relative to where containers/storage
diff --git a/libpod/runtime.go b/libpod/runtime.go
index 3f5d56c4f..2fc10035e 100644
--- a/libpod/runtime.go
+++ b/libpod/runtime.go
@@ -178,7 +178,7 @@ var (
ConmonEnvVars: []string{
"PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
},
- CgroupManager: CgroupfsCgroupsManager,
+ CgroupManager: SystemdCgroupsManager,
HooksDir: hooks.DefaultDir,
StaticDir: filepath.Join(storage.DefaultStoreOptions.GraphRoot, "libpod"),
TmpDir: "",
diff --git a/test/e2e/libpod_suite_test.go b/test/e2e/libpod_suite_test.go
index 3b7953672..1b0c16e4a 100644
--- a/test/e2e/libpod_suite_test.go
+++ b/test/e2e/libpod_suite_test.go
@@ -29,6 +29,7 @@ var (
CNI_CONFIG_DIR string
RUNC_BINARY string
INTEGRATION_ROOT string
+ CGROUP_MANAGER = "systemd"
STORAGE_OPTIONS = "--storage-driver vfs"
ARTIFACT_DIR = "/tmp/.artifacts"
CACHE_IMAGES = []string{ALPINE, BB, fedoraMinimal, nginx, redis, registry}
@@ -60,6 +61,7 @@ type PodmanTest struct {
SignaturePolicyPath string
ArtifactPath string
TempDir string
+ CgroupManager string
}
// HostOS is a simple struct for the test os
@@ -141,6 +143,10 @@ func PodmanCreate(tempDir string) PodmanTest {
if os.Getenv("STORAGE_OPTIONS") != "" {
storageOptions = os.Getenv("STORAGE_OPTIONS")
}
+ cgroupManager := CGROUP_MANAGER
+ if os.Getenv("CGROUP_MANAGER") != "" {
+ cgroupManager = os.Getenv("CGROUP_MANAGER")
+ }
runCBinary := "/usr/bin/runc"
CNIConfigDir := "/etc/cni/net.d"
@@ -156,6 +162,7 @@ func PodmanCreate(tempDir string) PodmanTest {
SignaturePolicyPath: filepath.Join(INTEGRATION_ROOT, "test/policy.json"),
ArtifactPath: ARTIFACT_DIR,
TempDir: tempDir,
+ CgroupManager: cgroupManager,
}
// Setup registries.conf ENV variable
@@ -165,8 +172,8 @@ func PodmanCreate(tempDir string) PodmanTest {
//MakeOptions assembles all the podman main options
func (p *PodmanTest) MakeOptions() []string {
- return strings.Split(fmt.Sprintf("--root %s --runroot %s --runtime %s --conmon %s --cni-config-dir %s",
- p.CrioRoot, p.RunRoot, p.RunCBinary, p.ConmonBinary, p.CNIConfigDir), " ")
+ return strings.Split(fmt.Sprintf("--root %s --runroot %s --runtime %s --conmon %s --cni-config-dir %s --cgroup-manager %s",
+ p.CrioRoot, p.RunRoot, p.RunCBinary, p.ConmonBinary, p.CNIConfigDir, p.CgroupManager), " ")
}
// Podman is the exec call to podman on the filesystem, uid and gid the credentials to use