diff --git a/ipatests/azure/Dockerfiles/docker-compose.yml b/ipatests/azure/Dockerfiles/docker-compose.yml index 778bfcc80..09ecb52e1 100644 --- a/ipatests/azure/Dockerfiles/docker-compose.yml +++ b/ipatests/azure/Dockerfiles/docker-compose.yml @@ -7,7 +7,7 @@ services: - ALL security_opt: - apparmor:unconfined - mem_limit: 1610612736 + mem_limit: 1900m volumes: - /sys/fs/cgroup/systemd:/sys/fs/cgroup/systemd - ./ipa-test-config.yaml:/root/.ipa/ipa-test-config.yaml:ro @@ -23,7 +23,7 @@ services: - ALL security_opt: - apparmor:unconfined - mem_limit: 1610612736 + mem_limit: 1900m volumes: - /sys/fs/cgroup/systemd:/sys/fs/cgroup/systemd networks: diff --git a/ipatests/azure/scripts/azure-run-base-tests.sh b/ipatests/azure/scripts/azure-run-base-tests.sh index 6c80af1bb..e05135dac 100755 --- a/ipatests/azure/scripts/azure-run-base-tests.sh +++ b/ipatests/azure/scripts/azure-run-base-tests.sh @@ -92,5 +92,14 @@ tar --ignore-failed-read --remove-files -czf var_log.tar.gz \ "$BIND_DATADIR" \ systemd_journal.log +echo "Report memory statistics" +cat /sys/fs/cgroup/memory/memory.memsw.failcnt +cat /sys/fs/cgroup/memory/memory.memsw.limit_in_bytes +cat /sys/fs/cgroup/memory/memory.memsw.max_usage_in_bytes +cat /sys/fs/cgroup/memory/memory.failcnt +cat /sys/fs/cgroup/memory/memory.max_usage_in_bytes +cat /sys/fs/cgroup/memory/memory.limit_in_bytes +cat /proc/sys/vm/swappiness + # Final result depends on the exit code of the ipa-run-tests test "$tests_result" -eq 0 -a "$install_result" -eq 0 diff --git a/ipatests/azure/scripts/azure-run-integration-tests.sh b/ipatests/azure/scripts/azure-run-integration-tests.sh index bf1114050..f4e504868 100755 --- a/ipatests/azure/scripts/azure-run-integration-tests.sh +++ b/ipatests/azure/scripts/azure-run-integration-tests.sh @@ -26,4 +26,13 @@ chmod -R o+rX "$IPA_TESTS_LOGSDIR" find "$IPA_TESTS_LOGSDIR" -mindepth 1 -maxdepth 1 -not -name '.*' -type d \ -exec tar --remove-files -czf {}.tar.gz {} \; +echo "Report memory statistics" +cat /sys/fs/cgroup/memory/memory.memsw.failcnt +cat /sys/fs/cgroup/memory/memory.memsw.limit_in_bytes +cat /sys/fs/cgroup/memory/memory.memsw.max_usage_in_bytes +cat /sys/fs/cgroup/memory/memory.failcnt +cat /sys/fs/cgroup/memory/memory.max_usage_in_bytes +cat /sys/fs/cgroup/memory/memory.limit_in_bytes +cat /proc/sys/vm/swappiness + exit $tests_result diff --git a/ipatests/azure/templates/test-jobs.yml b/ipatests/azure/templates/test-jobs.yml index e0ab236bd..aa7c3aeb8 100644 --- a/ipatests/azure/templates/test-jobs.yml +++ b/ipatests/azure/templates/test-jobs.yml @@ -44,6 +44,15 @@ steps: - template: run-test.yml +- script: | + set -eux + free -m + cat /sys/fs/cgroup/memory/memory.memsw.max_usage_in_bytes + cat /sys/fs/cgroup/memory/memory.max_usage_in_bytes + cat /proc/sys/vm/swappiness + condition: succeededOrFailed() + displayName: Host's memory statistics + - task: PublishTestResults@2 inputs: testResultsFiles: 'ipa_envs/*/$(CI_RUNNER_LOGS_DIR)/nosetests.xml'