Merge pull request #517 from mrunalp/rename_fixes

Fix remnants of ocid -> crio rename
This commit is contained in:
Antonio Murdaca 2017-05-16 10:06:15 +02:00 committed by GitHub
commit 1cc5a27f38
11 changed files with 77 additions and 77 deletions

View file

@ -3,14 +3,14 @@ EPOCH_TEST_COMMIT ?= 78aae688e2932f0cfc2a23e28ad30b58c6b8577f
PROJECT := github.com/kubernetes-incubator/cri-o PROJECT := github.com/kubernetes-incubator/cri-o
GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD 2>/dev/null) GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD 2>/dev/null)
GIT_BRANCH_CLEAN := $(shell echo $(GIT_BRANCH) | sed -e "s/[^[:alnum:]]/-/g") GIT_BRANCH_CLEAN := $(shell echo $(GIT_BRANCH) | sed -e "s/[^[:alnum:]]/-/g")
OCID_IMAGE := crio_dev$(if $(GIT_BRANCH_CLEAN),:$(GIT_BRANCH_CLEAN)) CRIO_IMAGE := crio_dev$(if $(GIT_BRANCH_CLEAN),:$(GIT_BRANCH_CLEAN))
OCID_INSTANCE := crio_dev CRIO_INSTANCE := crio_dev
PREFIX ?= ${DESTDIR}/usr/local PREFIX ?= ${DESTDIR}/usr/local
BINDIR ?= ${PREFIX}/bin BINDIR ?= ${PREFIX}/bin
LIBEXECDIR ?= ${PREFIX}/libexec LIBEXECDIR ?= ${PREFIX}/libexec
MANDIR ?= ${PREFIX}/share/man MANDIR ?= ${PREFIX}/share/man
ETCDIR ?= ${DESTDIR}/etc ETCDIR ?= ${DESTDIR}/etc
ETCDIR_OCID ?= ${ETCDIR}/crio ETCDIR_CRIO ?= ${ETCDIR}/crio
BUILDTAGS := selinux seccomp $(shell hack/btrfs_tag.sh) $(shell hack/libdm_tag.sh) BUILDTAGS := selinux seccomp $(shell hack/btrfs_tag.sh) $(shell hack/libdm_tag.sh)
BASHINSTALLDIR=${PREFIX}/share/bash-completion/completions BASHINSTALLDIR=${PREFIX}/share/bash-completion/completions
@ -99,13 +99,13 @@ endif
rm -f test/checkseccomp/checkseccomp rm -f test/checkseccomp/checkseccomp
crioimage: crioimage:
docker build -t ${OCID_IMAGE} . docker build -t ${CRIO_IMAGE} .
dbuild: crioimage dbuild: crioimage
docker run --name=${OCID_INSTANCE} --privileged ${OCID_IMAGE} -v ${PWD}:/go/src/${PROJECT} --rm make binaries docker run --name=${CRIO_INSTANCE} --privileged ${CRIO_IMAGE} -v ${PWD}:/go/src/${PROJECT} --rm make binaries
integration: crioimage integration: crioimage
docker run -e TESTFLAGS -e TRAVIS -t --privileged --rm -v ${CURDIR}:/go/src/${PROJECT} ${OCID_IMAGE} make localintegration docker run -e TESTFLAGS -e TRAVIS -t --privileged --rm -v ${CURDIR}:/go/src/${PROJECT} ${CRIO_IMAGE} make localintegration
localintegration: clean binaries localintegration: clean binaries
./test/test_runner.sh ${TESTFLAGS} ./test/test_runner.sh ${TESTFLAGS}
@ -140,8 +140,8 @@ install: .gopathok
install -m 644 $(filter %.8,$(MANPAGES)) -t $(MANDIR)/man8 install -m 644 $(filter %.8,$(MANPAGES)) -t $(MANDIR)/man8
install.config: install.config:
install -D -m 644 crio.conf $(ETCDIR_OCID)/crio.conf install -D -m 644 crio.conf $(ETCDIR_CRIO)/crio.conf
install -D -m 644 seccomp.json $(ETCDIR_OCID)/seccomp.json install -D -m 644 seccomp.json $(ETCDIR_CRIO)/seccomp.json
install.completions: install.completions:
install -d -m 755 ${BASHINSTALLDIR} install -d -m 755 ${BASHINSTALLDIR}

View file

