This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push: new 47bbca9284c [fix](regression) fix some jdbc datasource docker health check (#39141) 47bbca9284c is described below commit 47bbca9284cf4e3f83eb5092de3b49b9af6726cb Author: zy-kkk <zhongy...@gmail.com> AuthorDate: Sat Aug 10 23:32:40 2024 +0800 [fix](regression) fix some jdbc datasource docker health check (#39141) Verify that the database table has been created by adding the database table to the SQL in the health check script. --- .../docker-compose/clickhouse/clickhouse.yaml.tpl | 2 +- .../docker-compose/clickhouse/init/05-check.sql | 23 ++++++++++++++++++++++ .../docker-compose/mariadb/init/05-check.sql | 21 ++++++++++++++++++++ .../docker-compose/mariadb/mariadb-10.yaml.tpl | 2 +- .../docker-compose/mysql/init/05-check.sql | 21 ++++++++++++++++++++ .../docker-compose/mysql/mysql-5.7.yaml.tpl | 2 +- .../docker-compose/oracle/init/05-check.sql | 21 ++++++++++++++++++++ .../docker-compose/oracle/oracle-11.yaml.tpl | 2 +- .../docker-compose/postgresql/init/05-check.sql | 21 ++++++++++++++++++++ .../postgresql/postgresql-14.yaml.tpl | 2 +- 10 files changed, 112 insertions(+), 5 deletions(-) diff --git a/docker/thirdparties/docker-compose/clickhouse/clickhouse.yaml.tpl b/docker/thirdparties/docker-compose/clickhouse/clickhouse.yaml.tpl index ba0501f3792..c4a919e1f15 100644 --- a/docker/thirdparties/docker-compose/clickhouse/clickhouse.yaml.tpl +++ b/docker/thirdparties/docker-compose/clickhouse/clickhouse.yaml.tpl @@ -30,7 +30,7 @@ services: ports: - ${DOCKER_CLICKHOUSE_EXTERNAL_HTTP_PORT}:8123 healthcheck: - test: ["CMD-SHELL", "clickhouse-client --password=123456 --query 'SELECT 1'"] + test: ["CMD-SHELL", "clickhouse-client --password=123456 --query 'SELECT 1 FROM doris_test.deadline'"] interval: 30s timeout: 10s retries: 5 diff --git a/docker/thirdparties/docker-compose/clickhouse/init/05-check.sql b/docker/thirdparties/docker-compose/clickhouse/init/05-check.sql new file mode 100644 index 00000000000..a06851aa7d2 --- /dev/null +++ b/docker/thirdparties/docker-compose/clickhouse/init/05-check.sql @@ -0,0 +1,23 @@ +-- Licensed to the Apache Software Foundation (ASF) under one +-- or more contributor license agreements. See the NOTICE file +-- distributed with this work for additional information +-- regarding copyright ownership. The ASF licenses this file +-- to you under the Apache License, Version 2.0 (the +-- "License"); you may not use this file except in compliance +-- with the License. You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, +-- software distributed under the License is distributed on an +-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +-- KIND, either express or implied. See the License for the +-- specific language governing permissions and limitations +-- under the License. + +CREATE TABLE doris_test.deadline +( + id Int64 +) +ENGINE = MergeTree +ORDER BY id; diff --git a/docker/thirdparties/docker-compose/mariadb/init/05-check.sql b/docker/thirdparties/docker-compose/mariadb/init/05-check.sql new file mode 100644 index 00000000000..56541c08f48 --- /dev/null +++ b/docker/thirdparties/docker-compose/mariadb/init/05-check.sql @@ -0,0 +1,21 @@ +-- Licensed to the Apache Software Foundation (ASF) under one +-- or more contributor license agreements. See the NOTICE file +-- distributed with this work for additional information +-- regarding copyright ownership. The ASF licenses this file +-- to you under the Apache License, Version 2.0 (the +-- "License"); you may not use this file except in compliance +-- with the License. You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, +-- software distributed under the License is distributed on an +-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +-- KIND, either express or implied. See the License for the +-- specific language governing permissions and limitations +-- under the License. + +CREATE TABLE doris_test.deadline +( + id int +); diff --git a/docker/thirdparties/docker-compose/mariadb/mariadb-10.yaml.tpl b/docker/thirdparties/docker-compose/mariadb/mariadb-10.yaml.tpl index f6af7ffed84..f22b1a0b0af 100644 --- a/docker/thirdparties/docker-compose/mariadb/mariadb-10.yaml.tpl +++ b/docker/thirdparties/docker-compose/mariadb/mariadb-10.yaml.tpl @@ -30,7 +30,7 @@ services: ports: - ${DOCKER_MARIADB_EXTERNAL_PORT}:3306 healthcheck: - test: mysqladmin ping -h 127.0.0.1 -u root --password=$$MARIADB_ROOT_PASSWORD + test: mysqladmin ping -h 127.0.0.1 -u root --password=$$MARIADB_ROOT_PASSWORD && mysql -h 127.0.0.1 -u root --password=$$MARIADB_ROOT_PASSWORD -e "SELECT 1 FROM doris_test.deadline;" interval: 5s timeout: 60s retries: 120 diff --git a/docker/thirdparties/docker-compose/mysql/init/05-check.sql b/docker/thirdparties/docker-compose/mysql/init/05-check.sql new file mode 100644 index 00000000000..56541c08f48 --- /dev/null +++ b/docker/thirdparties/docker-compose/mysql/init/05-check.sql @@ -0,0 +1,21 @@ +-- Licensed to the Apache Software Foundation (ASF) under one +-- or more contributor license agreements. See the NOTICE file +-- distributed with this work for additional information +-- regarding copyright ownership. The ASF licenses this file +-- to you under the Apache License, Version 2.0 (the +-- "License"); you may not use this file except in compliance +-- with the License. You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, +-- software distributed under the License is distributed on an +-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +-- KIND, either express or implied. See the License for the +-- specific language governing permissions and limitations +-- under the License. + +CREATE TABLE doris_test.deadline +( + id int +); diff --git a/docker/thirdparties/docker-compose/mysql/mysql-5.7.yaml.tpl b/docker/thirdparties/docker-compose/mysql/mysql-5.7.yaml.tpl index 6c6ad81e411..c335fecace7 100644 --- a/docker/thirdparties/docker-compose/mysql/mysql-5.7.yaml.tpl +++ b/docker/thirdparties/docker-compose/mysql/mysql-5.7.yaml.tpl @@ -30,7 +30,7 @@ services: ports: - ${DOCKER_MYSQL_57_EXTERNAL_PORT}:3306 healthcheck: - test: mysqladmin ping -h 127.0.0.1 -u root --password=$$MYSQL_ROOT_PASSWORD + test: mysqladmin ping -h 127.0.0.1 -u root --password=$$MYSQL_ROOT_PASSWORD && mysql -h 127.0.0.1 -u root --password=$$MYSQL_ROOT_PASSWORD -e "SELECT 1 FROM doris_test.deadline;" interval: 5s timeout: 60s retries: 120 diff --git a/docker/thirdparties/docker-compose/oracle/init/05-check.sql b/docker/thirdparties/docker-compose/oracle/init/05-check.sql new file mode 100644 index 00000000000..640c51fe180 --- /dev/null +++ b/docker/thirdparties/docker-compose/oracle/init/05-check.sql @@ -0,0 +1,21 @@ +-- Licensed to the Apache Software Foundation (ASF) under one +-- or more contributor license agreements. See the NOTICE file +-- distributed with this work for additional information +-- regarding copyright ownership. The ASF licenses this file +-- to you under the Apache License, Version 2.0 (the +-- "License"); you may not use this file except in compliance +-- with the License. You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, +-- software distributed under the License is distributed on an +-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +-- KIND, either express or implied. See the License for the +-- specific language governing permissions and limitations +-- under the License. + +CREATE TABLE doris_test.deadline +( + id number(5) +); diff --git a/docker/thirdparties/docker-compose/oracle/oracle-11.yaml.tpl b/docker/thirdparties/docker-compose/oracle/oracle-11.yaml.tpl index 9a1dc15da6c..c9fb89016fa 100644 --- a/docker/thirdparties/docker-compose/oracle/oracle-11.yaml.tpl +++ b/docker/thirdparties/docker-compose/oracle/oracle-11.yaml.tpl @@ -25,7 +25,7 @@ services: - ${DOCKER_ORACLE_EXTERNAL_PORT}:1521 privileged: true healthcheck: - test: [ "CMD", "bash", "-c", "echo 'select 1 from dual;' | ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe /u01/app/oracle/product/11.2.0/xe/bin/sqlplus -s DORIS_TEST/123456@localhost"] + test: [ "CMD", "bash", "-c", "echo 'SELECT 1 FROM doris_test.deadline;' | ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe /u01/app/oracle/product/11.2.0/xe/bin/sqlplus -s DORIS_TEST/123456@localhost" ] interval: 20s timeout: 60s retries: 120 diff --git a/docker/thirdparties/docker-compose/postgresql/init/05-check.sql b/docker/thirdparties/docker-compose/postgresql/init/05-check.sql new file mode 100644 index 00000000000..56541c08f48 --- /dev/null +++ b/docker/thirdparties/docker-compose/postgresql/init/05-check.sql @@ -0,0 +1,21 @@ +-- Licensed to the Apache Software Foundation (ASF) under one +-- or more contributor license agreements. See the NOTICE file +-- distributed with this work for additional information +-- regarding copyright ownership. The ASF licenses this file +-- to you under the Apache License, Version 2.0 (the +-- "License"); you may not use this file except in compliance +-- with the License. You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, +-- software distributed under the License is distributed on an +-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +-- KIND, either express or implied. See the License for the +-- specific language governing permissions and limitations +-- under the License. + +CREATE TABLE doris_test.deadline +( + id int +); diff --git a/docker/thirdparties/docker-compose/postgresql/postgresql-14.yaml.tpl b/docker/thirdparties/docker-compose/postgresql/postgresql-14.yaml.tpl index ebc8ed185fa..9cea58777ec 100644 --- a/docker/thirdparties/docker-compose/postgresql/postgresql-14.yaml.tpl +++ b/docker/thirdparties/docker-compose/postgresql/postgresql-14.yaml.tpl @@ -26,7 +26,7 @@ services: ports: - ${DOCKER_PG_14_EXTERNAL_PORT}:5432 healthcheck: - test: ["CMD-SHELL", "pg_isready -U postgres"] + test: [ "CMD-SHELL", "pg_isready -U postgres && psql -U postgres -c 'SELECT 1 FROM doris_test.deadline;'" ] interval: 5s timeout: 60s retries: 120 --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org