mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-23 00:44:33 +00:00
chore(ci): fix rocky8 test stage prepare
This commit is contained in:
@ -78,58 +78,66 @@ start_container() {
|
||||
}
|
||||
|
||||
prepare_container() {
|
||||
if [[ "$RESULT" != *rocky* ]]; then
|
||||
execInnerDocker "$CONTAINER_NAME" 'sed -i "s/exit 101/exit 0/g" /usr/sbin/policy-rc.d'
|
||||
fi
|
||||
if [[ "$RESULT" != *rocky* ]]; then
|
||||
execInnerDocker "$CONTAINER_NAME" 'sed -i "s/exit 101/exit 0/g" /usr/sbin/policy-rc.d'
|
||||
fi
|
||||
|
||||
#list_cgroups
|
||||
echo "Docker CGroups opts here"
|
||||
ls -al /sys/fs/cgroup/cgroup.controllers || true
|
||||
ls -al /sys/fs/cgroup/ || true
|
||||
ls -al /sys/fs/cgroup/memory || true
|
||||
#list_cgroups
|
||||
echo "Docker CGroups opts here"
|
||||
ls -al /sys/fs/cgroup/cgroup.controllers || true
|
||||
ls -al /sys/fs/cgroup/ || true
|
||||
ls -al /sys/fs/cgroup/memory || true
|
||||
|
||||
execInnerDocker "$CONTAINER_NAME" 'echo Inner Docker CGroups opts here'
|
||||
execInnerDocker "$CONTAINER_NAME" 'ls -al /sys/fs/cgroup/cgroup.controllers || true'
|
||||
execInnerDocker "$CONTAINER_NAME" 'ls -al /sys/fs/cgroup/ || true'
|
||||
execInnerDocker "$CONTAINER_NAME" 'ls -al /sys/fs/cgroup/memory || true'
|
||||
execInnerDocker "$CONTAINER_NAME" 'echo Inner Docker CGroups opts here'
|
||||
execInnerDocker "$CONTAINER_NAME" 'ls -al /sys/fs/cgroup/cgroup.controllers || true'
|
||||
execInnerDocker "$CONTAINER_NAME" 'ls -al /sys/fs/cgroup/ || true'
|
||||
execInnerDocker "$CONTAINER_NAME" 'ls -al /sys/fs/cgroup/memory || true'
|
||||
|
||||
# Prepare core dump directory inside container
|
||||
execInnerDocker "$CONTAINER_NAME" 'mkdir -p core && chmod 777 core'
|
||||
docker cp "$COLUMNSTORE_SOURCE_PATH"/core_dumps/. "$CONTAINER_NAME":/
|
||||
docker cp "$COLUMNSTORE_SOURCE_PATH"/build/utils.sh "$CONTAINER_NAME":/
|
||||
docker cp "$COLUMNSTORE_SOURCE_PATH"/setup-repo.sh "$CONTAINER_NAME":/
|
||||
# Prepare core dump directory inside container
|
||||
execInnerDocker "$CONTAINER_NAME" 'mkdir -p core && chmod 777 core'
|
||||
docker cp "$COLUMNSTORE_SOURCE_PATH"/core_dumps/. "$CONTAINER_NAME":/
|
||||
docker cp "$COLUMNSTORE_SOURCE_PATH"/build/utils.sh "$CONTAINER_NAME":/
|
||||
docker cp "$COLUMNSTORE_SOURCE_PATH"/setup-repo.sh "$CONTAINER_NAME":/
|
||||
|
||||
if [[ "$DO_SETUP" == "true" ]]; then
|
||||
execInnerDocker "$CONTAINER_NAME" '/setup-repo.sh'
|
||||
fi
|
||||
if [[ "$DO_SETUP" == "true" ]]; then
|
||||
execInnerDocker "$CONTAINER_NAME" '/setup-repo.sh'
|
||||
fi
|
||||
|
||||
# install deps
|
||||
if [[ "$RESULT" == *rocky* ]]; then
|
||||
execInnerDockerWithRetry "$CONTAINER_NAME" 'dnf install -y dnf-plugins-core && dnf config-manager --set-enabled crb'
|
||||
execInnerDockerWithRetry "$CONTAINER_NAME" 'yum --nobest update -y && yum --nobest install -y cracklib-dicts diffutils elfutils epel-release expect findutils iproute gawk gcc-c++ gdb hostname lz4 patch perl procps-ng rsyslog sudo tar wget which'
|
||||
else
|
||||
change_ubuntu_mirror_in_docker "$CONTAINER_NAME" "us"
|
||||
execInnerDockerWithRetry "$CONTAINER_NAME" 'apt update -y && apt install -y elfutils expect findutils iproute2 g++ gawk gdb hostname liblz4-tool patch procps rsyslog sudo tar wget'
|
||||
fi
|
||||
# install deps
|
||||
if [[ "$RESULT" == *rocky* ]]; then
|
||||
TEST_RPM_DEPS='cracklib-dicts diffutils elfutils epel-release expect findutils iproute gawk gcc-c++ gdb hostname lz4 patch perl procps-ng rsyslog sudo tar wget which'
|
||||
if [[ "$RESULT" == *"rockylinux:8"* || "$RESULT" == *"rocky:8"* ]]; then
|
||||
execInnerDockerWithRetry "$CONTAINER_NAME" 'dnf install -y curl dnf-command(config-manager) && dnf config-manager --set-enabled powertools'
|
||||
execInnerDockerWithRetry "$CONTAINER_NAME" "yum --nobest update -y && yum --nobest install -y $TEST_RPM_DEPS"
|
||||
elif [[ "$RESULT" == "rockylinux:9"* || "$RESULT" == "rocky:9"* ]]; then
|
||||
execInnerDockerWithRetry "$CONTAINER_NAME" 'dnf install -y dnf-plugins-core && dnf config-manager --set-enabled crb'
|
||||
execInnerDockerWithRetry "$CONTAINER_NAME" "yum --nobest update -y && yum --nobest install -y $TEST_RPM_DEPS"
|
||||
else
|
||||
error 'Unsupported RPM base os $RESULT'
|
||||
fi
|
||||
else
|
||||
change_ubuntu_mirror_in_docker "$CONTAINER_NAME" "us"
|
||||
execInnerDockerWithRetry "$CONTAINER_NAME" 'apt update -y && apt install -y elfutils expect findutils iproute2 g++ gawk gdb hostname liblz4-tool patch procps rsyslog sudo tar wget'
|
||||
fi
|
||||
|
||||
# Configure core dump naming pattern
|
||||
execInnerDocker "$CONTAINER_NAME" 'sysctl -w kernel.core_pattern="/core/%E_${RESULT}_core_dump.%p"'
|
||||
# Configure core dump naming pattern
|
||||
execInnerDocker "$CONTAINER_NAME" 'sysctl -w kernel.core_pattern="/core/%E_${RESULT}_core_dump.%p"'
|
||||
|
||||
#Install columnstore in container
|
||||
echo "Installing columnstore..."
|
||||
if [[ "$RESULT" == *rocky* ]]; then
|
||||
execInnerDockerWithRetry "$CONTAINER_NAME" 'yum install -y MariaDB-columnstore-engine MariaDB-test'
|
||||
else
|
||||
execInnerDockerWithRetry "$CONTAINER_NAME" 'apt update -y && apt install -y mariadb-plugin-columnstore mariadb-test mariadb-test-data'
|
||||
fi
|
||||
#Install columnstore in container
|
||||
echo "Installing columnstore..."
|
||||
if [[ "$RESULT" == *rocky* ]]; then
|
||||
execInnerDockerWithRetry "$CONTAINER_NAME" 'yum install -y MariaDB-columnstore-engine MariaDB-test'
|
||||
else
|
||||
execInnerDockerWithRetry "$CONTAINER_NAME" 'apt update -y && apt install -y mariadb-plugin-columnstore mariadb-test mariadb-test-data'
|
||||
fi
|
||||
|
||||
sleep 5
|
||||
echo "PrepareTestStage completed in $CONTAINER_NAME"
|
||||
sleep 5
|
||||
echo "PrepareTestStage completed in $CONTAINER_NAME"
|
||||
}
|
||||
|
||||
|
||||
if [[ -z $(docker ps -q --filter "name=${CONTAINER_NAME}") ]]; then
|
||||
start_container
|
||||
prepare_container
|
||||
else message "Container ${CONTAINER_NAME} is already running, skipping prepare step"
|
||||
else
|
||||
message "Container ${CONTAINER_NAME} is already running, skipping prepare step"
|
||||
fi
|
||||
|
Reference in New Issue
Block a user