Closed jean-francoismougnot closed 1 month ago
Bitnami containers are designed to operate as non-root by default. Consequently, any files or directories used by the application should be owned by the root group, as the random user (1001 by default) is a member of this root group. To ensure proper permissions, you'll need to adjust the ownership of your local directory accordingly.
For more comprehensive information about non-root containers and their significance for security, you can explore the following resources:
These references provide valuable insights into the best practices and considerations when working with non-root containers in Bitnami applications.
Thank you for your time and response ! I'm well aware of these knowledge and good practices sharing :) That's even why I always go to use your containers and charts, awesome work !
But if i understand well, that's precisely the oposite for Odoo.
See it here configuring permission to odoo deamon to be part of root group: https://github.com/bitnami/containers/blob/main/bitnami/odoo/17/debian-12/rootfs/opt/bitnami/scripts/odoo/postunpack.sh#L43
or here trying to chown: https://github.com/bitnami/containers/blob/48b7c41bdc3738cbd8c6234fa3274ebe0eb84c07/bitnami/solr/8/debian-12/prebuildfs/opt/bitnami/scripts/libfs.sh#L22
chown/chgrp here: https://github.com/bitnami/containers/blob/48b7c41bdc3738cbd8c6234fa3274ebe0eb84c07/bitnami/solr/8/debian-12/prebuildfs/opt/bitnami/scripts/libfs.sh#L137
the bitnami/odoo chart helm also default to run it as root:root as documented here : https://github.com/bitnami/charts/tree/main/bitnami/odoo
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.
Did this issue get resolve? what was the workaround? facing this problem as well, where can't attach the efs volume with eks pod
Name and Version
bitnami/odoo 17.0.20240705
What architecture are you using?
None
What steps will reproduce the bug?
post-install, post-upgrade
helm hooks.the storage class is as follow StorageClass in our stg cluster as follow :
CSIDriver:
I've tried using pretty much every default securityContexts and according combinations for both container and pod provided as default helm values. I've tried with
odoo.volumePermissions.enabled = true
as described here https://docs.bitnami.com/kubernetes/faq/troubleshooting/troubleshooting-helm-chart-issues/#permission-errors-when-enabling-persistence I've tried with every security policies disabled too, just to see. and as said some combinations.rolling update of the deployment with every possible configuration always end up with the follogin errors :
It's seems that the volume-permissions initContainer succesfully chown where the .sh script run in the entrypoint of the container always fail to do so.
Are you using any custom parameters or values?
default securityContexts ones.
Actual setup :
Combinations tested:
and a mix of all these.
What is the expected behavior?
Healthy running container kind like this in localhost :
What do you see instead?
100%
chown: changing ownership of '/bitnami/odoo': Operation not permitted
Additional information
is there a runtime difference between the chown done in volume-permission in initContainer (
volumePermissions.enabled:true
) and the one done in the entrypoint of the runtime container ? i'm struggling to get what's could be the diffI'm not sure if i'm missing something and would love to have your opinion on this one. Do you manage to properly mount replicated odoo pods with a single RWX PV ?
I'm starting to dig around efs csi and found this one which looks a lot like my actual situation. Do you think it could be my culprit ?
As a workaround, do you think it'd be possible to bypass / deactivate the chown in entrypoint of odoo container made in the entrypoint scripts ?
Do you have any other ideas / recomendations for me maybe ?