#49855 dsctl ldif2db should fail if suffix in LDIF doesn't correspond with the suffix in the destination database
Closed: wontfix 3 years ago by spichugi. Opened 5 years ago by mmuehlfeldrh.

Issue Description

Previously, importing data using the "ldif2db" script failed when then specified database name didn't correspond with the suffix contained in the LDIF file. See also the <warning> in step 2: https://access.redhat.com/documentation/en-us/red_hat_directory_server/10/html/administration_guide/populating_directory_databases#Importing_from_the_Command_Line-Importing_Using_the_ldif2db_Command_Line_Script

The "dsctl ldif2db" imports the LDIF file in the mentioned scenario but, understandably, the data isn't accessible.

Package Version and Platform

389-Directory/1.4.0.11.20180716git6d4caac04 B2018.197.1151

Steps to reproduce

  1. Create a new instance with dc=example,dc=com suffix (default database name is "userRoot")
  2. Stop the instance
  3. Import the attached LDIF (contains dc=demo,dc=de entries) into the "userRoot" database.
  4. Start the instance

Actual results

Import is successful. No warning/error is displayed. Instance can be started. Imported data isn't accessible.

Expected results

Import should fail with an error.

demo.ldif


Hey Marc,
could you please reattach demo.ldif file? I can't download it for some reason.

Thanks!

Metadata Update from @vashirov:
- Custom field component adjusted to None
- Custom field origin adjusted to None
- Custom field reviewstatus adjusted to None
- Custom field type adjusted to None
- Custom field version adjusted to None

5 years ago

demo.ldif.txt

I attached the file as a *.txt file.

I meanwhile noticed that the following message is shown when importing the file:
INFO - import_main_offline - import userroot: Import complete. Processed 0 entries in 0 seconds. (0.00 entries/sec)

However, it's not very obvious that nothing was imported. And if the LDIF file contains multiple suffixes (e. g. dc=demo,dc=de and dc=example,dc=com), then the message lists only the number of imported dc=example,dc=com entries and nothing about the ignored records, which are not part of this suffix. This is confusing, if I expected that the whole file was imported, because I got no error.

Metadata Update from @mreynolds:
- Issue set to the milestone: 1.4.0

5 years ago

FYI - ldif2db and "dsctl ldif2db" behave the same way. They both allow the LDIF file, and do not report any errors.

Metadata Update from @mreynolds:
- Issue priority set to: minor
- Issue set to the milestone: 1.4 backlog (was: 1.4.0)

4 years ago

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/389ds/389-ds-base/issues/2914

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Metadata Update from @spichugi:
- Issue close_status updated to: wontfix
- Issue status updated to: Closed (was: Open)

3 years ago

Login to comment on this ticket.

Metadata
Attachments 2
Attached 5 years ago View Comment
Attached 5 years ago View Comment