siemens / kas

Setup tool for bitbake based projects
MIT License
363 stars 147 forks source link

Archive *.tar.zst not written to shared cache via cifs and kas 4.3 #125

Open ocebr opened 1 month ago

ocebr commented 1 month ago

I'm trying to run a yocto build using kas in Gitlab CI/CD. The build target is an AKS (Azure Kubernetes service) For that, I have configured a gitlab runner, PVC and bitbake hash server.

Gitlab runner config :

 config: |
   [[runners]]
     [runners.kubernetes]
       cpu_request = "6"
      [[runners.kubernetes.volumes.pvc]]
        name = "sstate-cache"
        mount_path = "/sstate-cache"
      [[runners.kubernetes.volumes.pvc]]
        name = "downloads"
        mount_path = "/downloads"

PVC :

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  name: sstate-cache
  namespace: test
spec:
  accessModes:
  - ReadWriteMany 
  storageClassName: azurefile-csi-zrs
  resources:
    requests:
      storage: 150Gi

---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  name: downloads
  namespace: test
spec:
  accessModes:
    - ReadWriteMany
  resources:
    requests:
      storage: 150Gi
  storageClassName: azurefile-csi-zrs

Cache variables such as SSTATE_DIR and DL_DIR has been set up respectively to /sstate-cache and /downloads

Yet, build still take too much time to complete, everything is being rebuilt, and no archive file of type .tar.zst exists in cache. only *.tar.zst.siginfo are in cache.

When changing shared cache location to /tmp on the pod, archive are successfully created. I think the problem is related to cifs.

For some reasons, I'm not able at the very the moment to switch to nfs. Does someone already encouters such issue or could even think why this happen ?