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

init-chmod-data initContainer does not create directories #2150

Closed
sergevs opened this issue Mar 27, 2020 · 6 comments · Fixed by #2206
Closed

init-chmod-data initContainer does not create directories #2150

sergevs opened this issue Mar 27, 2020 · 6 comments · Fixed by #2206

Comments

@sergevs
Copy link

sergevs commented Mar 27, 2020

Which chart:
influxdb 0.4.3

Describe the bug
init-chmod-data initContainer does not create required directories and therefore can't set permissions

To Reproduce

  1. set volumePermissions.enabled: true
  2. inspect persistent volume and find that {data,meta,wal} directory is created instead of 3 separate directories data , meta and wal
  3. container does not start because there is no write permissions for influxdb

Expected behavior
Required directories with correct permissions created

Additional context
sh does not have curly braces bash expansion. the issue can be fixed in the following ways:

  • use bash interpreter for initContainer
    or
  • provide all 3 full path directories to mkdir command
@sergevs sergevs added the bug label Mar 27, 2020
@sergevs sergevs changed the title init-chmod-data initContainer bug init-chmod-data initContainer Mar 27, 2020
@sergevs sergevs changed the title init-chmod-data initContainer init-chmod-data initContainer does not create directories Mar 27, 2020
@Mauraza
Copy link
Contributor

Mauraza commented Mar 27, 2020

Hello @sergevs,

I run helm install my-release bitnami/influxdb --set-string volumePermissions.enabled=true and the pod started perfectly and the persistent volume look:

drwxrwxrwx 6 root     root 4096 Mar 27 14:22 .
drwxr-xr-x 3 root     root 4096 Mar 19 09:59 ..
drwxr-xr-x 3 influxdb root 4096 Mar 27 14:22 data
drwxr-xr-x 2 influxdb root 4096 Mar 27 14:22 meta
drwx------ 3 influxdb root 4096 Mar 27 14:22 wal
drwxr-xr-x 2 influxdb 1001 4096 Mar 27 14:21 {data,meta,wal}

Set the value to a true or false or any reserved word , you need to use --set-string instead only --set .

I hope that helps you.

@sergevs
Copy link
Author

sergevs commented Mar 31, 2020

notice {data,meta,wal} directory and it's permissions which is created by initContainer.
your setup works because actually data, meta & wal directories got already assigned permissions - not by initContainer and actually in your setup it will work fine without
volumePermissions.enabled option

@Mauraza
Copy link
Contributor

Mauraza commented Mar 31, 2020

Could you tell me your setup and I try to help you with that? or if my setup It's valid to you, please close the issue

@sergevs
Copy link
Author

sergevs commented Mar 31, 2020

Volume permissions management depends on kubernetes setup.
If you wish - you can setup rancher kubernetes cluster (https://rancher.com/) on bare bones servers and use local storage volume provisioning.
Alternatively I would suggest to read the initContainer code at https://github.com/bitnami/charts/blob/master/bitnami/influxdb/templates/influxdb/deployment-standalone.yaml

 65:      command:
 66:           - sh
 67:           - -c
 68:           - |
 69:             mkdir -p /bitnami/influxdb/{data,meta,wal}

Do you think that mkdir command at line 69 is correct ?
Also please see Additional context in the ticket description.

@Mauraza
Copy link
Contributor

Mauraza commented Apr 1, 2020

Hi @sergevs,

We're going to make some changes to fix this. I'll update this thread when you're done.

@Mauraza
Copy link
Contributor

Mauraza commented Apr 7, 2020

Hi @sergevs,

we just update the chart of Influxdb (version of chart 0.4.4), please check if the problem it's fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants