分步部署Harbor失败

WARN ==> You set the environment variable ALLOW_EMPTY_PASSWORD=yes. For safety reasons, do not use this flag in a production environment.
nami INFO Initializing redis
Error executing ‘postInstallation’: EEXIST: file already exists, symlink ‘/opt/bitnami/redis/conf’ -> ‘/opt/bitnami/redis/etc’

db的日志
here1
hehe2
The files belonging to this database system will be owned by user “postgres”.
This user must also own the server process.

The database cluster will be initialized with locales
COLLATE: en_US.UTF-8
CTYPE: en_US.UTF-8
MESSAGES: C
MONETARY: C
NUMERIC: C
TIME: C
The default text search configuration will be set to “english”.

Data page checksums are disabled.

fixing permissions on existing directory /var/lib/postgresql/data … ok
creating subdirectories … ok
selecting default max_connections … 100
selecting default shared_buffers … 64MB
selecting dynamic shared memory implementation … posix
creating configuration files … ok
FATAL: could not read directory “pg_notify”: Unknown error 523
child process exited with exit code 1
initdb: removing contents of data directory “/var/lib/postgresql/data”

  • 原因分析:

    redis和db似乎都是文件问题,但是pv和相应的pvc都是harbor的install过程中新建的,不太理解文件挂载出现问题的原因

以及部署完整代码:
helm install c7n/harbor --set externalURL=http://hippiusdevfd.hand-china.com --set ingress.hosts.core=hippiusdevfd.hand-china.com --set database.internal.volumes.data.storageClass=“nfs-provisioner” --set registry.volumes.data.storageClass=“nfs-provisioner” --set redis.master.persistence.storageClass=“nfs-provisioner” --set harborAdminPassword=Harbor12345 --version 0.3.2 --name harbor --namespace hippius-dev

  • 疑问:

    提出您对于遇到和解决该问题时的疑问

你好,请尝试删除harbor的所有pvc后重新安装。

已经试过了,pv和pvc都确认没有harbor相关内容,也会出现这个情况。另外我们这个环境里面有单独启动的mysql和redis服务组件,这个应该不会相互影响吧?

现在感觉是自动启动的redis没有跟新建的这个redis-pvc对应上,pvc目录下是空的

已经试过了,pv和pvc都确认没有harbor相关内容,也会出现这个情况。另外我们这个环境里面有单独启动的mysql和redis服务组件,这个应该不会相互影响吧?

这种情况的话 建议重启一下nfs-provisioner的pod,该pod在kube-system命名空间下

重启nfs-provisioner之后尝试删除harbor的所有pvc后重新安装。

这个环境还有别的正在使用的redis、mysql服务等,重启nfs-provisioner会对这些组件有影响么

请先查看一下redis、mysql等服务日志是否处于报错状态。按你所述harbor redis-pvc目录是空的应为nfs-provisioner出现异常

另外,在harbor异常,运行helm delete --purge harbor之后registry服务状态一直卡在Terminating删不掉,可能是有什么依赖项没有清理掉,不知道这个信息是否有帮助

请尝试在kubectl delete命令中添加--force --grace-period=0标记强制删除。

嗯嗯,现在就是这样做的

请再次测试一下nfs-provisioner运行是否正常

https://choerodon.io/zh/docs/installation-configuration/steps/nfs/

好的,正在验证

pod直接没了,应该是有问题

C:\Users\dell.helm\cache\archive>kubectl get po
NAME READY STATUS RESTARTS AGE
write-pod 0/1 ContainerCreating 0 1m

C:\Users\dell.helm\cache\archive>kubectl get po
No resources found, use --show-all to see completed objects.

请执行
kubectl get po --show-all


成功了吧这是

好像是成功了

好吧 那看来确实是没问题 :joy:

有没有可能跟我这个环境里面有另外两个独立提供服务的redis和mysql组件有关系?
他们挂的pvc名字叫c7n-mysql-pvc和c7n-redis-pvc,pod名叫mysql和redis
胡乱猜测的:joy:没辙了