@ -12,11 +12,11 @@ var commentedConfigTemplate = template.Must(template.New("config").Parse(`
# The "crio" table contains all of the server options. # The "crio" table contains all of the server options.
[crio] [crio]
# root is a path to the "root directory". OCID stores all of its data, # root is a path to the "root directory". CRIO stores all of its data,
# including container images, in this directory. # including container images, in this directory.
root = "{{ .Root }}" root = "{{ .Root }}"
# run is a path to the "run directory". OCID stores all of its state # run is a path to the "run directory". CRIO stores all of its state
# in this directory. # in this directory.
runroot = "{{ .RunRoot }}" runroot = "{{ .RunRoot }}"

View file

@ -20,7 +20,7 @@ import (
"k8s.io/kubernetes/pkg/kubelet/api/v1alpha1/runtime" "k8s.io/kubernetes/pkg/kubelet/api/v1alpha1/runtime"
) )
const ociConfigPath = "/etc/crio/crio.conf" const crioConfigPath = "/etc/crio/crio.conf"
func mergeConfig(config *server.Config, ctx *cli.Context) error { func mergeConfig(config *server.Config, ctx *cli.Context) error {
// Don't parse the config if the user explicitly set it to "". // Don't parse the config if the user explicitly set it to "".
@ -33,7 +33,7 @@ func mergeConfig(config *server.Config, ctx *cli.Context) error {
// We don't error out if --config wasn't explicitly set and the // We don't error out if --config wasn't explicitly set and the
// default doesn't exist. But we will log a warning about it, so // default doesn't exist. But we will log a warning about it, so
// the user doesn't miss it. // the user doesn't miss it.
logrus.Warnf("default configuration file does not exist: %s", ociConfigPath) logrus.Warnf("default configuration file does not exist: %s", crioConfigPath)
} }
} }
@ -127,7 +127,7 @@ func main() {
app.Flags = []cli.Flag{ app.Flags = []cli.Flag{
cli.StringFlag{ cli.StringFlag{
Name: "config", Name: "config",
Value: ociConfigPath, Value: crioConfigPath,
Usage: "path to configuration file", Usage: "path to configuration file",
}, },
cli.StringFlag{ cli.StringFlag{

View file

@ -1,5 +1,5 @@
[Unit] [Unit]
Description=Shutdown OCID containers before shutting down the system Description=Shutdown CRIO containers before shutting down the system
Wants=crio.service Wants=crio.service
After=crio.service After=crio.service
Documentation=man:crio(8) Documentation=man:crio(8)

View file

@ -9,8 +9,8 @@ EnvironmentFile=-/etc/sysconfig/crio-storage
EnvironmentFile=-/etc/sysconfig/crio-network EnvironmentFile=-/etc/sysconfig/crio-network
Environment=GOTRACEBACK=crash Environment=GOTRACEBACK=crash
ExecStart=/usr/local/bin/crio \ ExecStart=/usr/local/bin/crio \
$OCID_STORAGE_OPTIONS \ $CRIO_STORAGE_OPTIONS \
$OCID_NETWORK_OPTIONS \ $CRIO_NETWORK_OPTIONS \
ExecReload=/bin/kill -s HUP $MAINPID ExecReload=/bin/kill -s HUP $MAINPID
TasksMax=8192 TasksMax=8192
LimitNOFILE=1048576 LimitNOFILE=1048576

View file

@ -81,10 +81,10 @@ crio is meant to provide an integration path between OCI conformant runtimes and
Image which contains the pause executable (default: "kubernetes/pause") Image which contains the pause executable (default: "kubernetes/pause")
**--root**="" **--root**=""
OCID root dir (default: "/var/lib/containers/storage") CRIO root dir (default: "/var/lib/containers/storage")
**--runroot**="" **--runroot**=""
OCID state dir (default: "/var/run/containers/storage") CRIO state dir (default: "/var/run/containers/storage")
**--runtime**="" **--runtime**=""
OCI runtime path (default: "/usr/bin/runc") OCI runtime path (default: "/usr/bin/runc")
@ -117,13 +117,13 @@ crio is meant to provide an integration path between OCI conformant runtimes and
Print the version Print the version
# COMMANDS # COMMANDS
OCID's default command is to start the daemon. However, it currently offers a CRIO's default command is to start the daemon. However, it currently offers a
single additional subcommand. single additional subcommand.
## config ## config
Outputs a commented version of the configuration file that would've been used Outputs a commented version of the configuration file that would've been used
by OCID. This allows you to save you current configuration setup and then load by CRIO. This allows you to save you current configuration setup and then load
it later with **--config**. Global options will modify the output. it later with **--config**. Global options will modify the output.
**--default** **--default**

View file

@ -3,10 +3,10 @@
% OCTOBER 2016 % OCTOBER 2016
# NAME # NAME
crio.conf - Syntax of OCID configuration file crio.conf - Syntax of CRIO configuration file
# DESCRIPTION # DESCRIPTION
The OCID configuration file specifies all of the available command-line options The CRIO configuration file specifies all of the available command-line options
for the crio(8) program, but in a TOML format that can be more easily modified for the crio(8) program, but in a TOML format that can be more easily modified
and versioned. and versioned.
@ -24,29 +24,29 @@ No bare options are used. The format of TOML can be simplified to:
[table.subtable2] [table.subtable2]
option = value option = value
## OCID TABLE ## CRIO TABLE
The `crio` table supports the following options: The `crio` table supports the following options:
**root**="" **root**=""
OCID root dir (default: "/var/lib/containers/storage") CRIO root dir (default: "/var/lib/containers/storage")
**runroot**="" **runroot**=""
OCID state dir (default: "/var/run/containers/storage") CRIO state dir (default: "/var/run/containers/storage")
**storage_driver**="" **storage_driver**=""
OCID storage driver (default is "devicemapper") CRIO storage driver (default is "devicemapper")
**storage_option**=[] **storage_option**=[]
OCID storage driver option list (no default) CRIO storage driver option list (no default)
## OCID.API TABLE ## CRIO.API TABLE
**listen**="" **listen**=""
Path to crio socket (default: "/var/run/crio.sock") Path to crio socket (default: "/var/run/crio.sock")
## OCID.RUNTIME TABLE ## CRIO.RUNTIME TABLE
**conmon**="" **conmon**=""
Path to the conmon executable (default: "/usr/local/libexec/crio/conmon") Path to the conmon executable (default: "/usr/local/libexec/crio/conmon")
@ -69,7 +69,7 @@ The `crio` table supports the following options:
**apparmor_profile**="" **apparmor_profile**=""
Name of the apparmor profile to be used as the runtime's default (default: "crio-default") Name of the apparmor profile to be used as the runtime's default (default: "crio-default")
## OCID.IMAGE TABLE ## CRIO.IMAGE TABLE
**default_transport** **default_transport**
A prefix to prepend to image names that can't be pulled as-is (default: "docker://") A prefix to prepend to image names that can't be pulled as-is (default: "docker://")
@ -80,7 +80,7 @@ The `crio` table supports the following options:
**pause_image**="" **pause_image**=""
Image which contains the pause executable (default: "kubernetes/pause") Image which contains the pause executable (default: "kubernetes/pause")
## OCID.NETWORK TABLE ## CRIO.NETWORK TABLE
**network_dir**="" **network_dir**=""
Path to CNI configuration files (default: "/etc/cni/net.d/") Path to CNI configuration files (default: "/etc/cni/net.d/")

View file

@ -1,6 +1,6 @@
# OCID Integration Tests # CRIO Integration Tests
Integration tests provide end-to-end testing of OCID. Integration tests provide end-to-end testing of CRIO.
Note that integration tests do **not** replace unit tests. Note that integration tests do **not** replace unit tests.

View file

@ -144,7 +144,7 @@ function teardown() {
fi fi
start_crio start_crio
remove_apparmor_profile "$FAKE_OCID_DEFAULT_PROFILE_PATH" remove_apparmor_profile "$FAKE_CRIO_DEFAULT_PROFILE_PATH"
sed -e 's/%VALUE%/,"container\.apparmor\.security\.beta\.kubernetes\.io\/testname5": "runtime\/default"/g' "$TESTDATA"/sandbox_config_seccomp.json > "$TESTDIR"/apparmor5.json sed -e 's/%VALUE%/,"container\.apparmor\.security\.beta\.kubernetes\.io\/testname5": "runtime\/default"/g' "$TESTDATA"/sandbox_config_seccomp.json > "$TESTDIR"/apparmor5.json

View file

@ -7,18 +7,18 @@ INTEGRATION_ROOT=$(dirname "$(readlink -f "$BASH_SOURCE")")
TESTDATA="${INTEGRATION_ROOT}/testdata" TESTDATA="${INTEGRATION_ROOT}/testdata"
# Root directory of the repository. # Root directory of the repository.
OCID_ROOT=${OCID_ROOT:-$(cd "$INTEGRATION_ROOT/../.."; pwd -P)} CRIO_ROOT=${CRIO_ROOT:-$(cd "$INTEGRATION_ROOT/../.."; pwd -P)}
# Path of the crio binary. # Path of the crio binary.
OCID_BINARY=${OCID_BINARY:-${OCID_ROOT}/cri-o/crio} CRIO_BINARY=${CRIO_BINARY:-${CRIO_ROOT}/cri-o/crio}
# Path of the crioctl binary. # Path of the crioctl binary.
OCIC_BINARY=${OCIC_BINARY:-${OCID_ROOT}/cri-o/crioctl} OCIC_BINARY=${OCIC_BINARY:-${CRIO_ROOT}/cri-o/crioctl}
# Path of the conmon binary. # Path of the conmon binary.
CONMON_BINARY=${CONMON_BINARY:-${OCID_ROOT}/cri-o/conmon/conmon} CONMON_BINARY=${CONMON_BINARY:-${CRIO_ROOT}/cri-o/conmon/conmon}
# Path of the pause binary. # Path of the pause binary.
PAUSE_BINARY=${PAUSE_BINARY:-${OCID_ROOT}/cri-o/pause/pause} PAUSE_BINARY=${PAUSE_BINARY:-${CRIO_ROOT}/cri-o/pause/pause}
# Path of the default seccomp profile. # Path of the default seccomp profile.
SECCOMP_PROFILE=${SECCOMP_PROFILE:-${OCID_ROOT}/cri-o/seccomp.json} SECCOMP_PROFILE=${SECCOMP_PROFILE:-${CRIO_ROOT}/cri-o/seccomp.json}
# Name of the default apparmor profile. # Name of the default apparmor profile.
APPARMOR_PROFILE=${APPARMOR_PROFILE:-crio-default} APPARMOR_PROFILE=${APPARMOR_PROFILE:-crio-default}
# Runtime # Runtime
@ -30,7 +30,7 @@ APPARMOR_PARSER_BINARY=${APPARMOR_PARSER_BINARY:-/sbin/apparmor_parser}
# Path of the apparmor profile for test. # Path of the apparmor profile for test.
APPARMOR_TEST_PROFILE_PATH=${APPARMOR_TEST_PROFILE_PATH:-${TESTDATA}/apparmor_test_deny_write} APPARMOR_TEST_PROFILE_PATH=${APPARMOR_TEST_PROFILE_PATH:-${TESTDATA}/apparmor_test_deny_write}
# Path of the apparmor profile for unloading crio-default. # Path of the apparmor profile for unloading crio-default.
FAKE_OCID_DEFAULT_PROFILE_PATH=${FAKE_OCID_DEFAULT_PROFILE_PATH:-${TESTDATA}/fake_crio_default} FAKE_CRIO_DEFAULT_PROFILE_PATH=${FAKE_CRIO_DEFAULT_PROFILE_PATH:-${TESTDATA}/fake_crio_default}
# Name of the apparmor profile for test. # Name of the apparmor profile for test.
APPARMOR_TEST_PROFILE_NAME=${APPARMOR_TEST_PROFILE_NAME:-apparmor-test-deny-write} APPARMOR_TEST_PROFILE_NAME=${APPARMOR_TEST_PROFILE_NAME:-apparmor-test-deny-write}
# Path of boot config. # Path of boot config.
@ -38,13 +38,13 @@ BOOT_CONFIG_FILE_PATH=${BOOT_CONFIG_FILE_PATH:-/boot/config-`uname -r`}
# Path of apparmor parameters file. # Path of apparmor parameters file.
APPARMOR_PARAMETERS_FILE_PATH=${APPARMOR_PARAMETERS_FILE_PATH:-/sys/module/apparmor/parameters/enabled} APPARMOR_PARAMETERS_FILE_PATH=${APPARMOR_PARAMETERS_FILE_PATH:-/sys/module/apparmor/parameters/enabled}
# Path of the bin2img binary. # Path of the bin2img binary.
BIN2IMG_BINARY=${BIN2IMG_BINARY:-${OCID_ROOT}/cri-o/test/bin2img/bin2img} BIN2IMG_BINARY=${BIN2IMG_BINARY:-${CRIO_ROOT}/cri-o/test/bin2img/bin2img}
# Path of the copyimg binary. # Path of the copyimg binary.
COPYIMG_BINARY=${COPYIMG_BINARY:-${OCID_ROOT}/cri-o/test/copyimg/copyimg} COPYIMG_BINARY=${COPYIMG_BINARY:-${CRIO_ROOT}/cri-o/test/copyimg/copyimg}
# Path of tests artifacts. # Path of tests artifacts.
ARTIFACTS_PATH=${ARTIFACTS_PATH:-${OCID_ROOT}/cri-o/.artifacts} ARTIFACTS_PATH=${ARTIFACTS_PATH:-${CRIO_ROOT}/cri-o/.artifacts}
# Path of the checkseccomp binary. # Path of the checkseccomp binary.
CHECKSECCOMP_BINARY=${CHECKSECCOMP_BINARY:-${OCID_ROOT}/cri-o/test/checkseccomp/checkseccomp} CHECKSECCOMP_BINARY=${CHECKSECCOMP_BINARY:-${CRIO_ROOT}/cri-o/test/checkseccomp/checkseccomp}
# XXX: This is hardcoded inside cri-o at the moment. # XXX: This is hardcoded inside cri-o at the moment.
DEFAULT_LOG_PATH=/var/log/crio/pods DEFAULT_LOG_PATH=/var/log/crio/pods
@ -54,10 +54,10 @@ if [ -e /usr/sbin/selinuxenabled ] && /usr/sbin/selinuxenabled; then
filelabel=$(awk -F'"' '/^file.*=.*/ {print $2}' /etc/selinux/${SELINUXTYPE}/contexts/lxc_contexts) filelabel=$(awk -F'"' '/^file.*=.*/ {print $2}' /etc/selinux/${SELINUXTYPE}/contexts/lxc_contexts)
chcon -R ${filelabel} $TESTDIR chcon -R ${filelabel} $TESTDIR
fi fi
OCID_SOCKET="$TESTDIR/crio.sock" CRIO_SOCKET="$TESTDIR/crio.sock"
OCID_CONFIG="$TESTDIR/crio.conf" CRIO_CONFIG="$TESTDIR/crio.conf"
OCID_CNI_CONFIG="$TESTDIR/cni/net.d/" CRIO_CNI_CONFIG="$TESTDIR/cni/net.d/"
OCID_CNI_PLUGIN="/opt/cni/bin/" CRIO_CNI_PLUGIN="/opt/cni/bin/"
POD_CIDR="10.88.0.0/16" POD_CIDR="10.88.0.0/16"
POD_CIDR_MASK="10.88.*.*" POD_CIDR_MASK="10.88.*.*"
@ -85,15 +85,15 @@ if ! [ -d "$ARTIFACTS_PATH"/busybox-image ]; then
fi fi
fi fi
# Run crio using the binary specified by $OCID_BINARY. # Run crio using the binary specified by $CRIO_BINARY.
# This must ONLY be run on engines created with `start_crio`. # This must ONLY be run on engines created with `start_crio`.
function crio() { function crio() {
"$OCID_BINARY" --listen "$OCID_SOCKET" "$@" "$CRIO_BINARY" --listen "$CRIO_SOCKET" "$@"
} }
# Run crioctl using the binary specified by $OCIC_BINARY. # Run crioctl using the binary specified by $OCIC_BINARY.
function crioctl() { function crioctl() {
"$OCIC_BINARY" --connect "$OCID_SOCKET" "$@" "$OCIC_BINARY" --connect "$CRIO_SOCKET" "$@"
} }
# Communicate with Docker on the host machine. # Communicate with Docker on the host machine.
@ -146,7 +146,7 @@ function start_crio() {
"$BIN2IMG_BINARY" --root "$TESTDIR/crio" $STORAGE_OPTS --runroot "$TESTDIR/crio-run" --source-binary "$PAUSE_BINARY" "$BIN2IMG_BINARY" --root "$TESTDIR/crio" $STORAGE_OPTS --runroot "$TESTDIR/crio-run" --source-binary "$PAUSE_BINARY"
fi fi
"$COPYIMG_BINARY" --root "$TESTDIR/crio" $STORAGE_OPTS --runroot "$TESTDIR/crio-run" --image-name=redis:alpine --import-from=dir:"$ARTIFACTS_PATH"/redis-image --add-name=docker://docker.io/library/redis:alpine --signature-policy="$INTEGRATION_ROOT"/policy.json "$COPYIMG_BINARY" --root "$TESTDIR/crio" $STORAGE_OPTS --runroot "$TESTDIR/crio-run" --image-name=redis:alpine --import-from=dir:"$ARTIFACTS_PATH"/redis-image --add-name=docker://docker.io/library/redis:alpine --signature-policy="$INTEGRATION_ROOT"/policy.json
"$OCID_BINARY" --conmon "$CONMON_BINARY" --listen "$OCID_SOCKET" --runtime "$RUNTIME_BINARY" --root "$TESTDIR/crio" --runroot "$TESTDIR/crio-run" $STORAGE_OPTS --seccomp-profile "$seccomp" --apparmor-profile "$apparmor" --cni-config-dir "$OCID_CNI_CONFIG" --signature-policy "$INTEGRATION_ROOT"/policy.json --config /dev/null config >$OCID_CONFIG "$CRIO_BINARY" --conmon "$CONMON_BINARY" --listen "$CRIO_SOCKET" --runtime "$RUNTIME_BINARY" --root "$TESTDIR/crio" --runroot "$TESTDIR/crio-run" $STORAGE_OPTS --seccomp-profile "$seccomp" --apparmor-profile "$apparmor" --cni-config-dir "$CRIO_CNI_CONFIG" --signature-policy "$INTEGRATION_ROOT"/policy.json --config /dev/null config >$CRIO_CONFIG
# Prepare the CNI configuration files, we're running with non host networking by default # Prepare the CNI configuration files, we're running with non host networking by default
if [[ -n "$4" ]]; then if [[ -n "$4" ]]; then
@ -156,7 +156,7 @@ function start_crio() {
fi fi
${netfunc} $POD_CIDR ${netfunc} $POD_CIDR
"$OCID_BINARY" --debug --config "$OCID_CONFIG" & OCID_PID=$! "$CRIO_BINARY" --debug --config "$CRIO_CONFIG" & CRIO_PID=$!
wait_until_reachable wait_until_reachable
run crioctl image status --id=redis:alpine run crioctl image status --id=redis:alpine
@ -211,19 +211,19 @@ function cleanup_pods() {
# Stop crio. # Stop crio.
function stop_crio() { function stop_crio() {
if [ "$OCID_PID" != "" ]; then if [ "$CRIO_PID" != "" ]; then
kill "$OCID_PID" >/dev/null 2>&1 kill "$CRIO_PID" >/dev/null 2>&1
wait "$OCID_PID" wait "$CRIO_PID"
rm -f "$OCID_CONFIG" rm -f "$CRIO_CONFIG"
fi fi
cleanup_network_conf cleanup_network_conf
} }
function restart_crio() { function restart_crio() {
if [ "$OCID_PID" != "" ]; then if [ "$CRIO_PID" != "" ]; then
kill "$OCID_PID" >/dev/null 2>&1 kill "$CRIO_PID" >/dev/null 2>&1
wait "$OCID_PID" wait "$CRIO_PID"
start_crio start_crio
else else
echo "you must start crio first" echo "you must start crio first"
@ -264,8 +264,8 @@ function is_apparmor_enabled() {
} }
function prepare_network_conf() { function prepare_network_conf() {
mkdir -p $OCID_CNI_CONFIG mkdir -p $CRIO_CNI_CONFIG
cat >$OCID_CNI_CONFIG/10-crio.conf <<-EOF cat >$CRIO_CNI_CONFIG/10-crio.conf <<-EOF
{ {
"cniVersion": "0.2.0", "cniVersion": "0.2.0",
"name": "crionet", "name": "crionet",
@ -283,7 +283,7 @@ function prepare_network_conf() {
} }
EOF EOF
cat >$OCID_CNI_CONFIG/99-loopback.conf <<-EOF cat >$CRIO_CNI_CONFIG/99-loopback.conf <<-EOF
{ {
"cniVersion": "0.2.0", "cniVersion": "0.2.0",
"type": "loopback" "type": "loopback"
@ -294,8 +294,8 @@ EOF
} }
function prepare_plugin_test_args_network_conf() { function prepare_plugin_test_args_network_conf() {
mkdir -p $OCID_CNI_CONFIG mkdir -p $CRIO_CNI_CONFIG
cat >$OCID_CNI_CONFIG/10-plugin-test-args.conf <<-EOF cat >$CRIO_CNI_CONFIG/10-plugin-test-args.conf <<-EOF
{ {
"cniVersion": "0.2.0", "cniVersion": "0.2.0",
"name": "crionet", "name": "crionet",
@ -350,7 +350,7 @@ function ping_pod_from_pod() {
function cleanup_network_conf() { function cleanup_network_conf() {
rm -rf $OCID_CNI_CONFIG rm -rf $CRIO_CNI_CONFIG
echo 0 echo 0
} }

View file

@ -15,7 +15,7 @@ function teardown() {
skip "skip this test since seccomp is not enabled." skip "skip this test since seccomp is not enabled."
fi fi
sed -e 's/"chmod",//' "$OCID_ROOT"/cri-o/seccomp.json > "$TESTDIR"/seccomp_profile1.json sed -e 's/"chmod",//' "$CRIO_ROOT"/cri-o/seccomp.json > "$TESTDIR"/seccomp_profile1.json
sed -i 's/"fchmod",//' "$TESTDIR"/seccomp_profile1.json sed -i 's/"fchmod",//' "$TESTDIR"/seccomp_profile1.json
sed -i 's/"fchmodat",//g' "$TESTDIR"/seccomp_profile1.json sed -i 's/"fchmodat",//g' "$TESTDIR"/seccomp_profile1.json
@ -51,7 +51,7 @@ function teardown() {
skip "skip this test since seccomp is not enabled." skip "skip this test since seccomp is not enabled."
fi fi
sed -e 's/"chmod",//' "$OCID_ROOT"/cri-o/seccomp.json > "$TESTDIR"/seccomp_profile1.json sed -e 's/"chmod",//' "$CRIO_ROOT"/cri-o/seccomp.json > "$TESTDIR"/seccomp_profile1.json
sed -i 's/"fchmod",//' "$TESTDIR"/seccomp_profile1.json sed -i 's/"fchmod",//' "$TESTDIR"/seccomp_profile1.json
sed -i 's/"fchmodat",//g' "$TESTDIR"/seccomp_profile1.json sed -i 's/"fchmodat",//g' "$TESTDIR"/seccomp_profile1.json
@ -88,7 +88,7 @@ function teardown() {
skip "skip this test since seccomp is not enabled." skip "skip this test since seccomp is not enabled."
fi fi
sed -e 's/"chmod",//' "$OCID_ROOT"/cri-o/seccomp.json > "$TESTDIR"/seccomp_profile1.json sed -e 's/"chmod",//' "$CRIO_ROOT"/cri-o/seccomp.json > "$TESTDIR"/seccomp_profile1.json
sed -i 's/"fchmod",//' "$TESTDIR"/seccomp_profile1.json sed -i 's/"fchmod",//' "$TESTDIR"/seccomp_profile1.json
sed -i 's/"fchmodat",//g' "$TESTDIR"/seccomp_profile1.json sed -i 's/"fchmodat",//g' "$TESTDIR"/seccomp_profile1.json
@ -119,7 +119,7 @@ function teardown() {
skip "skip this test since seccomp is not enabled." skip "skip this test since seccomp is not enabled."
fi fi
#sed -e 's/"chmod",//' "$OCID_ROOT"/cri-o/seccomp.json > "$TESTDIR"/seccomp_profile1.json #sed -e 's/"chmod",//' "$CRIO_ROOT"/cri-o/seccomp.json > "$TESTDIR"/seccomp_profile1.json
#sed -i 's/"fchmod",//' "$TESTDIR"/seccomp_profile1.json #sed -i 's/"fchmod",//' "$TESTDIR"/seccomp_profile1.json
#sed -i 's/"fchmodat",//g' "$TESTDIR"/seccomp_profile1.json #sed -i 's/"fchmodat",//g' "$TESTDIR"/seccomp_profile1.json
@ -139,7 +139,7 @@ function teardown() {
skip "skip this test since seccomp is not enabled." skip "skip this test since seccomp is not enabled."
fi fi
sed -e 's/"chmod",//' "$OCID_ROOT"/cri-o/seccomp.json > "$TESTDIR"/seccomp_profile1.json sed -e 's/"chmod",//' "$CRIO_ROOT"/cri-o/seccomp.json > "$TESTDIR"/seccomp_profile1.json
sed -i 's/"fchmod",//' "$TESTDIR"/seccomp_profile1.json sed -i 's/"fchmod",//' "$TESTDIR"/seccomp_profile1.json
sed -i 's/"fchmodat",//g' "$TESTDIR"/seccomp_profile1.json sed -i 's/"fchmodat",//g' "$TESTDIR"/seccomp_profile1.json
@ -179,7 +179,7 @@ function teardown() {
skip "skip this test since seccomp is not enabled." skip "skip this test since seccomp is not enabled."
fi fi
sed -e 's/"chmod",//' "$OCID_ROOT"/cri-o/seccomp.json > "$TESTDIR"/seccomp_profile1.json sed -e 's/"chmod",//' "$CRIO_ROOT"/cri-o/seccomp.json > "$TESTDIR"/seccomp_profile1.json
sed -i 's/"fchmod",//' "$TESTDIR"/seccomp_profile1.json sed -i 's/"fchmod",//' "$TESTDIR"/seccomp_profile1.json
sed -i 's/"fchmodat",//g' "$TESTDIR"/seccomp_profile1.json sed -i 's/"fchmodat",//g' "$TESTDIR"/seccomp_profile1.json
@ -215,7 +215,7 @@ function teardown() {
skip "skip this test since seccomp is not enabled." skip "skip this test since seccomp is not enabled."
fi fi
sed -e 's/"chmod",//' "$OCID_ROOT"/cri-o/seccomp.json > "$TESTDIR"/seccomp_profile1.json sed -e 's/"chmod",//' "$CRIO_ROOT"/cri-o/seccomp.json > "$TESTDIR"/seccomp_profile1.json
sed -i 's/"fchmod",//' "$TESTDIR"/seccomp_profile1.json sed -i 's/"fchmod",//' "$TESTDIR"/seccomp_profile1.json
sed -i 's/"fchmodat",//g' "$TESTDIR"/seccomp_profile1.json sed -i 's/"fchmodat",//g' "$TESTDIR"/seccomp_profile1.json
@ -251,7 +251,7 @@ function teardown() {
skip "skip this test since seccomp is not enabled." skip "skip this test since seccomp is not enabled."
fi fi
sed -e 's/"chmod",//' "$OCID_ROOT"/cri-o/seccomp.json > "$TESTDIR"/seccomp_profile1.json sed -e 's/"chmod",//' "$CRIO_ROOT"/cri-o/seccomp.json > "$TESTDIR"/seccomp_profile1.json
sed -i 's/"fchmod",//' "$TESTDIR"/seccomp_profile1.json sed -i 's/"fchmod",//' "$TESTDIR"/seccomp_profile1.json
sed -i 's/"fchmodat",//g' "$TESTDIR"/seccomp_profile1.json sed -i 's/"fchmodat",//g' "$TESTDIR"/seccomp_profile1.json
@ -288,7 +288,7 @@ function teardown() {
skip "skip this test since seccomp is not enabled." skip "skip this test since seccomp is not enabled."
fi fi
sed -e 's/"chmod",//' "$OCID_ROOT"/cri-o/seccomp.json > "$TESTDIR"/seccomp_profile1.json sed -e 's/"chmod",//' "$CRIO_ROOT"/cri-o/seccomp.json > "$TESTDIR"/seccomp_profile1.json
sed -i 's/"fchmod",//' "$TESTDIR"/seccomp_profile1.json sed -i 's/"fchmod",//' "$TESTDIR"/seccomp_profile1.json
sed -i 's/"fchmodat",//g' "$TESTDIR"/seccomp_profile1.json sed -i 's/"fchmodat",//g' "$TESTDIR"/seccomp_profile1.json
@ -320,7 +320,7 @@ function teardown() {
skip "skip this test since seccomp is not enabled." skip "skip this test since seccomp is not enabled."
fi fi
#sed -e 's/"chmod",//' "$OCID_ROOT"/cri-o/seccomp.json > "$TESTDIR"/seccomp_profile1.json #sed -e 's/"chmod",//' "$CRIO_ROOT"/cri-o/seccomp.json > "$TESTDIR"/seccomp_profile1.json
#sed -i 's/"fchmod",//' "$TESTDIR"/seccomp_profile1.json #sed -i 's/"fchmod",//' "$TESTDIR"/seccomp_profile1.json
#sed -i 's/"fchmodat",//g' "$TESTDIR"/seccomp_profile1.json #sed -i 's/"fchmodat",//g' "$TESTDIR"/seccomp_profile1.json