我们在Open Shift上部署Ignite Cluster时发现了以下问题
我们已经创建了各自的PV和PVC YAML文件。
更重要的一点是,无论挂载路径如何,它总是指向/ignite/work。
POD的错误详细信息:SLF4J:加载类"org. SLF4J .impl. staticloggerbinder"失败。SLF4J:默认为无操作(NOP)日志记录器实现SLF4J:请参阅http://www.slf4j.org/codes.html#StaticLoggerBinder了解更多详细信息。org.apache.ignite.IgniteException:工作目录不存在,无法创建:/ignite/Workorg.apache.ignite.internal.util.IgniteUtils.convertException (IgniteUtils.java: 1135)org.apache.ignite.Ignition.start (Ignition.java: 356)org.apache.ignite.startup.cmdline.CommandLineStartup.main (CommandLineStartup.java: 365)产生原因:class org.apache.ignite.IgniteCheckedException: Work directory does not exist and cannot be created:/ignite/Workorg.apache.ignite.internal.util.IgniteUtils.workDirectory (IgniteUtils.java: 9900)org.apache.ignite.internal.IgnitionEx IgniteNamedInstance.initializeConfiguration美元(IgnitionEx.java: 1891)org.apache.ignite.internal.IgnitionEx IgniteNamedInstance.start美元(IgnitionEx.java: 1715)org.apache.ignite.internal.IgnitionEx.start0 (IgnitionEx.java: 1160)org.apache.ignite.internal.IgnitionEx.startConfigurations (IgnitionEx.java: 1054)org.apache.ignite.internal.IgnitionEx.start (IgnitionEx.java: 940)org.apache.ignite.internal.IgnitionEx.start (IgnitionEx.java: 839)org.apache.ignite.internal.IgnitionEx.start (IgnitionEx.java: 709)org.apache.ignite.internal.IgnitionEx.start (IgnitionEx.java: 678)org.apache.ignite.Ignition.start (Ignition.java: 353)…1启动网格失败:工作目录不存在,无法创建:/ignite/Work
YAML内容
apiVersion: v1: PersistentVolume元数据:注释:field.cattle。io/creatorId: user-zqf4lcreationTimestamp:"2021 - 01 - 12 - t06:48:02z"终结器:
- kubernetes.io/pv-protection标签:牛。io/创造者:诺曼名称:ignite-storage-work-volresourceVersion:"18595579";selfLink:/api/v1/persistentvolumes/newstouid: ee81855d - 6497 - 4465 - abdd e383b——8244883规范:accessModes:
- ReadWriteOnce容量:存储:1胃肠道hostPath:当你创建文件夹时,确保你给文件夹的所有者适当的权限##chown rootadmin:rootadminchmod 777 grafana/路径:/opt/work ##部署前修改位置类型:"persistentVolumeReclaimPolicy:保留volumeMode:文件系统
…apiVersion: v1: PersistentVolumeClaim元数据:名称:ignite-storage-work-vol-claim规范:volumeName: ignite-storage-work-volaccessModes:——ReadWriteOnce资源:请求:存储:1 gi
……
一个用于pod部署的Kubernetes配置示例。apiVersion:应用程序/v1: StatefulSet元数据:
<标题>集群名称。标题>名字:ignite-cluster名称空间:或规范:
点燃吊舱的初始数量。
副本:2名:ignite-service选择器:matchLabels:应用:点燃模板:元数据:标签:应用:点燃规范:serviceAccountName:点燃# terminationGracePeriodSeconds: 60000(在生产环境中用于优雅重启和关闭)容器:#自定义pod名称。—name: ignite-node图片:apacheignite/点燃:2.13.0imagePullPolicy: IfNotPresentenv:—name: OPTION_LIBS价值:ignite-kubernetes ignite-rest-http—name: CONFIG_URI价值:文件:////config/ignite-node-cfg.xml点燃—名称:"JVM_OPTS"价值:"-DIGNITE_WAL_MMAP = false"-DIGNITE_WAIT_FOR_BACKUPS_ON_SHUTDOWN=true
ports:
# Ports you might need to open.
- containerPort: 47100 # communication SPI port
- containerPort: 47500 # discovery SPI port
- containerPort: 49112 # JMX port
- containerPort: 10800 # thin clients/JDBC driver port
- containerPort: 8080 # REST API
volumeMounts:
- mountPath: /ignite/config
name: config-vol
- name: work-vol
mountPath: /tmp/work
readOnly: false
- name: storage-vol
mountPath: /tmp/storage
readOnly: false
- name: wal-vol
mountPath: /tmp/wal
readOnly: false
- name: walarchive-vol
mountPath: /tmp/walarchive
readOnly: false
volumes:
- name: config-vol
configMap:
name: ignite-cfg-persistent
- name: work-vol
persistentVolumeClaim:
claimName: ignite-storage-work-vol-claim
- name: storage-vol
persistentVolumeClaim:
claimName: ignite-storage-storage-vol-claim
- name: wal-vol
persistentVolumeClaim:
claimName: ignite-storage-wal-vol-claim
- name: walarchive-vol
persistentVolumeClaim:
claimName: ignite-storage-walarchive-vol-claim
它期望能够写入/ignite/work
,但是那里没有持久的卷。你好像把它们装在/tmp
里了。建议改变:
- name: work-vol
mountPath: /tmp/work
readOnly: false
:
- name: work-vol
mountPath: /ignite/work
readOnly: false
其他pv也一样。