#50138 db2bak.pl -P LDAPS does not work when nsslapd-securePort is missing
Closed: wontfix by mhonek. Opened by mhonek.

Issue Description

In a rare case when nsslapd-securePort is not present in dse.ldif, db2bak.pl -P LDAPS (or rather Perl utils in general) does not work as expected.
However, after spinning up the instance the cn=config contains the attribute even though dse.ldif does not.

Package Version and Platform

At least since d2e68d7, thus 1.3.7 thru 1.4.0.

Steps to reproduce

  1. with ns-slapd down, remove nsslapd-securePort entry from dse.ldif
  2. spin up the instance
  3. run db2bak.pl -P LDAPS

Actual results

Could not parse LDAP URI(s)=ldaps://localhost: (5)
Failed to add task entry "cn=backup_2019_1_9_12_24_6, cn=backup, cn=tasks, cn=config" error (1)

Expected results

Back up directory: /var/lib/dirsrv/slapd-a/bak/a-2018_8_24_17_28_53
Successfully added task entry "cn=backup_2018_8_24_17_28_53, cn=backup, cn=tasks, cn=config"

Metadata Update from @mhonek:
- Custom field component adjusted to None
- Custom field origin adjusted to None
- Custom field reviewstatus adjusted to None
- Custom field rhbz adjusted to https://bugzilla.redhat.com/show_bug.cgi?id=1622049
- Custom field type adjusted to None
- Custom field version adjusted to None

The similar issue may occur for -P LDAP or -P STARTTLS and nsslapd-port as well, and some other attributes probably too.

I don't think you have to worry about nsslapd-port. I doubt the server would start without it, while nsslapd-secureport is optional.

I updated the description to correct that only dse.ldif lacks the record, cn=config contains both ports anyways. And it actually does this for both entries (tested). Seems like hidden ns-slapd defaults not written to dse.ldif on startup.

https://pagure.io/389-ds-base/pull-request/50147 - The PR hardcodes the ports. I'm open to better solutions. :)

PR #50147 merged into master as 55045daba and 1.3.9 as 89a7f2668. Closing as fixed.

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

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/3197

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 (was: fixed)

Metadata