Open w1ndblow opened 4 months ago
@w1ndblow
I am sorry but I have hard time understanding what the issue is. Can you please rephrase:
when pvc is creating it binds to first local-home mount (/opt/atlassian/jira/logs) and logs get space whereas local-home directory /opt/atlassian/jira/ is not
Btw, /opt/atlassian/jira
should not be persisted at all, it's an installation directory.
Our existing configuration uses subPath which makes it possible to use 2 volumeMounts in 1 volume.
Again, can you please paraphrase your problem statement, e.g. "Logs in directory xxx not persisted" or "Can't create a pod because of...".
Our existing configuration uses subPath which makes it possible to use 2 volumeMounts in 1 volume.
What does it mean? There is configuration https://github.com/atlassian/data-center-helm-charts/blob/main/src/main/charts/jira/templates/_helpers.tpl#L153 path with values .Values.jira.accessLog.mountPath
gets pv with pvc whereas path with value .Values.volumes.localHome.mountPath
(/var/atlassian/application-data/jira) is not
Yes, that's expected. The two volume mounts use one PVC, one volumeMount (tomcat logs) is using subpath. This way data is persisted in both locations and there's no need to declare an additional PVC just to persist Tomcat logs.
I think you are mistaken in interpreting this feature, as you can see in the official documentation the example is given with several containers and not with one. To confirm my words, try to run this configuration on your cluster and go into the container and see the information about system mounts (df
for example)
@w1ndblow it does not matter if it's one or several containers. Both directories are persisted:
root@jira-0:/var/atlassian/application-data/jira# mount | grep jira
/dev/vda1 on /var/atlassian/application-data/jira type ext4 (rw,relatime,discard)
/dev/vda1 on /opt/atlassian/jira/logs type ext4 (rw,relatime,discard)
Just to confirm, what you say is that your Jira home is not persisted? Can you write a file to /var/atlassian/application-data/jira
, kill the pod and then check if the file is still there?
Also, can you share more information about your k8s version, vendor/cloud and storage class?
the provisioner of class is csi.vsphere.vmware.com, server version v1.26.5 there is private instances of k8s. i don't achieve behavior like in your cluster, but it is not so important, i suggest more clearly configuration If user need to persist logs of specific instance he may create different pvc
@w1ndblow can you please answer the question I asked a few times already?
Just to confirm, what you say is that your Jira home is not persisted? Can you write a file to /var/atlassian/application-data/jira, kill the pod and then check if the file is still there?
If you see different behavior with subPath, you may want to investigate it for your particular k8s provider and StorageClass. Like I said before this is the first report of subPath not working and Jira home not being persisted. Can you share output from mount command in your jira container?
I figured out the problem, command df
и web ui in jira displays only one of mount's
df -h
Filesystem Size Used Avail Use% Mounted on
overlay 98G 54G 40G 58% /
tmpfs 64M 0 64M 0% /dev
/dev/mapper/deb--vg-root 19G 5.2G 13G 30% /etc/hosts
/dev/mapper/vg0-lv0 98G 54G 40G 58% /etc/hostname
shm 64M 0 64M 0% /dev/shm
/dev/rbd2 9.8G 33M 9.7G 1% /var/atlassian/application-data/jira
tmpfs 63G 12K 63G 1% <>
tmpfs 32G 0 32G 0% /proc/acpi
tmpfs 32G 0 32G 0% /sys/firmware
but there are two in fact
mount | grep "/var/atlassian/application-data/jira"
/dev/rbd2 on /var/atlassian/application-data/jira type ext4 (rw,relatime,discard,stripe=16)
mount | grep "/opt/atlassian/jira/logs"
/dev/rbd2 on /opt/atlassian/jira/logs type ext4 (rw,relatime,discard,stripe=16)
it is still possible to separate the log sections from the home one, this will be more explicit and simplify the configuration
Suggestion
problem happen with config
Into the pod mounts other volume
when pvc is creating it binds to first local-home mount (/opt/atlassian/jira/logs) and logs get space whereas local-home directory /var/atlassian/application-data/jira is not, it can see
df
commandif my decision https://github.com/atlassian/data-center-helm-charts/pull/842 is not satisfied with our plan, i suggest create other variable and pvc for that
Product
jira
Code of Conduct