Trying running tests
Signed-off-by: Adrian Reber <adrian@lisas.de>
This commit is contained in:
parent
639f893dcc
commit
9ccffd7bff
@ -12,7 +12,7 @@
|
||||
|
||||
Name: criu
|
||||
Version: 3.12
|
||||
Release: 5%{?dist}
|
||||
Release: 6%{?dist}
|
||||
Provides: crtools = %{version}-%{release}
|
||||
Obsoletes: crtools <= 1.0-2
|
||||
Summary: Tool for Checkpoint/Restore in User-space
|
||||
@ -175,7 +175,7 @@ rm -rf $RPM_BUILD_ROOT%{_libexecdir}/%{name}
|
||||
|
||||
|
||||
%changelog
|
||||
* Sat May 04 2019 Adrian Reber <adrian@lisas.de> - 3.12-5
|
||||
* Sat May 04 2019 Adrian Reber <adrian@lisas.de> - 3.12-6
|
||||
- Patch for socket labelling has changed upstream
|
||||
|
||||
* Mon Apr 29 2019 Adrian Reber <adrian@lisas.de> - 3.12-4
|
||||
|
||||
56
tests/run-podman-checkpoint-restore.sh
Executable file
56
tests/run-podman-checkpoint-restore.sh
Executable file
@ -0,0 +1,56 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -eux
|
||||
|
||||
ls -la
|
||||
|
||||
echo "Load additional SELinux policy for checkpointing"
|
||||
|
||||
# Add missing selinux policy
|
||||
cat << EOF > criu.te
|
||||
|
||||
module criu 1.0;
|
||||
|
||||
require {
|
||||
type container_t;
|
||||
type container_var_lib_t;
|
||||
type sysctl_kernel_ns_last_pid_t;
|
||||
class file { append write };
|
||||
}
|
||||
|
||||
allow container_t sysctl_kernel_ns_last_pid_t:file write;
|
||||
allow container_t container_var_lib_t:file append;
|
||||
EOF
|
||||
|
||||
cat criu.te
|
||||
|
||||
checkmodule -M -m criu.te -o criu.mod
|
||||
semodule_package -o criu.pp -m criu.mod
|
||||
#semodule -i criu.pp
|
||||
|
||||
echo "Start container with tomcat"
|
||||
podman --log-level debug run --tmpfs /tmp --tmpfs /usr/local/tomcat/logs -d docker://docker.io/yovfiatbeb/podman-criu-test
|
||||
|
||||
echo "See which containers are running"
|
||||
podman ps
|
||||
|
||||
# tomcat needs some time to start up
|
||||
echo "Wait 15 seconds for tomcat to start"
|
||||
sleep 15
|
||||
|
||||
echo "Connect to tomcat in the container"
|
||||
curl `podman inspect -l | jq -r '.[0].NetworkSettings.IPAddress'`:8080/examples/servlets/servlet/HelloWorldExample -v
|
||||
|
||||
echo "Checkpoint container"
|
||||
podman --log-level debug container checkpoint -l
|
||||
|
||||
podman ps -a
|
||||
echo "Restore container"
|
||||
podman --log-level debug container restore -l
|
||||
|
||||
podman ps -a
|
||||
echo "Check if we can connect to the restored container"
|
||||
curl `podman inspect -l | jq -r '.[0].NetworkSettings.IPAddress'`:8080/examples/servlets/servlet/HelloWorldExample -v
|
||||
|
||||
ls -la
|
||||
echo test
|
||||
31
tests/tests.yml
Normal file
31
tests/tests.yml
Normal file
@ -0,0 +1,31 @@
|
||||
---
|
||||
- hosts: localhost
|
||||
roles:
|
||||
- role: standard-test-source
|
||||
tags:
|
||||
- classic
|
||||
- role: standard-test-basic
|
||||
tags:
|
||||
- classic
|
||||
required_packages:
|
||||
- podman
|
||||
- curl
|
||||
- jq
|
||||
- checkpolicy
|
||||
- policycoreutils
|
||||
- make
|
||||
- gcc
|
||||
- python3
|
||||
- libnet-devel
|
||||
- protobuf-devel
|
||||
- protobuf-c-devel
|
||||
- python3-devel
|
||||
- libnl3-devel
|
||||
- libcap-devel
|
||||
- libaio-devel
|
||||
- python3-pyyaml
|
||||
- python3-protobuf
|
||||
tests:
|
||||
- podman:
|
||||
dir: .
|
||||
run: ./run-podman-checkpoint-restore.sh
|
||||
Loading…
Reference in New Issue
Block a user