Try fix ssl (#2051)

* Revert "Reverted bad modification #2035"

This reverts commit 6d6eca5e23.

* spaces

* fix

* better

* Revert "Disabled ill-formed test #2035"

This reverts commit b28cef9871.

* debug

* fix

* fix

* fix

* fix

* fix

* fix

* clean

* Tests compile fix

* fix

* Try fix ssl

* version

* Test fixes, ./release now uses pbuilder by default

* fix
This commit is contained in:
proller 2018-03-15 02:04:35 +03:00 committed by GitHub
parent 087a5686c0
commit 56947de18a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 13 deletions

View File

@ -17,11 +17,16 @@ echo 'Europe/Moscow' > /etc/timezone
dpkg-reconfigure -f noninteractive tzdata
mkdir -p /etc/clickhouse-server/config.d /etc/clickhouse-client/config.d
echo "<yandex><https_port>8443</https_port><tcp_ssl_port>9440</tcp_ssl_port></yandex>" > /etc/clickhouse-server/config.d/ssl.xml
echo "<yandex><openSSL><client><verificationMode>none</verificationMode><invalidCertificateHandler><name>AcceptCertificateHandler</name></invalidCertificateHandler></client></openSSL></yandex>" > /etc/clickhouse-client/config.d/ssl.xml
openssl dhparam -out /etc/clickhouse-server/dhparam.pem 256
openssl req -subj "/CN=localhost" -new -newkey rsa:2048 -days 365 -nodes -x509 -keyout /etc/clickhouse-server/server.key -out /etc/clickhouse-server/server.crt
TEST_SSL=${TEST_SSL=1}
if [ "${TEST_SSL}" ]; then
echo "<yandex><https_port>8443</https_port><tcp_ssl_port>9440</tcp_ssl_port></yandex>" > /etc/clickhouse-server/config.d/ssl.xml
echo "<yandex><openSSL><client><verificationMode>none</verificationMode><invalidCertificateHandler><name>AcceptCertificateHandler</name></invalidCertificateHandler></client></openSSL></yandex>" > /etc/clickhouse-client/config.d/ssl.xml
openssl dhparam -out /etc/clickhouse-server/dhparam.pem 256
openssl req -subj "/CN=localhost" -new -newkey rsa:2048 -days 365 -nodes -x509 -keyout /etc/clickhouse-server/server.key -out /etc/clickhouse-server/server.crt
CLIENT_ADD="--ssl"
fi
service clickhouse-server start
sleep 3
@ -29,8 +34,8 @@ sleep 3
# TODO: remove me or make only on error:
tail -n100 /var/log/clickhouse-server/*
clickhouse-client --ssl -q "SELECT * from system.build_options;"
clickhouse-client --ssl -q "SELECT toDateTime(1);"
clickhouse-client -q "SELECT * from system.build_options;"
clickhouse-client ${CLIENT_ADD} -q "SELECT toDateTime(1);"
( [ "${TEST_RUN}" ] && clickhouse-test --queries /usr/share/clickhouse-test/queries --tmp /tmp/clickhouse-test/ ${TEST_OPT} ) || ${TEST_TRUE:=true}

View File

@ -13,6 +13,7 @@ DEB_CXX=${DEB_CXX:=g++-7}
CONTROL=debian/control
DEBUILD_NOSIGN_OPTIONS="-us -uc"
DEBUILD_NODEPS_OPTIONS="-d"
USE_PBUILDER=1
if [ -z "$REVISION" ] ; then
get_revision_author
@ -34,8 +35,8 @@ do
elif [[ $1 == '--head' ]]; then
REVISION=`git rev-parse HEAD`
shift
elif [[ $1 == '--pbuilder' ]]; then
USE_PBUILDER=1
elif [[ $1 == '--no-pbuilder' ]]; then
USE_PBUILDER=
shift
elif [[ $1 == '--fast' ]]; then
# Wrong but fast pbuilder mode: create base package with all depends

View File

@ -1,9 +1,11 @@
#!/bin/sh
#!/bin/bash
# Manual run:
# env CXX=g++-7 CC=gcc-7 utils/travis/normal.sh
# env CXX=clang++-5.0 CC=clang-5.0 utils/travis/normal.sh
CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
set -e
set -x
@ -20,7 +22,7 @@ date
mkdir -p build
cd build
cmake .. -DCMAKE_CXX_COMPILER=`which $DEB_CXX $CXX` -DCMAKE_C_COMPILER=`which $DEB_CC $CC` \
cmake $CUR_DIR/../.. -DCMAKE_CXX_COMPILER=`which $DEB_CXX $CXX` -DCMAKE_C_COMPILER=`which $DEB_CC $CC` \
`# Does not optimize to speedup build, skip debug info to use less disk` \
-DCMAKE_C_FLAGS_ADD="-O0 -g0" -DCMAKE_CXX_FLAGS_ADD="-O0 -g0" \
`# ignore ccache disabler on trusty` \
@ -33,6 +35,6 @@ cmake .. -DCMAKE_CXX_COMPILER=`which $DEB_CXX $CXX` -DCMAKE_C_COMPILER=`which $D
`# Skip tests:` \
`# 00281 requires internal compiler` \
`# 00428 requires sudo (not all vms allow this)` \
&& ( [ ${TEST_RUN=1} ] && ( ( cd .. && env TEST_OPT="--skip long compile 00428 $TEST_OPT" bash -x dbms/tests/clickhouse-test-server ) || ${TEST_TRUE=false} ) || true )
&& ( [ ${TEST_RUN=1} ] && ( ( cd $CUR_DIR/../.. && env TEST_OPT="--skip long compile 00428 $TEST_OPT" bash -x dbms/tests/clickhouse-test-server ) || ${TEST_TRUE=false} ) || true )
date

View File

@ -1,4 +1,6 @@
#!/bin/sh
#!/bin/bash
CUR_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)
# env CXX=clang++-5.0 CC=clang-5.0 DH_VERBOSE=1 utils/travis/pbuilder.sh
@ -14,6 +16,7 @@ env TEST_RUN=${TEST_RUN=1} \
`# 00281 requires internal compiler` \
`# 00416 requires patched poco from contrib/` \
TEST_OPT="--skip long pocopatch $TEST_OPT" \
TEST_SSL="" `# <Error> Application: SSL context exception: Error loading certificate from file /etc/clickhouse-server/server.crt: No error -- when using system poco on artful` \
TEST_TRUE=${TEST_TRUE=false} \
`# travisci will not upload ccache cache after timeout (48min), use our less timeout` \
PBUILDER_OPT="--timeout ${PBUILDER_TIMEOUT:=35m} $PBUILDER_OPT" \
@ -25,6 +28,6 @@ env TEST_RUN=${TEST_RUN=1} \
`# Use all possible contrib libs from system` \
`# psmisc - killall` \
EXTRAPACKAGES="psmisc clang-5.0 lld-5.0 liblld-5.0-dev libclang-5.0-dev liblld-5.0 libc++abi-dev libc++-dev libboost-program-options-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev zlib1g-dev liblz4-dev libdouble-conversion-dev libzookeeper-mt-dev libsparsehash-dev librdkafka-dev libpoco-dev libsparsehash-dev libgoogle-perftools-dev libzstd-dev libre2-dev $EXTRAPACKAGES" \
./release --pbuilder $RELEASE_OPT
$CUR_DIR/../../release $RELEASE_OPT
date