安装0.20版本,在已有的环境上安装,但是gitlab-postgresql 一直起不来,报错信息如图
看一下initContainer 日志是否有错误
kubectl logs gitlab-postgresql-postgresql-0 -c init-chmod-data
进入 nfs 挂载目录下查看目录权限是否正常。这里 data 目录权限为 700
# ls -al
总用量 24
drwxrwxrwx 3 1001 1001 71 9月 11 02:14 .
drwxr-xr-x. 156 root root 16384 9月 11 02:07 ..
drwx------ 19 1001 root 4096 9月 11 02:14 data
-rw-r--r-- 1 1001 root 0 9月 11 02:14 .initialized
-rw-r--r-- 1 1001 root 0 9月 11 02:14 .user_scripts_initialized
如果有错误,删掉 pvc 和 helm 实例重新安装一遍。
挂载目录
pod报错日志
[root@ccp-node3 ~]# kubectl logs -n c7n-system gitlab-postgresql-postgresql-0
Welcome to the Bitnami postgresql container
Subscribe to project updates by watching https://github.com/bitnami/bitnami-docker-postgresql
Submit issues and feature requests at https://github.com/bitnami/bitnami-docker-postgresql/issues
nami INFO Initializing postgresql
postgre INFO ==> No injected postgresql.conf file found. Creating default postgresql.conf file…
postgre INFO ==> No injected pg_hba.conf file found. Creating default pg_hba.conf file…
postgre INFO ==> Deploying PostgreSQL with persisted data…
postgre INFO ==> Cleaning stale postmaster.pid file…
postgre INFO ==> Configuring PostgreSQL…
postgre INFO ==> Configuring replication parameters…
postgre INFO ==> Configuring permissions for config files…
postgre INFO
postgre INFO ########################################################################
postgre INFO Installation parameters for postgresql:
postgre INFO Persisted data and properties have been restored.
postgre INFO Any input specified will not take effect.
postgre INFO This installation requires no credentials.
postgre INFO ########################################################################
postgre INFO
nami INFO postgresql successfully initialized
INFO ==> Starting postgresql…
INFO ==> Loading user files from /docker-entrypoint-initdb.d
INFO ==> Initialization: Waiting for PostgreSQL to be available
/run.sh: line 21: debug: command not found
/run.sh: line 21: debug: command not found
Executing /docker-entrypoint-initdb.d/…2020_09_11_06_37_51.327952371/init.sql
psql:/docker-entrypoint-initdb.d/…2020_09_11_06_37_51.327952371/init.sql:2: \connect: FATAL: database “gitlabhq_production” does not exist
Connection matched pg_hba.conf line 95: "host all all 0.0.0.0/0 md5"
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: database “gitlabhq_production” does not exist
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: database “gitlabhq_production” does not exist
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: database “gitlabhq_production” does not exist
FATAL: password authentication failed for user “postgres”
DETAIL: User “postgres” has no password assigned.
Connection matched pg_hba.conf line 95: “host all all 0.0.0.0/0 md5”
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
FATAL: database “gitlabhq_production” does not exist
[root@ccp-node3 ~]#
这就是 gitlab-postgresql 初始化的时候创建 gitlabhq_production 失败了。
删掉 pvc 和 helm 实例重新安装一遍。
你可以尝试设置 persistence.enabled=false ,不用持久化存储。这样应该是可以正常启动,且进入 pod 数据库都是存在。
将 persistence.enabled改为false后,能够正常启动了,请问后续想要持久化存储,应该怎样修改。谢谢
好的,我试试,那么后续考虑持久化存储应该如何操作?
是 nfs-server 的问题
编辑 gitlab-postgresql 对应 pv,添加如下的挂载选项 mountOptions
kubectl edit pv <c7n-mysql-pvc 对应 pv 名>
--------------------------------------
spec:
mountOptions:
- hard
- intr
- nfsvers=4.0
nfs:
path: /mnt/data/xxxx
server: 172.24.33.204
...
重启 nfs-server