extraVolumeMounts during initial deployment might cause /data/gitea/conf/app.ini to not get created #296

Closed
opened 2022-02-12 19:35:34 +00:00 by pat-s · 1 comment
pat-s commented 2022-02-12 19:35:34 +00:00 (Migrated from gitea.com)

I've spent many hours troubleshooting a fresh deployment which had an additional extraVolumeMounts set with a mount path of mountPath: "/data/gitea/public/css".

If such a mount exists, the initial creation of /data/gitea/conf/app.ini won't work and the init-app-ini container will fail with

=== All configuration sources loaded ===

2022/02/12 19:20:55 ...nvironment-to-ini.go:109:runEnvironmentToIni() [W] Custom config '/data/gitea/conf/app.ini' not found, ignore this if you're running first time
2022/02/12 19:20:55 ...nvironment-to-ini.go:89:main() [F] Failed to run app with [environment-to-ini -o /data/gitea/conf/app.ini -p ENV_TO_INI]: open /data/gitea/conf/app.ini: no such file or directory

I am not entirely sure how the mount interfers here but I know from other expierences that this is not a rare event.
Adding the mount after the initial deployment won't cause any issues.

I've reproduced this issue multiple times.
When reproducing, it is important to start with a fresh data dir, i.e. to not use persistence.

Related to this comment: https://gitea.com/gitea/helm-chart/issues/287#issuecomment-693179

I've spent many hours troubleshooting a fresh deployment which had an additional `extraVolumeMounts` set with a mount path of `mountPath: "/data/gitea/public/css"`. If such a mount exists, the initial creation of `/data/gitea/conf/app.ini` won't work and the `init-app-ini` container will fail with ```bash === All configuration sources loaded === 2022/02/12 19:20:55 ...nvironment-to-ini.go:109:runEnvironmentToIni() [W] Custom config '/data/gitea/conf/app.ini' not found, ignore this if you're running first time 2022/02/12 19:20:55 ...nvironment-to-ini.go:89:main() [F] Failed to run app with [environment-to-ini -o /data/gitea/conf/app.ini -p ENV_TO_INI]: open /data/gitea/conf/app.ini: no such file or directory ``` I am not entirely sure how the mount interfers here but I know from other expierences that this is not a rare event. Adding the mount after the initial deployment won't cause any issues. I've reproduced this issue multiple times. When reproducing, it is important to start with a fresh data dir, i.e. to not use persistence. Related to this comment: https://gitea.com/gitea/helm-chart/issues/287#issuecomment-693179
justusbunsi commented 2022-07-10 15:29:11 +00:00 (Migrated from gitea.com)

@pat-s I've created PR #337 which allows to differ between additional init container mounts and runtime container mounts. Feel free to check it out and test it.

@pat-s I've created PR #337 which allows to differ between additional init container mounts and runtime container mounts. Feel free to check it out and test it.
Sign in to join this conversation.
No projects
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: lunny/helm-chart#296