Every time a pod restarts the below error occurs
No such file or directory: '/var/lib/odoo/filestore//e7/e7aa49e28912f86a83133bd5730a9f410d778dff odoo.exceptions.CacheMiss: 'ir.attachment(13,).raw
I have already mapped volumes so that the filestore data is not lost when the container restarts.
as below:
Deployment extract
    volumeMounts:
        - name: odoo-webdata
          mountPath: /var/lib/odoo
volumes:
    - name: odoo-webdata
      persistentVolumeClaim:
        claimName: odoo-web-data
PersistentVolumeClaim extract
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
    name: odoo-web-data
spec:
    accessModes:
        - ReadWriteOnce
    resources:
        requests:
            storage: 10Giodoo.conf extract
[options] data_dir = /var/lib/odoo
Workaround
I have to delete the record (s) in the attachment table as below, which is annoying and not maintainable. What am i missing ? Thanks
records = self.env['ir.attachment'].search([]) record.unlink() self.env.cr.commit()
