从源码解析MogDB/openGauss容器制作教程(三)

本文涉及的产品
容器服务 Serverless 版 ACK Serverless,317元额度 多规格
容器服务 Serverless 版 ACK Serverless,952元额度 多规格
容器镜像服务 ACR,镜像仓库100个 不限时长
简介: 从源码解析MogDB/openGauss容器制作教程

二、容器打包

1. 下载安装包

[root@ecs-lee 3.0.1]# wget https://cdn-mogdb.enmotech.com/mogdb-media/3.0.1/MogDB-3.0.1-CentOS-x86_64.tar.gz  ^C
[root@ecs-lee 3.0.1]# tar -xf MogDB-3.0.1-CentOS-64bit.tar.gz

2. 打包

[root@ecs-lee enmotech-docker-mogdb]# ls
1.0.0  1.0.1  1.1.0  2.0.0  2.0.1  2.0.3  2.1.0  2.1.1  3.0.0  3.0.1  buildDockerImage.sh  create_master_slave.sh  LICENSE  origin-opengauss-text.png  README.md
[root@ecs-lee enmotech-docker-mogdb]# ./buildDockerImage.sh -v 3.0.1 -i
Ignored MD5 checksum.
==========================
DOCKER info:
Client:
 Context:    default
 Debug Mode: false
 Plugins:
  app: Docker App (Docker Inc., v0.9.1-beta3)
  buildx: Docker Buildx (Docker Inc., v0.7.1-docker)
  scan: Docker Scan (Docker Inc., v0.12.0)
Server:
 Containers: 54
  Running: 26
  Paused: 0
  Stopped: 28
 Images: 65
 Server Version: 20.10.12
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
  userxattr: false
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Cgroup Version: 1
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 io.containerd.runtime.v1.linux runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 7b11cfaabd73bb80907dd23182b9347b4245eb5d
 runc version: v1.0.2-0-g52b36a2
 init version: de40ad0
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 3.10.0-1160.15.2.el7.x86_64
 Operating System: CentOS Linux 7 (Core)
 OSType: linux
 Architecture: x86_64
 CPUs: 4
 Total Memory: 15.51GiB
 Name: ecs-lee
 ID: GYME:4QYA:D4QF:RJOT:FBO3:CGBJ:BWCT:7IMP:3TIU:4TUA:R33L:6W3Z
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Username: 15501059069
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Registry Mirrors:
  http://hub-mirror.c.163.com/
  https://registry.docker-cn.com/
  https://pee6w651.mirror.aliyuncs.com/
 Live Restore Enabled: false
==========================
Building image 'swr.cn-north-4.myhuaweicloud.com/mogdb/mogdb:3.0.1_amd' ...
Sending build context to Docker daemon  107.2MB
Step 1/15 : FROM ubuntu:18.04 as builder
 ---> dcf4d4bef137
Step 2/15 : RUN set -eux;     apt-get update && apt-get install -y     wget &&     wget https://gitee.com/lee1002/gosu/attach_files/943635/download/gosu-amd64  &&     wget https://cdn-mogdb.enmotech.com/mogdb-media/3.0.1/Plugins-3.0.1-CentOS-x86_64.tar.gz &&     wget https://gitee.com/enmotech/compat-tools/attach_files/1110114/download/compat-tools-v2022.06.28.tar &&     wget https://gitee.com/enmotech/mogila/attach_files/954052/download/mogila-v1.0.0.bz2
 ---> Running in 2c9fa8155580
...
2022-09-09 06:27:40 (139 KB/s) - 'mogila-v1.0.0.bz2' saved [955694/955694]
Removing intermediate container 2c9fa8155580
 ---> aec8dfcb94d4
Step 3/15 : FROM ubuntu:18.04
 ---> dcf4d4bef137
Step 4/15 : ADD  MogDB-3.0.1-CentOS-64bit.tar.gz /usr/local/mogdb
 ---> 3d918fecd300
Step 5/15 : COPY --from=builder /gosu-amd64  /usr/local/bin/gosu
 ---> 31924dad711c
Step 6/15 : COPY --from=builder /Plugins-3.0.1-CentOS-x86_64.tar.gz  /tmp
 ---> 19cf1715733c
Step 7/15 : COPY --from=builder /compat-tools-v2022.06.28.tar  /tmp
 ---> a67c2b892f92
Step 8/15 : COPY --from=builder /mogila-v1.0.0.bz2  /tmp
 ---> 629ed723ad41
Step 9/15 : COPY entrypoint.sh /usr/local/bin/
 ---> e22ac8b04195
Step 10/15 : ENV LANG en_US.utf8
 ---> Running in 449596bdbfc7
Removing intermediate container 449596bdbfc7
 ---> 4bb6adc4abbc
Step 11/15 : ENV PGDATA /var/lib/mogdb/data
 ---> Running in 90f445deb780
Removing intermediate container 90f445deb780
 ---> c64779467abb
