[bitnami/redmine] NFS synching issues with gems bundler
Name and Version
bitnami/redmine:5.0.2-debian-11-r23
What steps will reproduce the bug?
If I use the image redmine:5.0.2-debian-11-r23 using NFS to mount the storage (for example in kubernetes with a pvc) ... seems that there are synching issues:
Please configure your config/database.yml first
/opt/bitnami/ruby/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler/definition.rb:398:in `ensure_equivalent_gemfile_and_lockfile': You are trying to install in deployment mode after changing (Bundler::ProductionError)
your Gemfile. Run `bundle install` elsewhere and add the
updated ../../opt/bitnami/redmine/Gemfile.lock to version control.
If I don't use NFS, everything is ok.
Here's a detailed example.
Install from scratch:
helm upgrade --install redmine-01 --namespace redmine-01 --values $HOME/deployments/helm/redmine-01-values.yaml --version 20.3.3 bitnami/redmine
As you can see in the vaules posted below, we use NFS to provide storage to redmine app, so we've enabled persistence: in this case we have the error specified below.
If we do not use persistence (see additional information), then everything goes fine.
Please, note that NFS has no problem, since we use it succesfully with mariadb and other stuff.
Values:
redmineUsername: redmine
persistence:
enabled: true
storageClass: nfs-online
size: 8Gi
existingSecret: redmine-01
resources:
requests:
memory: 256Mi
cpu: 100m
# i seguenti limiti sono necessari per lo startup
limits:
memory: 768Mi
cpu: 700m
databaseType: mariadb
mariadb:
auth:
database: bitnami_redmine
existingSecret: redmine-01-mariadb
architecture: standalone
primary:
name: master
persistence:
enabled: true
storageClass: nfs-online
accessMode: ReadWriteOnce
size: 1Gi
resources:
requests:
memory: 128Mi
cpu: 50m
limits:
memory: 512Mi
cpu: 500m
postgresql:
enabled: false
service:
type: ClusterIP
ingress:
enabled: true
hostname: redmine-01.replynet.prv
tls: true
extraTls:
- hosts:
- redmine-01.replynet.prv
secretName: redmine-01.replynet.prv-tls
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/proxy-body-size: 8m
## SMTP mail delivery configuration
## ref: https://github.com/bitnami/bitnami-docker-redmine/#smtp-configuration
smtpHost: smtp-01.smtp-01.svc.cluster.local
smtpPort: 25
What is the expected behavior?
# kubectl get pods -n redmine-01
NAME READY STATUS RESTARTS AGE
redmine-01-b64fdf5f9-gszb9 1/1 Running 0 149m
redmine-01-mariadb-0 1/1 Running 0 149m
What do you see instead?
Pod status:
# kubectl get pods -n redmine-01
NAME READY STATUS RESTARTS AGE
redmine-01-b64fdf5f9-wqnml 0/1 CrashLoopBackOff 6 13m
redmine-01-mariadb-0 1/1 Running 0 53m
Logs:
# kubectl logs -f -n redmine-01 redmine-01-b64fdf5f9-wqnml
redmine 10:13:14.64
redmine 10:13:14.65 Welcome to the Bitnami redmine container
redmine 10:13:14.65 Subscribe to project updates by watching https://github.com/bitnami/containers
redmine 10:13:14.65 Submit issues and feature requests at https://github.com/bitnami/containers/issues
redmine 10:13:14.66
redmine 10:13:14.68 INFO ==> Validating settings in MYSQL_CLIENT_* env vars
redmine 10:13:14.70 INFO ==> Validating settings in POSTGRESQL_CLIENT_* env vars
redmine 10:13:14.76 DEBUG ==> Validating settings in REDMINE_* environment variables...
redmine 10:13:14.80 WARN ==> The REDMINE_SMTP_USER environment variable is empty or not set.
redmine 10:13:14.81 WARN ==> The REDMINE_SMTP_PASSWORD environment variable is empty or not set.
redmine 10:13:14.82 INFO ==> Ensuring Redmine directories exist
redmine 10:13:14.85 INFO ==> Trying to connect to the database server
redmine 10:13:14.86 DEBUG ==> Executing SQL command:
SELECT 1
1
redmine 10:13:14.91 INFO ==> Configuring Redmine database connections
redmine 10:13:15.23 INFO ==> Configuring Redmine application with settings provided via environment variables
redmine 10:13:15.35 INFO ==> Configuring SMTP credentials
redmine 10:13:15.75 INFO ==> Executing database migrations
redmine 10:13:15.75 DEBUG ==> Generating secret tokens
redmine 10:14:28.76 INFO ==> Updating admin user credentials
redmine 10:14:28.80 DEBUG ==> Executing SQL command:
UPDATE users SET login = 'redmine', hashed_password = 'c6fa20b63628ee3379bd38cb804988b39e79af0d', salt = '67j1CJKZryV4Hz0py9HD6lhbG61u6jYn', firstname = 'UserName', lastname = 'LastName', must_change_passwd = '0' WHERE id = '1';
UPDATE email_addresses SET address = '[email protected]' WHERE id = '1';
redmine 10:14:28.82 INFO ==> Loading default configuration data
Some configuration data is already loaded.
redmine 10:15:06.24 INFO ==> Persisting Redmine installation
redmine 10:15:06.69 INFO ==> ** Redmine setup finished! **
redmine 10:15:06.75 INFO ==> ** Starting Redmine **
=============== Phusion Passenger(R) Standalone web server started ===============
PID file: /opt/bitnami/redmine/passenger.3000.pid
Log file: /opt/bitnami/redmine/log/passenger.3000.log
Environment: production
Accessible via: http://0.0.0.0:3000/
You can stop Phusion Passenger(R) Standalone by pressing Ctrl-C.
Problems? Check https://www.phusionpassenger.com/library/admin/standalone/troubleshooting/
===============================================================================
[ N 2022-08-30 10:15:14.3336 342/T5 age/Cor/SecurityUpdateChecker.h:519 ]: Security update check: no update found (next check in 24 hours)
Please configure your config/database.yml first
/opt/bitnami/ruby/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler/definition.rb:398:in `ensure_equivalent_gemfile_and_lockfile': You are trying to install in deployment mode after changing (Bundler::ProductionError)
your Gemfile. Run `bundle install` elsewhere and add the
updated ../../opt/bitnami/redmine/Gemfile.lock to version control.
If this is a development machine, remove the /opt/bitnami/redmine/Gemfile freeze
by running `bundle config unset deployment`.
You have deleted from the Gemfile:
* mysql2 (~> 0.5.0)
* pg (~> 1.2.2)
from /opt/bitnami/ruby/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler/runtime.rb:13:in `setup'
from /opt/bitnami/ruby/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler.rb:151:in `setup'
from /opt/bitnami/ruby/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler/setup.rb:20:in `block in <top (required)>'
from /opt/bitnami/ruby/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler/ui/shell.rb:136:in `with_level'
from /opt/bitnami/ruby/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler/ui/shell.rb:88:in `silence'
from /opt/bitnami/ruby/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler/setup.rb:20:in `<top (required)>'
from <internal:/opt/bitnami/ruby/lib/ruby/site_ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
from <internal:/opt/bitnami/ruby/lib/ruby/site_ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
App 381 output: Please configure your config/database.yml first
App 381 output: /opt/bitnami/ruby/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler/definition.rb:398:in `ensure_equivalent_gemfile_and_lockfile'
App 381 output: :
App 381 output: You are trying to install in deployment mode after changing
App 381 output: (
App 381 output: Bundler::ProductionError
App 381 output: )
App 381 output:
App 381 output: your Gemfile. Run `bundle install` elsewhere and add the
App 381 output: updated Gemfile.lock to version control.
App 381 output:
App 381 output: If this is a development machine, remove the /opt/bitnami/redmine/Gemfile freeze
App 381 output: by running `bundle config unset deployment`.
App 381 output:
App 381 output: You have deleted from the Gemfile:
App 381 output: * mysql2 (~> 0.5.0)
App 381 output: * pg (~> 1.2.2)
App 381 output: from /opt/bitnami/ruby/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler/runtime.rb:13:in `setup'
App 381 output: from /opt/bitnami/ruby/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler.rb:151:in `setup'
App 381 output: from /opt/bitnami/ruby/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler/setup.rb:20:in `block in <top (required)>'
App 381 output: from /opt/bitnami/ruby/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler/ui/shell.rb:136:in `with_level'
App 381 output: from /opt/bitnami/ruby/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler/ui/shell.rb:88:in `silence'
App 381 output: from /opt/bitnami/ruby/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler/setup.rb:20:in `<top (required)>'
App 381 output: from <internal:/opt/bitnami/ruby/lib/ruby/site_ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
App 381 output: from <internal:/opt/bitnami/ruby/lib/ruby/site_ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
[ E 2022-08-30 10:15:23.0437 342/Tj age/Cor/App/Implementation.cpp:221 ]: Could not spawn process for application /opt/bitnami/redmine: The application process exited prematurely.
Error ID: a0620b84
Error details saved to: /tmp/passenger-error-N49J51.html
[ E 2022-08-30 10:15:23.0542 342/T7 age/Cor/Con/CheckoutSession.cpp:281 ]: [Client 1-1] Cannot checkout session because a spawning error occurred. The identifier of the error is a0620b84. Please see earlier logs for details about the error.
^R
App 418 output: Please configure your config/database.yml first
App 418 output: /opt/bitnami/ruby/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler/definition.rb:398:in `ensure_equivalent_gemfile_and_lockfile'
App 418 output: :
App 418 output: You are trying to install in deployment mode after changing
App 418 output: (
App 418 output: Bundler::ProductionError
App 418 output: )
App 418 output:
App 418 output: your Gemfile. Run `bundle install` elsewhere and add the
App 418 output: updated Gemfile.lock to version control.
App 418 output:
App 418 output: If this is a development machine, remove the /opt/bitnami/redmine/Gemfile freeze
App 418 output: by running `bundle config unset deployment`.
App 418 output:
App 418 output: You have deleted from the Gemfile:
App 418 output: * mysql2 (~> 0.5.0)
App 418 output: * pg (~> 1.2.2)
App 418 output: from /opt/bitnami/ruby/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler/runtime.rb:13:in `setup'
App 418 output: from /opt/bitnami/ruby/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler.rb:151:in `setup'
App 418 output: from /opt/bitnami/ruby/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler/setup.rb:20:in `block in <top (required)>'
App 418 output: from /opt/bitnami/ruby/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler/ui/shell.rb:136:in `with_level'
App 418 output: from /opt/bitnami/ruby/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler/ui/shell.rb:88:in `silence'
App 418 output: from /opt/bitnami/ruby/lib/ruby/gems/3.0.0/gems/bundler-2.3.13/lib/bundler/setup.rb:20:in `<top (required)>'
App 418 output: from <internal:/opt/bitnami/ruby/lib/ruby/site_ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
App 418 output: from <internal:/opt/bitnami/ruby/lib/ruby/site_ruby/3.0.0/rubygems/core_ext/kernel_require.rb>:85:in `require'
[ E 2022-08-30 10:15:33.3560 342/To age/Cor/App/Implementation.cpp:221 ]: Could not spawn process for application /opt/bitnami/redmine: The application process exited prematurely.
Error ID: df0a3976
Error details saved to: /tmp/passenger-error-oLAAJ3.html
[ E 2022-08-30 10:15:33.3616 342/T9 age/Cor/Con/CheckoutSession.cpp:281 ]: [Client 2-1] Cannot checkout session because a spawning error occurred. The identifier of the error is df0a3976. Please see earlier logs for details about the error.
Additional information
If we do not use persistence ...
redmineUsername: redmine
persistence:
enabled: false
... everything is fine.
Seems something related to NFS.
This container is a community-supported solution. This means that the Bitnami team is not actively working on new features/improvements nor providing support through GitHub Issues for this container. Any new issue will stay open for 20 days to allow the community to contribute, after 15 days without activity the issue will be marked as stale being closed after 5 days.
The Bitnami team will review any PR that is created, feel free to create a PR if you find any issue or want to implement a new feature.
Workaround:
volumePermissions:
enabled: true
... and restart the pod: note that the first time the error is raised again, but if you restart the pod, everithing is ok.
This Issue has been automatically marked as "stale" because it has not had recent activity (for 15 days). It will be closed if no further activity occurs. Thanks for the feedback.
Due to the lack of activity in the last 5 days since it was marked as "stale", we proceed to close this Issue. Do not hesitate to reopen it later if necessary.