<p>We have observed following issue when we deploy Ignite Cluster on Open Shift</p>
<p>We have created respective PV and PVC YAML files.</p>
<p>One more important point is always it points to /ignite/work irrespective of Mount Path.</p>
<p>Error details at POD:
SLF4J: Failed to load class &quot;org.slf4j.impl.StaticLoggerBinder&quot;.
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See <a href="http://www.slf4j.org/codes.html#StaticLoggerBinder" rel="nofollow noreferrer">http://www.slf4j.org/codes.html#StaticLoggerBinder</a> for further details.
class org.apache.ignite.IgniteException: Work directory does not exist and cannot be created: /ignite/work
at org.apache.ignite.internal.util.IgniteUtils.convertException(IgniteUtils.java:1135)
at org.apache.ignite.Ignition.start(Ignition.java:356)
at org.apache.ignite.startup.cmdline.CommandLineStartup.main(CommandLineStartup.java:365)
Caused by: class org.apache.ignite.IgniteCheckedException: Work directory does not exist and cannot be created: /ignite/work
at org.apache.ignite.internal.util.IgniteUtils.workDirectory(IgniteUtils.java:9900)
at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.initializeConfiguration(IgnitionEx.java:1891)
at org.apache.ignite.internal.IgnitionEx$IgniteNamedInstance.start(IgnitionEx.java:1715)
at org.apache.ignite.internal.IgnitionEx.start0(IgnitionEx.java:1160)
at org.apache.ignite.internal.IgnitionEx.startConfigurations(IgnitionEx.java:1054)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:940)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:839)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:709)
at org.apache.ignite.internal.IgnitionEx.start(IgnitionEx.java:678)
at org.apache.ignite.Ignition.start(Ignition.java:353)
... 1 more
Failed to start grid: Work directory does not exist and cannot be created: /ignite/work</p>
<hr />
<p>YAML Content</p>
<hr />
<p>apiVersion: v1
kind: PersistentVolume
metadata:
annotations:
field.cattle.io/creatorId: user-zqf4l
creationTimestamp: &quot;2021-01-12T06:48:02Z&quot;
finalizers:</p>
<ul>
<li>kubernetes.io/pv-protection
labels:
cattle.io/creator: norman
name: ignite-storage-work-vol
resourceVersion: &quot;18595579&quot;
selfLink: /api/v1/persistentvolumes/newsto
uid: ee81855d-6497-4465-abdd-8244883e383b
spec:
accessModes:</li>
<li>ReadWriteOnce
capacity:
storage: 1Gi
hostPath:
##when you create folder ensure you give proper permission to folder Assing Owner
##chown rootadmin:rootadmin grafana
##give full writes chmod 777 grafana/
path: /opt/work ## Change the location before deploying
type: &quot;&quot;
persistentVolumeReclaimPolicy: Retain
volumeMode: Filesystem</li>
</ul>
<p>.....
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: ignite-storage-work-vol-claim
spec:
volumeName: ignite-storage-work-vol
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi</p>
<p>......</p>
<h1>An example of a Kubernetes configuration for pod deployment.</h1>
<p>apiVersion: apps/v1
kind: StatefulSet
metadata:</p>
<h1>Cluster name.</h1>
<p>name: ignite-cluster
namespace: or
spec:</p>
<h1>The initial number of Ignite pods.</h1>
<p>replicas: 2
serviceName: ignite-service
selector:
matchLabels:
app: ignite
template:
metadata:
labels:
app: ignite
spec:
serviceAccountName: ignite
# terminationGracePeriodSeconds: 60000 (use in production for graceful restarts and shutdowns)
containers:
# Custom pod name.
- name: ignite-node
image: apacheignite/ignite:2.13.0
imagePullPolicy: IfNotPresent
env:
- name: OPTION_LIBS
value: ignite-kubernetes,ignite-rest-http
- name: CONFIG_URI
value: file:///ignite/config/ignite-node-cfg.xml
- name: JVM_OPTS
value: &quot;-DIGNITE_WAL_MMAP=false&quot;
# consider this property for production -DIGNITE_WAIT_FOR_BACKUPS_ON_SHUTDOWN=true</p>
<pre><code>      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
</code></pre>

Rameish
<p>It's expecting to be able to write to <code>/ignite/work</code> but there's no persistent volume there. You appear to be mounting them in <code>/tmp</code>. Suggest changing:</p>
<pre><code>- name: work-vol
  mountPath: /tmp/work
  readOnly: false
</code></pre>
<p>To:</p>
<pre><code>- name: work-vol
  mountPath: /ignite/work
  readOnly: false
</code></pre>
<p>And the same for the other PVs.</p>
