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

K8s Volume and initialization of /var/lib/apache #17

Closed
boocup opened this issue Feb 8, 2019 · 6 comments
Closed

K8s Volume and initialization of /var/lib/apache #17

boocup opened this issue Feb 8, 2019 · 6 comments

Comments

@boocup
Copy link

boocup commented Feb 8, 2019

I am setting a volumeMount already populated with my own partition(via an initContainer process). I am also setting a config-map arg for my server name 'APACHEDS_INSTANCE: myLDAP'.

But, it appears this is getting replaced with the bootstrap data I think? Is there a way to avoid the bootstrap process over-writing my volume mount(if that is what is going on?)

If I mount it into some other directory, (like just /var), I can see the files I expect, with the partition I expect; so I know the information is in the volume.

'/bootstrap/cache' -> '/var/lib/apacheds/myLDAP/cache'
'/bootstrap/conf' -> '/var/lib/apacheds/myLDAP/conf'
'/bootstrap/conf/log4j.properties' -> '/var/lib/apacheds/myLDAP/conf/log4j.properties'
'/bootstrap/conf/wrapper-instance.conf' -> '/var/lib/apacheds/myLDAP/conf/wrapper-instance.conf'
'/bootstrap/conf/config.ldif' -> '/var/lib/apacheds/myLDAP/conf/config.ldif'
'/bootstrap/log' -> '/var/lib/apacheds/myLDAP/log'
'/bootstrap/ome.ldif' -> '/var/lib/apacheds/myLDAP/ome.ldif'
'/bootstrap/partitions' -> '/var/lib/apacheds/myLDAP/partitions'
'/bootstrap/run' -> '/var/lib/apacheds/myLDAP/run'
changed ownership of '/var/lib/apacheds/myLDAP/partitions' from root:root to apacheds:apacheds
changed ownership of '/var/lib/apacheds/myLDAP/ome.ldif' from root:root to apacheds:apacheds
changed ownership of '/var/lib/apacheds/myLDAP/conf/log4j.properties' from root:root to apacheds:apacheds
changed ownership of '/var/lib/apacheds/myLDAP/conf/wrapper-instance.conf' from root:root to apacheds:apacheds
changed ownership of '/var/lib/apacheds/myLDAP/conf/config.ldif' from root:root to apacheds:apacheds
changed ownership of '/var/lib/apacheds/myLDAP/conf' from root:root to apacheds:apacheds
changed ownership of '/var/lib/apacheds/myLDAP/run' from root:root to apacheds:apacheds
changed ownership of '/var/lib/apacheds/myLDAP/cache' from root:root to apacheds:apacheds
changed ownership of '/var/lib/apacheds/myLDAP/log' from root:root to apacheds:apacheds
changed ownership of '/var/lib/apacheds/myLDAP' from root:root to apacheds:apacheds
Starting ApacheDS - myLDAP...

Is there a way to avoid the bootstrap process over-writing my volume mount(if that is what is going on?)

Thanks!

@joshmoore
Copy link
Member

@boocup : this is a result of your work on gh-16? @manics : do you remember running into this?

@manics
Copy link
Member

manics commented Feb 15, 2019

I haven't seen this before

@boocup
Copy link
Author

boocup commented Feb 15, 2019

Sorry, I should have closed this. I got this worked out. Thanks gents.

@boocup boocup closed this as completed Feb 15, 2019
@crusy
Copy link

crusy commented Jun 14, 2019

Sorry, I should have closed this. I got this worked out. Thanks gents.

Any chance to share what solved the issue? I am facing something similar:

When mapping my .ldif as documented (./schema.ldif:/bootstrap/conf/config.ldif:ro), I get

ERR_268 Cannot find a partition for ou=groups,dc=acme,dc=com

meaning I get the bootstrap data only, just as you. PS: when mapping as described in issue #15 (./schema.ldif:/var/lib/apacheds/config.ldif:ro) the container's initialisation fails; docker logs' last entry is Starting ApacheDS - default...

@joshmoore
Copy link
Member

cc: @manics @boocup

@crusy
Copy link

crusy commented Jun 14, 2019

My current workaround:

  1. COPY config.ldif to docker
  2. COPY actual schema ldif to docker
  3. start container
  4. wait 5s for ApacheDS to run
  5. import config via ldapadd
  6. restart docker
  7. wait 5s for restart...
  8. import actual data via ldapadd

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

No branches or pull requests

4 participants