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

本文涉及的产品
容器镜像服务 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=#


目录
相关文章
|
14天前
|
存储 设计模式 算法
【23种设计模式·全精解析 | 行为型模式篇】11种行为型模式的结构概述、案例实现、优缺点、扩展对比、使用场景、源码解析
行为型模式用于描述程序在运行时复杂的流程控制,即描述多个类或对象之间怎样相互协作共同完成单个对象都无法单独完成的任务,它涉及算法与对象间职责的分配。行为型模式分为类行为模式和对象行为模式,前者采用继承机制来在类间分派行为,后者采用组合或聚合在对象间分配行为。由于组合关系或聚合关系比继承关系耦合度低,满足“合成复用原则”,所以对象行为模式比类行为模式具有更大的灵活性。 行为型模式分为: • 模板方法模式 • 策略模式 • 命令模式 • 职责链模式 • 状态模式 • 观察者模式 • 中介者模式 • 迭代器模式 • 访问者模式 • 备忘录模式 • 解释器模式
【23种设计模式·全精解析 | 行为型模式篇】11种行为型模式的结构概述、案例实现、优缺点、扩展对比、使用场景、源码解析
|
14天前
|
设计模式 存储 安全
【23种设计模式·全精解析 | 创建型模式篇】5种创建型模式的结构概述、实现、优缺点、扩展、使用场景、源码解析
结构型模式描述如何将类或对象按某种布局组成更大的结构。它分为类结构型模式和对象结构型模式,前者采用继承机制来组织接口和类,后者釆用组合或聚合来组合对象。由于组合关系或聚合关系比继承关系耦合度低,满足“合成复用原则”,所以对象结构型模式比类结构型模式具有更大的灵活性。 结构型模式分为以下 7 种: • 代理模式 • 适配器模式 • 装饰者模式 • 桥接模式 • 外观模式 • 组合模式 • 享元模式
【23种设计模式·全精解析 | 创建型模式篇】5种创建型模式的结构概述、实现、优缺点、扩展、使用场景、源码解析
|
14天前
|
设计模式 存储 安全
【23种设计模式·全精解析 | 创建型模式篇】5种创建型模式的结构概述、实现、优缺点、扩展、使用场景、源码解析
创建型模式的主要关注点是“怎样创建对象?”,它的主要特点是"将对象的创建与使用分离”。这样可以降低系统的耦合度,使用者不需要关注对象的创建细节。创建型模式分为5种:单例模式、工厂方法模式抽象工厂式、原型模式、建造者模式。
【23种设计模式·全精解析 | 创建型模式篇】5种创建型模式的结构概述、实现、优缺点、扩展、使用场景、源码解析
|
20天前
|
域名解析 弹性计算 安全
阿里云服务器租用、注册域名、备案及域名解析完整流程参考(图文教程)
对于很多初次建站的用户来说,选购云服务器和注册应及备案和域名解析步骤必须了解的,目前轻量云服务器2核2G68元一年,2核4G4M服务器298元一年,域名注册方面,阿里云推出域名1元购买活动,新用户注册com和cn域名2年首年仅需0元,xyz和top等域名首年仅需1元。对于建站的用户来说,购买完云服务器并注册好域名之后,下一步还需要操作备案和域名绑定。本文为大家展示阿里云服务器的购买流程,域名注册、绑定以及备案的完整流程,全文以图文教程形式为大家展示具体细节及注意事项,以供新手用户参考。
|
2月前
|
缓存 监控 Java
Java线程池提交任务流程底层源码与源码解析
【11月更文挑战第30天】嘿,各位技术爱好者们,今天咱们来聊聊Java线程池提交任务的底层源码与源码解析。作为一个资深的Java开发者,我相信你一定对线程池并不陌生。线程池作为并发编程中的一大利器,其重要性不言而喻。今天,我将以对话的方式,带你一步步深入线程池的奥秘,从概述到功能点,再到背景和业务点,最后到底层原理和示例,让你对线程池有一个全新的认识。
58 12
|
1月前
|
PyTorch Shell API
Ascend Extension for PyTorch的源码解析
本文介绍了Ascend对PyTorch代码的适配过程,包括源码下载、编译步骤及常见问题,详细解析了torch-npu编译后的文件结构和三种实现昇腾NPU算子调用的方式:通过torch的register方式、定义算子方式和API重定向映射方式。这对于开发者理解和使用Ascend平台上的PyTorch具有重要指导意义。
|
1月前
|
负载均衡 网络协议 算法
Docker容器环境中服务发现与负载均衡的技术与方法,涵盖环境变量、DNS、集中式服务发现系统等方式
本文探讨了Docker容器环境中服务发现与负载均衡的技术与方法,涵盖环境变量、DNS、集中式服务发现系统等方式,以及软件负载均衡器、云服务负载均衡、容器编排工具等实现手段,强调两者结合的重要性及面临挑战的应对措施。
81 3
|
15天前
|
安全 搜索推荐 数据挖掘
陪玩系统源码开发流程解析,成品陪玩系统源码的优点
我们自主开发的多客陪玩系统源码,整合了市面上主流陪玩APP功能,支持二次开发。该系统适用于线上游戏陪玩、语音视频聊天、心理咨询等场景,提供用户注册管理、陪玩者资料库、预约匹配、实时通讯、支付结算、安全隐私保护、客户服务及数据分析等功能,打造综合性社交平台。随着互联网技术发展,陪玩系统正成为游戏爱好者的新宠,改变游戏体验并带来新的商业模式。
|
2月前
|
监控 Java 应用服务中间件
高级java面试---spring.factories文件的解析源码API机制
【11月更文挑战第20天】Spring Boot是一个用于快速构建基于Spring框架的应用程序的开源框架。它通过自动配置、起步依赖和内嵌服务器等特性,极大地简化了Spring应用的开发和部署过程。本文将深入探讨Spring Boot的背景历史、业务场景、功能点以及底层原理,并通过Java代码手写模拟Spring Boot的启动过程,特别是spring.factories文件的解析源码API机制。
92 2
|
3月前
|
缓存 Java 程序员
Map - LinkedHashSet&Map源码解析
Map - LinkedHashSet&Map源码解析
89 0

推荐镜像

更多