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
Member

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: #287 (comment)

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 added the
kind
bug
label 2022-04-21 11:23:53 +00:00
Member

@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 Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: gitea/helm-chart#296
No description provided.