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

dscreate error, cannot install with a custom config_dir path #6287

Open
Jerem-Jerem opened this issue Aug 6, 2024 · 6 comments
Open

dscreate error, cannot install with a custom config_dir path #6287

Jerem-Jerem opened this issue Aug 6, 2024 · 6 comments
Labels
needs triage The issue will be triaged during scrum

Comments

@Jerem-Jerem
Copy link

Issue Description
If I use a specific path for config_dir the dscreate fails with "Instance failed to install, does not exist when expected".

Package Version and Platform:

  • Platform: RHEL 8.10
  • Package and version: 389-ds-base-1.4.3.39-3.module+el8.10.0+21535+f663b039.x86_64

Steps to Reproduce
Steps to reproduce the behavior:

  1. Create a .inf file with specific config_dir
  2. Launch dscreate as root (or as dirsrv) with verbose activated
  3. See error

Expected results
Install fails and spits the error.
You can see that it's looking for a conf file still in the default path '/etc/dirsrv/InstanceName/dse.ldif' instead of the one specified in config_dir.

Screenshots
None.

Additional context
It's a work case.

@Jerem-Jerem Jerem-Jerem added the needs triage The issue will be triaged during scrum label Aug 6, 2024
@Jerem-Jerem
Copy link
Author

I tried many combinations specifying or not data_dir, config_dir, cert_dir, schema, backup, user/group as root or dirsrv, launching dscreate as root or dirsrv.

@vashirov
Copy link
Member

vashirov commented Aug 6, 2024

Hi,
what exactly are you trying to achieve?
BTW, you can install as a user in a separate directory using dscreate ds-root, see https://docs.redhat.com/en/documentation/red_hat_directory_server/12/html-single/installing_red_hat_directory_server/index#proc_preparing-the-environment-for-non-root-user-installation_assembly_setting-up-a-new-instance-as-a-non-root-user
It's available in 389-ds-base-2.3+

@Jerem-Jerem
Copy link
Author

Hi, what exactly are you trying to achieve? BTW, you can install as a user in a separate directory using dscreate ds-root, see https://docs.redhat.com/en/documentation/red_hat_directory_server/12/html-single/installing_red_hat_directory_server/index#proc_preparing-the-environment-for-non-root-user-installation_assembly_setting-up-a-new-instance-as-a-non-root-user It's available in 389-ds-base-2.3+

Hello Viktor,

I want to install my instance with specific conf_dir and db_dir (this one is ok).
Ok, I read the doc linked but I don't want to install it as a non-root user, I just tried that way after many fails as root, just to see how it behaves.
Thanks

@vashirov
Copy link
Member

vashirov commented Aug 6, 2024

I want to install my instance with specific conf_dir and db_dir (this one is ok).

These parameters are internal implementation details, and are not exposed in the template:

dscreate create-template | grep -E 'conf_dir|db_dir' -c
0

Anything else provided in the template will be ignored or not work as you might expect.

Could you please elaborate on why do you want to a have a different conf_dir? What kind of requirement or restriction do you have?

@Jerem-Jerem
Copy link
Author

Jerem-Jerem commented Aug 6, 2024

I want to install my instance with specific conf_dir and db_dir (this one is ok).

These parameters are internal implementation details, and are not exposed in the template:

dscreate create-template | grep -E 'conf_dir|db_dir' -c
0

Anything else provided in the template will be ignored or not work as you might expect.

Could you please elaborate on why do you want to a have a different conf_dir? What kind of requirement or restriction do you have?

If you create the template in --advanced mode, you have the options 'config_dir' & 'cert_dir' and others.

On our server, we want to keep 389DS specific configuration files et data folders on another FS.

We used to install with an ansible rôle that uses prompt-install then stop the instance, move the folders to the others partition/FS then create symlinks.
I was pleased to discover that we could use a file-based install and directly specify data and conf dir instead of doing it manually after on.

@vashirov
Copy link
Member

vashirov commented Aug 6, 2024

If you create the template in --advanced mode, you have the options 'config_dir' & 'cert_dir' and others.

They were moved there for a reason:

  --advanced     Add advanced options to the template - changing the advanced
                 options may make your instance install fail

On our server, we want to keep 389DS specific configuration files et data folders on another FS.

Have you considered using bind mounts instead of symlinks?

Also, please try dscreate ds-root available in 389-ds-base-2.3+, I think it should cover your use case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage The issue will be triaged during scrum
Projects
None yet
Development

No branches or pull requests

2 participants