Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[actualserver] .migrate file is not persistent leading to error when pod is recreated #30662

Open
3 tasks done
Qwal-1 opened this issue Jan 7, 2025 · 0 comments · May be fixed by #30663
Open
3 tasks done

[actualserver] .migrate file is not persistent leading to error when pod is recreated #30662

Qwal-1 opened this issue Jan 7, 2025 · 0 comments · May be fixed by #30663
Labels
bug Something isn't working

Comments

@Qwal-1
Copy link
Contributor

Qwal-1 commented Jan 7, 2025

Chart Name

actualserver

Operating System

other

Deployment Method

FluxCD

Chart Version

12.11.0

Kubernetes Events

28s (x5 over 110s)       Normal    Created                  Pod/actualserver-55558bfd6d-pncbj                 Created container: actualserver
28s (x5 over 110s)       Normal    Pulled                   Pod/actualserver-55558bfd6d-pncbj                 Container image "ghcr.io/actualbudget/actual-server:24.12.0@sha256:4747e19b9a323359894ed50da2fb4d060659897f3c2a3acd77cabd532d2ee771" already present on machine
27s (x5 over 110s)       Normal    Started                  Pod/actualserver-55558bfd6d-pncbj                 Started container actualserver
10s (x17 over 109s)      Warning   BackOff                  Pod/actualserver-55558bfd6d-pncbj                 Back-off restarting failed container actualserver in pod actualserver-55558bfd6d-pncbj_actualserver-test(99066b9c-8cda-4d0c-bf1e-efd15a9e7c01)

Chart Logs

Checking if there are any migrations to run for direction "up"...
/app/node_modules/better-sqlite3/lib/methods/wrappers.js:9
 this[cppdb].exec(sql);
             ^
SqliteError: no such column: password
    at Database.exec (/app/node_modules/better-sqlite3/lib/methods/wrappers.js:9:14)
    at WrappedDatabase.exec (file:///app/src/db.js:30:20)
    at Migration.up (file:///app/migrations/1718889148000-openid.js:4:24)
    at next (/app/node_modules/migrate/lib/migrate.js:35:45)
    at /app/node_modules/migrate/lib/migrate.js:71:9
    at /app/node_modules/migrate/lib/set.js:84:5
    at FSReqCallback.oncomplete (node:fs:192:23) {
  code: 'SQLITE_ERROR'
}
Node.js v18.20.5

Chart Configuration

apiVersion: helm.toolkit.fluxcd.io/v2
kind: HelmRelease
metadata:
    name: actualserver-test
    namespace: actualserver-test
spec:
    interval: 15m
    chart:
        spec:
            chart: actualserver
            version: 12.11.0
            sourceRef:
                kind: HelmRepository
                name: truecharts
                namespace: flux-system
    releaseName: actualserver
    values:
        ingress:
            main:
                enabled: true
                hosts:
                    - host: actual-test.${DOMAIN_0}
                      paths:
                        - path: /
                          pathType: Prefix

Describe the bug

Actual-Server creates a ".migrate" file in /data
This file is not persisted in the current chart setup since server and user files are manually mounted in /data/server-files and /data/user-files.
This might be a leftover from an old actual setup since in the current docs/example for actualserver only the data folder itself is mounted https://github.com/actualbudget/actual-server/blob/master/docker-compose.yml#L21

When the pod is recreated this file is missing and the mentioned error occures and the pod falls into CrashBackLoop.
Manually changing persistence to only mount the /data folder fixes the issue for me, but this requires exporting and reimporting the data.

To Reproduce

  1. Setup actualserver chart with minimal content
  2. Create a budget in actual (needs to be synced to the server)
  3. Delete the pod
  4. Error occurs when pod is recreated

Expected Behavior

Recreating the pod should not lead to any issues.
The .migrate file needs to be persisted as well.

Screenshots

image

Additional Context

I've read and agree with the following

  • I've checked all open and closed issues and my issue is not there.
  • I've understand TrueNAS SCALE Apps are deprecated and TrueCharts does not accept TrueNAS SCALE related issues
  • I've prefixed my issue title with [Chart-Name]
@Qwal-1 Qwal-1 added the bug Something isn't working label Jan 7, 2025
@Qwal-1 Qwal-1 linked a pull request Jan 7, 2025 that will close this issue
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant