k8s安装20.3.0成功,但是重启pod后漂移到另一台机器会报错,已解决 悬赏5积分
k8s-deploy-yaml如下
---
kind: Deployment
apiVersion: apps/v1
metadata:
name: svc-zentao
namespace: base-service
labels:
app: svc-zentao
spec:
replicas: 1
selector:
matchLabels:
app: svc-zentao
template:
metadata:
creationTimestamp: null
labels:
app: svc-zentao
spec:
volumes:
- name: zentao-pvc-test
persistentVolumeClaim:
claimName: zentao-pvc-test
containers:
- name: zentao
image: zentao:20.3.0
ports:
- name: tcp-80
containerPort: 80
protocol: TCP
env:
- name: TZ
value: Asia/Shanghai
- name: MYSQL_INTERNAL
value: 'true'
resources:
limits:
cpu: '1'
memory: 1Gi
requests:
cpu: '1'
memory: 1Gi
volumeMounts:
- name: zentao-pvc-test
mountPath: /data
---
持久化了 /data , 存储用的glsuterfs共享存储
如果还是使用这个节点跑zentao的话,不会报错,如果换节点的话, 存储是可以拉到的,只是会报错
23:57:23.01 23:57:23.01 Welcome to the Easysoft ZenTao 20.3.0 container 23:57:23.01 Subscribe to project updates by watching https://www.zentao.net 23:57:23.01 Submit issues and feature requests at https://www.zentao.net/ask.html 23:57:23.01 23:57:23.02 INFO ==> Prepare persistence directories. mv: cannot remove '/apps/zentao/config/license': Directory not empty23:57:23.01 Welcome to the Easysoft ZenTao 20.3.0 container
23:57:23.01 Subscribe to project updates by watching https://www.zentao.net
23:57:23.01 Submit issues and feature requests at https://www.zentao.net/ask.html
23:57:23.01
23:57:23.02 INFO ==> Prepare persistence directories.
mv: cannot remove '/apps/zentao/config/license': Directory not empty
,然后就重启了
23:57:09.40 23:57:09.40 Welcome to the Easysoft ZenTao 20.3.0 container 23:57:09.40 Subscribe to project updates by watching https://www.zentao.net 23:57:09.40 Submit issues and feature requests at https://www.zentao.net/ask.html 23:57:09.41 23:57:09.42 INFO ==> Prepare persistence directories. mv: cannot remove '/apps/zentao/config/license': Directory not empty
23:57:09.40 23:57:09.40 Welcome to the Easysoft ZenTao 20.3.0 container 23:57:09.40 Subscribe to project updates by watching https://www.zentao.net 23:57:09.40 Submit issues and feature requests at https://www.zentao.net/ask.html 23:57:09.41 23:57:09.42 INFO ==> Prepare persistence directories. mv: cannot remove '/apps/zentao/config/license': Directory not empty
23:57:09.40 23:57:09.40 Welcome to the Easysoft ZenTao 20.3.0 container 23:57:09.40 Subscribe to project updates by watching https://www.zentao.net 23:57:09.40 Submit issues and feature requests at https://www.zentao.net/ask.html 23:57:09.41 23:57:09.42 INFO ==> Prepare persistence directories. mv: cannot remove '/apps/zentao/config/license': Directory not empty
23:57:23.01 23:57:23.01 Welcome to the Easysoft ZenTao 20.3.0 container 23:57:23.01 Subscribe to project updates by watching https://www.zentao.net 23:57:23.01 Submit issues and feature requests at https://www.zentao.net/ask.html 23:57:23.01 23:57:23.02 INFO ==> Prepare persistence directories. mv: cannot remove '/apps/zentao/config/license': Directory not empty
禅道版本:禅道开源版 20.2.0
安装包类型:源码包
操作系统:CentOS
客户端浏览器:Chrome
禅道-李锡碧
2024-07-25 09:09:09
原因可能是mv的目标目录下有与源目录下同名的目录。
可以尝试:在yaml中添加DEBUG环境变量为true开启debug后看看这个完整的命令行操作是什么,然后把目标目录下的文件手动重命名一下,看下。
另外,禅道使用问题,可以联系客户经理QQ,邀请加入技术交流群沟通。
回复
|