Step 12/15 : RUN set -eux;     apt-get update && apt-get install -y     libaio-dev     libkeyutils-dev     libnuma-dev     locales     libreadline-dev     vim      procps &&     rm -rf /var/lib/apt/lists/*;     ln -s /lib/x86_64-linux-gnu/libreadline.so.7 /lib/x86_64-linux-gnu/libreadline.so.6;     groupadd -g 70 omm;      useradd -u 70 -g omm -m -s /bin/bash omm;      mkdir -p /var/lib/mogdb &&     mkdir -p /usr/local/mogdb &&     mkdir -p /var/run/mogdb  &&     mkdir /docker-entrypoint-initdb.d &&     mkdir -p  /usr/local/mogdb/share/postgresql/contrib &&     tar -xf /tmp/compat-tools-v2022.06.28.tar -C /home/omm &&     mv /home/omm/compat-tools-v2022.06.28 /home/omm/compat-tools &&     tar -xf /tmp/mogila-v1.0.0.bz2 -C /home/omm &&     tar -xf /tmp/Plugins-3.0.1-CentOS-x86_64.tar.gz -C /usr/local/mogdb &&     rm -rf /usr/local/mogdb/plugin/postgis &&     rm -f /tmp/compat-tools-v2022.06.28.tar &&     rm -f /tmp/Plugins-3.0.1-CentOS-x86_64.tar.gz &&     rm -f /tmp/mogila-v1.0.0.bz2 &&     chown omm:omm /var/lib/mogdb /home/omm /var/run/mogdb /docker-entrypoint-initdb.d /usr/local/mogdb/ /usr/local/mogdb/lib /usr/local/mogdb/lib/postgresql /usr/local/mogdb/share/postgresql/contrib /usr/local/mogdb/share/postgresql/extension /usr/local/mogdb/bin &&     locale-gen en_US.UTF-8 &&     echo "export GAUSSHOME=/usr/local/mogdb"  >> /home/omm/.bashrc &&     echo "export PATH=\$GAUSSHOME/bin:\$PATH " >> /home/omm/.bashrc &&     echo "export LD_LIBRARY_PATH=\$GAUSSHOME/lib:\$LD_LIBRARY_PATH" >> /home/omm/.bashrc &&     echo "export GAUSSLOG=/var/lib/mogdb/data/pg_log" >> /home/omm/.bashrc &&     echo "export PGDATA=/var/lib/mogdb/data" >> /home/omm/.bashrc &&     echo "\set PROMPT1 'MogDB%R%#'" >> /home/omm/.gsqlrc &&     echo "\set PROMPT2 '#'" >> /home/omm/.gsqlrc &&     echo "\set PROMPT3 '>'" >> /home/omm/.gsqlrc &&     chown -R omm:omm /home/omm &&     chmod +x /usr/local/bin/gosu &&     chmod 755 /usr/local/bin/entrypoint.sh /usr/local/mogdb/plugins &&     cp `find /usr/local/mogdb/plugins -name *.so` /usr/local/mogdb/lib/postgresql/ &&     cp `find /usr/local/mogdb/plugins -name "*.control" -or -name "*.sql"` /usr/local/mogdb/share/postgresql/extension/ &&     cp `find /usr/local/mogdb/plugins -name pg_repack -type f -or -name pg_bulkload -type f -or -name postgresql` /usr/local/mogdb/bin/ &&     cp `find /usr/local/mogdb/plugins -name pg_timestamp.sql -or -name uninstall_pg_timestamp.sql` /usr/local/mogdb/share/postgresql/contrib/ &&     rm -rf /usr/local/mogdb/plugins &&     chmod 755 /usr/local/mogdb/lib/postgresql/* /usr/local/mogdb/share/postgresql/extension/* /usr/local/mogdb/bin/pg_repack /usr/local/mogdb/share/postgresql/contrib/pg_timestamp.sql &&     ln -s /usr/local/bin/entrypoint.sh /
 ---> Running in a323b79e8ad3
...
Removing intermediate container a323b79e8ad3
 ---> f55ce41f7e90
Step 13/15 : ENTRYPOINT ["entrypoint.sh"]
 ---> Running in cf2e22f83941
Removing intermediate container cf2e22f83941
 ---> 12272e02e627
Step 14/15 : EXPOSE 5432
 ---> Running in 6effe6ad1ee8
Removing intermediate container 6effe6ad1ee8
 ---> 969e80e978c1
Step 15/15 : CMD ["mogdb"]
 ---> Running in cdf7bc12e544
Removing intermediate container cdf7bc12e544
 ---> 98be66283571
Successfully built 98be66283571
Successfully tagged swr.cn-north-4.myhuaweicloud.com/mogdb/mogdb:3.0.1_amd
  MogDB Docker Image  3.0.1 is ready to be extended:
    --> swr.cn-north-4.myhuaweicloud.com/mogdb/mogdb:3.0.1_amd
  Build completed in 180 seconds.

三、容器验证

[root@ecs-lee enmotech-docker-mogdb]# docker image ls 
REPOSITORY                                      TAG     IMAGE ID     CREATED SIZE 
swr.cn-north-4.myhuaweicloud.com/mogdb/mogdb 3.0.1_amd 2a74132455e2 36 seconds ago 727MB 
[root@ecs-lee enmotech-docker-mogdb]# docker image ls 
REPOSITORY                                      TAG     IMAGE ID     CREATED SIZE 
swr.cn-north-4.myhuaweicloud.com/mogdb/mogdb 3.0.1_amd 2a74132455e2 36 seconds ago 727MB 
[root@ecs-lee enmotech-docker-mogdb]# docker run --name mogdb --privileged=true -d swr.cn-north-4.myhuaweicloud.com/mogdb/mogdb:3.0.1_amd 12b8ed3e37e874bde7c0df5c247e43dda0eb1b72a13e247aa4d70f533fed9670 
[root@ecs-lee 3.0.1]# docker logs -f mogdb
                        Message: The supplied GS_PASSWORD is meet requirements.
The files belonging to this database system will be owned by user "omm".
This user must also own the server process.
The database cluster will be initialized with locale "C".
The default text search configuration will be set to "english".
fixing permissions on existing directory /var/lib/mogdb/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 32MB
creating configuration files ... ok
Begin init undo subsystem meta.
[INIT UNDO] Init undo subsystem meta successfully.
creating template1 database in /var/lib/mogdb/data/base/1 ... The core dump path from /proc/sys/kernel/core_pattern is an invalid directory:/opt/mogdb/corefile/
2022-09-08 02:56:56.938 [unknown] [unknown] localhost 139708980549824 0[0:0#0]  [BACKEND] WARNING:  macAddr is 578/2886795268, sysidentifier is 37923857/284257, randomNum is 3140245089
ok
The core dump path from /proc/sys/kernel/core_pattern is an invalid directory:/opt/mogdb/corefile/
initializing pg_authid ... ok
The core dump path from /proc/sys/kernel/core_pattern is an invalid directory:/opt/mogdb/corefile/
setting password ... ok
The core dump path from /proc/sys/kernel/core_pattern is an invalid directory:/opt/mogdb/corefile/
initializing dependencies ... ok
The core dump path from /proc/sys/kernel/core_pattern is an invalid directory:/opt/mogdb/corefile/
loading PL/pgSQL server-side language ... ok
The core dump path from /proc/sys/kernel/core_pattern is an invalid directory:/opt/mogdb/corefile/
creating system views ... ok
The core dump path from /proc/sys/kernel/core_pattern is an invalid directory:/opt/mogdb/corefile/
creating performance views ... ok
The core dump path from /proc/sys/kernel/core_pattern is an invalid directory:/opt/mogdb/corefile/
loading system objects' descriptions ... ok
The core dump path from /proc/sys/kernel/core_pattern is an invalid directory:/opt/mogdb/corefile/
creating collations ... ok
The core dump path from /proc/sys/kernel/core_pattern is an invalid directory:/opt/mogdb/corefile/
creating conversions ... ok
The core dump path from /proc/sys/kernel/core_pattern is an invalid directory:/opt/mogdb/corefile/
creating dictionaries ... ok
The core dump path from /proc/sys/kernel/core_pattern is an invalid directory:/opt/mogdb/corefile/
setting privileges on built-in objects ... ok
The core dump path from /proc/sys/kernel/core_pattern is an invalid directory:/opt/mogdb/corefile/
initialize global configure for bucketmap length ... ok
The core dump path from /proc/sys/kernel/core_pattern is an invalid directory:/opt/mogdb/corefile/
The core dump path from /proc/sys/kernel/core_pattern is an invalid directory:/opt/mogdb/corefile/
creating information schema ... ok
The core dump path from /proc/sys/kernel/core_pattern is an invalid directory:/opt/mogdb/corefile/
loading foreign-data wrapper for distfs access ... ok
The core dump path from /proc/sys/kernel/core_pattern is an invalid directory:/opt/mogdb/corefile/
loading foreign-data wrapper for hdfs access ... ok
The core dump path from /proc/sys/kernel/core_pattern is an invalid directory:/opt/mogdb/corefile/
loading foreign-data wrapper for log access ... ok
The core dump path from /proc/sys/kernel/core_pattern is an invalid directory:/opt/mogdb/corefile/
loading hstore extension ... ok
The core dump path from /proc/sys/kernel/core_pattern is an invalid directory:/opt/mogdb/corefile/
loading foreign-data wrapper for MOT access ... ok
The core dump path from /proc/sys/kernel/core_pattern is an invalid directory:/opt/mogdb/corefile/
loading security plugin ... ok
The core dump path from /proc/sys/kernel/core_pattern is an invalid directory:/opt/mogdb/corefile/
update system tables ... ok
The core dump path from /proc/sys/kernel/core_pattern is an invalid directory:/opt/mogdb/corefile/
The core dump path from /proc/sys/kernel/core_pattern is an invalid directory:/opt/mogdb/corefile/
The core dump path from /proc/sys/kernel/core_pattern is an invalid directory:/opt/mogdb/corefile/
The core dump path from /proc/sys/kernel/core_pattern is an invalid directory:/opt/mogdb/corefile/
The core dump path from /proc/sys/kernel/core_pattern is an invalid directory:/opt/mogdb/corefile/
The core dump path from /proc/sys/kernel/core_pattern is an invalid directory:/opt/mogdb/corefile/
creating snapshots catalog ... ok
The core dump path from /proc/sys/kernel/core_pattern is an invalid directory:/opt/mogdb/corefile/
vacuuming database template1 ... ok
The core dump path from /proc/sys/kernel/core_pattern is an invalid directory:/opt/mogdb/corefile/
copying template1 to template0 ... ok
The core dump path from /proc/sys/kernel/core_pattern is an invalid directory:/opt/mogdb/corefile/
copying template1 to postgres ... ok
freezing database template0 ... ok
freezing database template1 ... ok
freezing database postgres ... ok
WARNING: enabling "trust" authentication for local connections
You can change this by editing pg_hba.conf or using the option -A, or
--auth-local and --auth-host, the next time you run gs_initdb.
Success. You can now start the database server of single node using:
    mogdb -D /var/lib/mogdb/data --single_node
or
    gs_ctl start -D /var/lib/mogdb/data -Z single_node -l logfile
[2022-09-08 02:57:11.586][182][][gs_ctl]: gs_ctl started,datadir is /var/lib/mogdb/data
[2022-09-08 02:57:11.653][182][][gs_ctl]: waiting for server to start...
.0 LOG:  [Alarm Module]can not read GAUSS_WARNING_TYPE env.
0 LOG:  [Alarm Module]Host Name: 12b8ed3e37e8
0 LOG:  [Alarm Module]Host IP: 172.17.0.4
0 LOG:  [Alarm Module]Get ENV GS_CLUSTER_NAME failed!
0 WARNING:  failed to open feature control file, please check whether it exists: FileName=gaussdb.version, Errno=2, Errmessage=No such file or directory.
0 WARNING:  failed to parse feature control file: gaussdb.version.
0 WARNING:  Failed to load the product control file, so gaussdb cannot distinguish product version.
The core dump path from /proc/sys/kernel/core_pattern is an invalid directory:/opt/mogdb/corefile/
2022-09-08 02:57:11.792 [unknown] [unknown] localhost 139814390462656 0[0:0#0]  0 [BACKEND] LOG:  when starting as multi_standby mode, we couldn't support data replicaton.
gaussdb.state does not exist, and skipt setting since it is optional.2022-09-08 02:57:11.799 [unknown] [unknown] localhost 139814390462656 0[0:0#0]  0 [BACKEND] LOG:  [Alarm Module]can not read GAUSS_WARNING_TYPE env.
2022-09-08 02:57:11.799 [unknown] [unknown] localhost 139814390462656 0[0:0#0]  0 [BACKEND] LOG:  [Alarm Module]Host Name: 12b8ed3e37e8
2022-09-08 02:57:11.799 [unknown] [unknown] localhost 139814390462656 0[0:0#0]  0 [BACKEND] LOG:  [Alarm Module]Host IP: 172.17.0.4
2022-09-08 02:57:11.799 [unknown] [unknown] localhost 139814390462656 0[0:0#0]  0 [BACKEND] LOG:  [Alarm Module]Get ENV GS_CLUSTER_NAME failed!
2022-09-08 02:57:11.804 [unknown] [unknown] localhost 139814390462656 0[0:0#0]  0 [BACKEND] LOG:  loaded library "security_plugin"
2022-09-08 02:57:11.804 [unknown] [unknown] localhost 139814390462656 0[0:0#0]  0 [BACKEND] WARNING:  could not create any HA TCP/IP sockets
2022-09-08 02:57:11.804 [unknown] [unknown] localhost 139814390462656 0[0:0#0]  0 [BACKEND] WARNING:  could not create any HA TCP/IP sockets
2022-09-08 02:57:11.810 [unknown] [unknown] localhost 139814390462656 0[0:0#0]  0 [BACKEND] WARNING:  No explicit IP is configured for listen_addresses GUC.
2022-09-08 02:57:11.810 [unknown] [unknown] localhost 139814390462656 0[0:0#0]  0 [BACKEND] LOG:  InitNuma numaNodeNum: 1 numa_distribute_mode: none inheritThreadPool: 0.
2022-09-08 02:57:11.810 [unknown] [unknown] localhost 139814390462656 0[0:0#0]  0 [BACKEND] LOG:  reserved memory for backend threads is: 220 MB
2022-09-08 02:57:11.810 [unknown] [unknown] localhost 139814390462656 0[0:0#0]  0 [BACKEND] LOG:  reserved memory for WAL buffers is: 128 MB
2022-09-08 02:57:11.810 [unknown] [unknown] localhost 139814390462656 0[0:0#0]  0 [BACKEND] LOG:  Set max backend reserve memory is: 348 MB, max dynamic memory is: 11064 MB
2022-09-08 02:57:11.810 [unknown] [unknown] localhost 139814390462656 0[0:0#0]  0 [BACKEND] LOG:  shared memory 363 Mbytes, memory context 11412 Mbytes, max process memory 12288 Mbytes
2022-09-08 02:57:11.838 [unknown] [unknown] localhost 139814390462656 0[0:0#0]  0 [CACHE] LOG:  set data cache  size(402653184)
2022-09-08 02:57:11.855 [unknown] [unknown] localhost 139814390462656 0[0:0#0]  0 [CACHE] LOG:  set metadata cache  size(134217728)
2022-09-08 02:57:11.894 [unknown] [unknown] localhost 139814390462656 0[0:0#0]  0 [SEGMENT_PAGE] LOG:  Segment-page constants: DF_MAP_SIZE: 8156, DF_MAP_BIT_CNT: 65248, DF_MAP_GROUP_EXTENTS: 4175872, IPBLOCK_SIZE: 8168, EXTENTS_PER_IPBLOCK: 1021, IPBLOCK_GROUP_SIZE: 4090, BMT_HEADER_LEVEL0_TOTAL_PAGES: 8323072, BktMapEntryNumberPerBlock: 2038, BktMapBlockNumber: 25, BktBitMaxMapCnt: 512
2022-09-08 02:57:11.926 [unknown] [unknown] localhost 139814390462656 0[0:0#0]  0 [BACKEND] LOG:  mogdb: fsync file "/var/lib/mogdb/data/gaussdb.state.temp" success
2022-09-08 02:57:11.926 [unknown] [unknown] localhost 139814390462656 0[0:0#0]  0 [BACKEND] LOG:  create gaussdb state file success: db state(STARTING_STATE), server mode(Normal), connection index(1)
2022-09-08 02:57:11.958 [unknown] [unknown] localhost 139814390462656 0[0:0#0]  0 [BACKEND] LOG:  max_safe_fds = 978, usable_fds = 1000, already_open = 12
The core dump path from /proc/sys/kernel/core_pattern is an invalid directory:/opt/mogdb/corefile/
2022-09-08 02:57:11.960 [unknown] [unknown] localhost 139814390462656 0[0:0#0]  0 [BACKEND] LOG:  user configure file is not found, it will be created.
2022-09-08 02:57:11.965 [unknown] [unknown] localhost 139814390462656 0[0:0#0]  0 [BACKEND] LOG:  the configure file /usr/local/mogdb/etc/gscgroup_omm.cfg doesn't exist or the size of configure file has changed. Please create it by root user!
2022-09-08 02:57:11.965 [unknown] [unknown] localhost 139814390462656 0[0:0#0]  0 [BACKEND] LOG:  Failed to parse cgroup config file.
2022-09-08 02:57:11.988 [unknown] [unknown] localhost 139814390462656 0[0:0#0]  0 [EXECUTOR] WARNING:  Failed to obtain environment value $GAUSSLOG!
2022-09-08 02:57:11.988 [unknown] [unknown] localhost 139814390462656 0[0:0#0]  0 [EXECUTOR] DETAIL:  N/A
2022-09-08 02:57:11.988 [unknown] [unknown] localhost 139814390462656 0[0:0#0]  0 [EXECUTOR] CAUSE:  Incorrect environment value.
2022-09-08 02:57:11.988 [unknown] [unknown] localhost 139814390462656 0[0:0#0]  0 [EXECUTOR] ACTION:  Please refer to backend log for more details.
2022-09-08 02:57:11.989 [unknown] [unknown] localhost 139814390462656 0[0:0#0]  0 [EXECUTOR] WARNING:  Failed to obtain environment value $GAUSSLOG!
2022-09-08 02:57:11.989 [unknown] [unknown] localhost 139814390462656 0[0:0#0]  0 [EXECUTOR] DETAIL:  N/A
2022-09-08 02:57:11.989 [unknown] [unknown] localhost 139814390462656 0[0:0#0]  0 [EXECUTOR] CAUSE:  Incorrect environment value.
2022-09-08 02:57:11.989 [unknown] [unknown] localhost 139814390462656 0[0:0#0]  0 [EXECUTOR] ACTION:  Please refer to backend log for more details.
[2022-09-08 02:57:12.657][182][][gs_ctl]:  done
[2022-09-08 02:57:12.657][182][][gs_ctl]: server started (/var/lib/mogdb/data)
 default user is mogdb
 default no repuser created
Execute SQL: gsql -v ON_ERROR_STOP=1 --username omm --dbname postgres
CREATE EXTENSION
CREATE EXTENSION
CREATE EXTENSION
CREATE EXTENSION
CREATE EXTENSION
CREATE EXTENSION
Execute SQL: gsql -v ON_ERROR_STOP=1 --username omm --dbname postgres
gsql:runMe.sql:152: NOTICE:
gsql:runMe.sql:152: NOTICE:  -- =====================================================================
gsql:runMe.sql:152: NOTICE:  -- Compat Object List:
gsql:runMe.sql:152: NOTICE:  -- =====================================================================
gsql:runMe.sql:152: NOTICE:     | type      | name                                                                        | version | language        | operation                        |
gsql:runMe.sql:152: NOTICE:     |-----------|-----------------------------------------------------------------------------|---------|-----------------|----------------------------------|
gsql:runMe.sql:152: NOTICE:     | function  | compat_tools.mg_sequence()                                                  | 1.0     |                 | Initial creation                 |
gsql:runMe.sql:152: NOTICE:     | view      | compat_tools.dba_sequences                                                  | 2.0     |                 | Initial creation                 |
creation                 |
gsql:runMe.sql:152: NOTICE:     | function  | pg_catalog.digits(numeric)                                                  | 1.0     | sql             | Initial creation                 |
gsql:runMe.sql:152: NOTICE:
gsql:runMe.sql:152: NOTICE:  -- =====================================================================
gsql:runMe.sql:152: NOTICE:  -- Test Summary:
gsql:runMe.sql:152: NOTICE:  -- =====================================================================
gsql:runMe.sql:152: NOTICE:     | result_type | case_count | start_time          | complete_time       |
gsql:runMe.sql:152: NOTICE:     |-------------|------------|---------------------|---------------------|
gsql:runMe.sql:152: NOTICE:     | PASSED      |        521 | 2022-09-08 02:57:13 | 2022-09-08 02:57:15 |
gsql:runMe.sql:152: NOTICE:
gsql:runMe.sql:152: NOTICE:  -- =====================================================================
gsql:runMe.sql:152: NOTICE:  -- Test Detail (Failed or Null):
gsql:runMe.sql:152: NOTICE:  -- =====================================================================
gsql:runMe.sql:152: NOTICE:  -- <<< ALL SUCCEED >>>
Execute SQL: gsql -v ON_ERROR_STOP=1 --username omm --dbname postgres --set passwd=Enmo@123
NOTICE:  The encrypted password contains MD5 ciphertext, which is not secure.
CREATE ROLE
CREATE DATABASE
CREATE DATABASE
ALTER ROLE
ALTER ROLE
GS_DB = omm
Execute SQL: gsql -v ON_ERROR_STOP=1 --username omm --dbname postgres --dbname mogila
gsql:mogila-insert-data.sql:47673: WARNING:  Trigger function with non-plpgsql type is not recommended.
DETAIL:  Non-plpgsql trigger function are not shippable by default.
HINT:  Unshippable trigger may lead to bad performance.
Execute SQL: gsql -v ON_ERROR_STOP=1 --username omm --dbname postgres
 slotname | xlog_position
----------+---------------
 wal2json | 0/40E5998
(1 row)
NOTICE:  CREATE TABLE / PRIMARY KEY will create implicit index "test_pkey" for table "test"
CREATE TABLE
INSERT 0 1
INSERT 0 1
INSERT 0 1
ALTER TABLE
/usr/local/bin/entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
[2022-09-08 02:57:56.882][296][][gs_ctl]: gs_ctl stopped ,datadir is /var/lib/mogdb/data
waiting for server to shut down........... done
server stopped
MogDB  init process complete; ready for start up.
0 LOG:  [Alarm Module]can not read GAUSS_WARNING_TYPE env.
0 LOG:  [Alarm Module]Host Name: 12b8ed3e37e8
0 LOG:  [Alarm Module]Host IP: 172.17.0.4
0 LOG:  [Alarm Module]Get ENV GS_CLUSTER_NAME failed!
0 WARNING:  failed to open feature control file, please check whether it exists: FileName=gaussdb.version, Errno=2, Errmessage=No such file or directory.
0 WARNING:  failed to parse feature control file: gaussdb.version.
0 WARNING:  Failed to load the product control file, so gaussdb cannot distinguish product version.
The core dump path from /proc/sys/kernel/core_pattern is an invalid directory:/opt/mogdb/corefile/
2022-09-08 02:58:05.040 [unknown] [unknown] localhost 140198371371200 0[0:0#0]  0 [BACKEND] LOG:  when starting as multi_standby mode, we couldn't support data replicaton.
2022-09-08 02:58:05.046 [unknown] [unknown] localhost 140198371371200 0[0:0#0]  0 [BACKEND] LOG:  [Alarm Module]can not read GAUSS_WARNING_TYPE env.
2022-09-08 02:58:05.046 [unknown] [unknown] localhost 140198371371200 0[0:0#0]  0 [BACKEND] LOG:  [Alarm Module]Host Name: 12b8ed3e37e8
2022-09-08 02:58:05.046 [unknown] [unknown] localhost 140198371371200 0[0:0#0]  0 [BACKEND] LOG:  [Alarm Module]Host IP: 172.17.0.4
2022-09-08 02:58:05.046 [unknown] [unknown] localhost 140198371371200 0[0:0#0]  0 [BACKEND] LOG:  [Alarm Module]Get ENV GS_CLUSTER_NAME failed!
2022-09-08 02:58:05.050 [unknown] [unknown] localhost 140198371371200 0[0:0#0]  0 [BACKEND] LOG:  loaded library "security_plugin"
2022-09-08 02:58:05.050 [unknown] [unknown] localhost 140198371371200 0[0:0#0]  0 [BACKEND] WARNING:  could not create any HA TCP/IP sockets
2022-09-08 02:58:05.050 [unknown] [unknown] localhost 140198371371200 0[0:0#0]  0 [BACKEND] WARNING:  could not create any HA TCP/IP sockets
2022-09-08 02:58:05.056 [unknown] [unknown] localhost 140198371371200 0[0:0#0]  0 [BACKEND] WARNING:  No explicit IP is configured for listen_addresses GUC.
2022-09-08 02:58:05.056 [unknown] [unknown] localhost 140198371371200 0[0:0#0]  0 [BACKEND] LOG:  InitNuma numaNodeNum: 1 numa_distribute_mode: none inheritThreadPool: 0.
2022-09-08 02:58:05.056 [unknown] [unknown] localhost 140198371371200 0[0:0#0]  0 [BACKEND] LOG:  reserved memory for backend threads is: 220 MB
2022-09-08 02:58:05.056 [unknown] [unknown] localhost 140198371371200 0[0:0#0]  0 [BACKEND] LOG:  reserved memory for WAL buffers is: 128 MB
2022-09-08 02:58:05.056 [unknown] [unknown] localhost 140198371371200 0[0:0#0]  0 [BACKEND] LOG:  Set max backend reserve memory is: 348 MB, max dynamic memory is: 11064 MB
2022-09-08 02:58:05.056 [unknown] [unknown] localhost 140198371371200 0[0:0#0]  0 [BACKEND] LOG:  shared memory 363 Mbytes, memory context 11412 Mbytes, max process memory 12288 Mbytes
2022-09-08 02:58:05.084 [unknown] [unknown] localhost 140198371371200 0[0:0#0]  0 [CACHE] LOG:  set data cache  size(402653184)
2022-09-08 02:58:05.101 [unknown] [unknown] localhost 140198371371200 0[0:0#0]  0 [CACHE] LOG:  set metadata cache  size(134217728)
2022-09-08 02:58:05.139 [unknown] [unknown] localhost 140198371371200 0[0:0#0]  0 [SEGMENT_PAGE] LOG:  Segment-page constants: DF_MAP_SIZE: 8156, DF_MAP_BIT_CNT: 65248, DF_MAP_GROUP_EXTENTS: 4175872, IPBLOCK_SIZE: 8168, EXTENTS_PER_IPBLOCK: 1021, IPBLOCK_GROUP_SIZE: 4090, BMT_HEADER_LEVEL0_TOTAL_PAGES: 8323072, BktMapEntryNumberPerBlock: 2038, BktMapBlockNumber: 25, BktBitMaxMapCnt: 512
2022-09-08 02:58:05.172 [unknown] [unknown] localhost 140198371371200 0[0:0#0]  0 [BACKEND] LOG:  mogdb: fsync file "/var/lib/mogdb/data/gaussdb.state.temp" success
2022-09-08 02:58:05.172 [unknown] [unknown] localhost 140198371371200 0[0:0#0]  0 [BACKEND] LOG:  create gaussdb state file success: db state(STARTING_STATE), server mode(Normal), connection index(1)
2022-09-08 02:58:05.192 [unknown] [unknown] localhost 140198371371200 0[0:0#0]  0 [BACKEND] LOG:  max_safe_fds = 977, usable_fds = 1000, already_open = 13
The core dump path from /proc/sys/kernel/core_pattern is an invalid directory:/opt/mogdb/corefile/
2022-09-08 02:58:05.195 [unknown] [unknown] localhost 140198371371200 0[0:0#0]  0 [BACKEND] LOG:  the configure file /usr/local/mogdb/etc/gscgroup_omm.cfg doesn't exist or the size of configure file has changed. Please create it by root user!
2022-09-08 02:58:05.195 [unknown] [unknown] localhost 140198371371200 0[0:0#0]  0 [BACKEND] LOG:  Failed to parse cgroup config file.
2022-09-08 02:58:05.219 [unknown] [unknown] localhost 140198371371200 0[0:0#0]  0 [EXECUTOR] WARNING:  Failed to obtain environment value $GAUSSLOG!
2022-09-08 02:58:05.219 [unknown] [unknown] localhost 140198371371200 0[0:0#0]  0 [EXECUTOR] DETAIL:  N/A
2022-09-08 02:58:05.219 [unknown] [unknown] localhost 140198371371200 0[0:0#0]  0 [EXECUTOR] CAUSE:  Incorrect environment value.
2022-09-08 02:58:05.219 [unknown] [unknown] localhost 140198371371200 0[0:0#0]  0 [EXECUTOR] ACTION:  Please refer to backend log for more details.
2022-09-08 02:58:05.220 [unknown] [unknown] localhost 140198371371200 0[0:0#0]  0 [EXECUTOR] WARNING:  Failed to obtain environment value $GAUSSLOG!
2022-09-08 02:58:05.220 [unknown] [unknown] localhost 140198371371200 0[0:0#0]  0 [EXECUTOR] DETAIL:  N/A
2022-09-08 02:58:05.220 [unknown] [unknown] localhost 140198371371200 0[0:0#0]  0 [EXECUTOR] CAUSE:  Incorrect environment value.
2022-09-08 02:58:05.220 [unknown] [unknown] localhost 140198371371200 0[0:0#0]  0 [EXECUTOR] ACTION:  Please refer to backend log for more details.
[root@ecs-lee 3.0.1]# docker exec -it mogdb bash
root@12b8ed3e37e8:/# su - omm
omm@12b8ed3e37e8:~$ gsql -d postgres -p5432 -r
gsql ((MogDB 3.0.1 build 1a363ea9) compiled at 2022-08-05 17:31:04 commit 0 last mr  )
Non-SSL connection (SSL connection is recommended when requiring high-security)
Type "help" for help.
MogDB=#select version();
                                                                     version
--------------------------------------------------------------------------------------------------------------------------------------------------
 (MogDB 3.0.1 build 1a363ea9) compiled at 2022-08-05 17:31:04 commit 0 last mr   on x86_64-unknown-linux-gnu, compiled by g++ (GCC) 7.3.0, 64-bit
(1 row)
MogDB=#


目录
相关文章
|
10天前
|
消息中间件 缓存 安全
Future与FutureTask源码解析,接口阻塞问题及解决方案
【11月更文挑战第5天】在Java开发中,多线程编程是提高系统并发性能和资源利用率的重要手段。然而,多线程编程也带来了诸如线程安全、死锁、接口阻塞等一系列复杂问题。本文将深度剖析多线程优化技巧、Future与FutureTask的源码、接口阻塞问题及解决方案,并通过具体业务场景和Java代码示例进行实战演示。
29 3
|
18天前
|
缓存 前端开发 JavaScript
前端的全栈之路Meteor篇(二):容器化开发环境下的meteor工程架构解析
本文详细介绍了使用Docker创建Meteor项目的准备工作与步骤,解析了容器化Meteor项目的目录结构,包括工程准备、环境配置、容器启动及项目架构分析。提供了最佳实践建议,适合初学者参考学习。项目代码已托管至GitCode,方便读者实践与交流。
|
22天前
|
存储 应用服务中间件 云计算
深入解析:云计算中的容器化技术——Docker实战指南
【10月更文挑战第14天】深入解析:云计算中的容器化技术——Docker实战指南
51 1
|
27天前
|
存储
让星星⭐月亮告诉你,HashMap的put方法源码解析及其中两种会触发扩容的场景(足够详尽,有问题欢迎指正~)
`HashMap`的`put`方法通过调用`putVal`实现,主要涉及两个场景下的扩容操作:1. 初始化时,链表数组的初始容量设为16,阈值设为12;2. 当存储的元素个数超过阈值时,链表数组的容量和阈值均翻倍。`putVal`方法处理键值对的插入,包括链表和红黑树的转换,确保高效的数据存取。
51 5
|
24天前
|
弹性计算 Kubernetes 网络协议
阿里云弹性网络接口技术的容器网络基础教程
阿里云弹性网络接口技术的容器网络基础教程
阿里云弹性网络接口技术的容器网络基础教程
|
29天前
|
Java Spring
Spring底层架构源码解析(三)
Spring底层架构源码解析(三)
|
29天前
|
XML Java 数据格式
Spring底层架构源码解析(二)
Spring底层架构源码解析(二)
|
24天前
|
XML Java 数据格式
Spring IOC容器的深度解析及实战应用
【10月更文挑战第14天】在软件工程中,随着系统规模的扩大,对象间的依赖关系变得越来越复杂,这导致了系统的高耦合度,增加了开发和维护的难度。为解决这一问题,Michael Mattson在1996年提出了IOC(Inversion of Control,控制反转)理论,旨在降低对象间的耦合度,提高系统的灵活性和可维护性。Spring框架正是基于这一理论,通过IOC容器实现了对象间的依赖注入和生命周期管理。
61 0
|
9天前
|
Kubernetes 监控 开发者
掌握容器化:Docker与Kubernetes的最佳实践
【10月更文挑战第26天】本文深入探讨了Docker和Kubernetes的最佳实践,涵盖Dockerfile优化、数据卷管理、网络配置、Pod设计、服务发现与负载均衡、声明式更新等内容。同时介绍了容器化现有应用、自动化部署、监控与日志等开发技巧,以及Docker Compose和Helm等实用工具。旨在帮助开发者提高开发效率和系统稳定性,构建现代、高效、可扩展的应用。
|
5天前
|
关系型数据库 MySQL API

推荐镜像

更多
下一篇
无影云桌面