codership / galera

Synchronous multi-master replication library
GNU General Public License v2.0
447 stars 177 forks source link

gu_tests++ fails while running make test #652

Closed sangitanalkar closed 8 months ago

sangitanalkar commented 9 months ago

gu_tests++ fails on Intel for Galera release_26.4.14 and release_26.4.16 as following :

# make test
Running tests...
    Start 1: gu_tests
1/7 Test #1: gu_tests .........................   Passed    3.23 sec
    Start 2: gu_tests++
2/7 Test #2: gu_tests++ .......................***Failed   45.99 sec
    Start 3: check_gcomm
3/7 Test #3: check_gcomm ......................   Passed    0.92 sec
    Start 4: gcache_tests
4/7 Test #4: gcache_tests .....................   Passed    0.07 sec
    Start 5: gcs_tests
5/7 Test #5: gcs_tests ........................   Passed    9.24 sec
    Start 6: galera_check
6/7 Test #6: galera_check .....................   Passed   16.59 sec
    Start 7: wsrep_test
7/7 Test #7: wsrep_test .......................   Passed    0.01 sec

86% tests passed, 1 tests failed out of 7

Total Test time (real) =  76.07 sec

The following tests FAILED:
          2 - gu_tests++ (Failed)
Errors while running CTest
make: *** [test] Error 8
# 

Following versions are used:

# openssl version
OpenSSL 1.0.2k-fips  26 Jan 2017
# 

# gcc --version
gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-44)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
#

# cmake --version
cmake version 3.7.2
CMake suite maintained and supported by Kitware (kitware.com/cmake).
#

#Boost version: 1.53.0

Please help in resolving above TC failure.

gberche-orange commented 9 months ago

Looking at the log, we see that ssl tests fail apparently due to the bundled ca cert being expired

DEBUG: /var/vcap/data/compile-gberche/var/vcap/data/compile/galera/galera/galera-26.4.12/galerautils/src/gu_uri.cpp:parse():158: URI: ssl://127.0.0.1:37877
 INFO: /var/vcap/data/compile-gberche/var/vcap/data/compile/galera/galera/galera-26.4.12/galerautils/tests/gu_asio_test.cpp:connect_handler():41: connected: 0x562377f5d110
 WARN: /var/vcap/data/compile-gberche/var/vcap/data/compile/galera/galera/galera-26.4.12/galerautils/src/gu_asio_stream_react.cpp:server_handshake_handler():415: Handshake failed: sslv3 alert certificate expired

/a2840aaa-70a0-46c7-8292-ad34dadd671f:/var/vcap/data/compile-gberche/var/vcap/data/compile/galera/galera/ $ openssl x509 -text -in galera_ca.pem 
Certificate:                                                                                             
    Data:                                                                                                
        Version: 3 (0x2)                                                                                 
        Serial Number:                                                                                   
            4e:15:84:1f:a7:b6:af:7d:93:c4:2c:ea:00:5c:3b:aa:54:de:e0:85
        Signature Algorithm: sha256WithRSAEncryption          
        Issuer: C = FI, ST = Helsinki, L = Helsinki, O = Codership, CN = Galera Root
        Validity                                                                                         
            Not Before: Feb 28 19:48:53 2021 GMT                                                         
            Not After : Nov 25 19:48:53 2023 GMT  

https://github.com/codership/galera/blob/f47405c8b849386939d545ac71671c5c8e62e18c/tests/conf/galera_ca.pem#L1-L22

This cert in the repo is still expired in branch 4.x

curl -sL https://raw.githubusercontent.com/codership/galera/4.x/tests/conf/galera_ca.pem | openssl x509 -text -in - | grep -A2 Validity
        Validity
            Not Before: Feb 28 19:48:53 2021 GMT
            Not After : Nov 25 19:48:53 2023 GMT

@temeo Any chance for you to regenerate a new cert and provide a corrective new release on the 4.x branch ?

temeo commented 9 months ago

Hi, this was fixed in branch https://github.com/codership/galera/commits/4.x-26.4.16-gh-558, specifically in commit https://github.com/codership/galera/commit/462998ca28e97a95e98e0acb6e6c13cafb95083b. The fix is going to be included in the next release, but it is not ready for publishing yet.

Meanwhile, please use the above mentioned branch (based on 26.4.16) if possible.

gberche-orange commented 9 months ago

Thanks @temeo for your prompt response. We have worked around the issue in our build automation by transiently setting the date back to 2023-11-20 prior to compilation and tests. See https://github.com/orange-cloudfoundry/cf-mysql-release/pull/6/files. I'm looking forward the next 26.4.x release to properly bump galera version.

sangitanalkar commented 9 months ago

Thank you @gberche-orange and @temeo for providing the info. I'm too looking forward for the next galera 26.4.x release which would fix this issue.

temeo commented 8 months ago

Fixed in Galera 26.4.17.