#49155 Incorrect db2ldif path in ticket test
Closed: wontfix Opened by firstyear.

Issue Description

        db2ldifpl = '%s/sbin/db2ldif.pl' % topology_m2.ms["master1"].prefix
        cmdline = [db2ldifpl, '-n', 'userRoot', '-Z', SERVERID_MASTER_1, '-D', DN_DM, '-w', PASSWORD]
        log.info("##### db2ldif.pl -- %s" % (cmdline))
>       doAndPrintIt(cmdline)
tickets/ticket47536_test.py:411: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
cmdline = ['/usr/sbin/db2ldif.pl', '-n', 'userRoot', '-Z', 'master_1', '-D', ...]
    def doAndPrintIt(cmdline):
        proc = subprocess.Popen(cmdline, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
        log.info("      OUT:")
        while True:
            l = proc.stdout.readline()
            if l == "":
                break
            log.info("      %s" % l)
        log.info("      ERR:")
        while True:
            l = proc.stderr.readline()
            if l == "" or l == "\n":
                break
            log.info("      <%s>" % l)
>           assert False
E           assert False

This may not create a valid path during a test.


Metadata Update from @firstyear:
- Custom field type adjusted to defect

Metadata Update from @firstyear:
- Issue assigned to firstyear

Metadata Update from @firstyear:
- Custom field reviewstatus adjusted to review

Ack, and thanks!

Metadata Update from @mreynolds:
- Custom field reviewstatus adjusted to ack (was: review)

commit ecfbfc8ec766c8e98e0bb593154e954635098349
To ssh://git@pagure.io/389-ds-base.git
15ddba9..ecfbfc8 master -> master

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

db2ldif.pl call was AFAIR a part of e3c533534a84718e57610457fafa40794c2f1e11 which also tested perl utilities with startTLS and pem files. And I think we have a problem with db2ldif right now:

# /usr/sbin/db2ldif.pl -n userRoot -Z master_1 -D 'cn=Directory Manager' -w password
Exporting to ldif file: /var/lib/dirsrv/slapd-master_1/ldif/master_1-userRoot-2017_3_8_3_41_18.ldif
ldap_start_tls: Connect error (-11)
    additional info: TLS error -8157:Certificate extension not found.
Failed to add task entry "cn=export_2017_3_8_3_41_18, cn=export, cn=tasks, cn=config" error (1)

So I'm not sure that we supposed to delete this test case.

I agree with Viktor - something else is going wrong. So... db2ldif.pl, and all the perl scripts, check to see if SSL enabled, if it is it will automatically try to use startTLS. This is not working with this test.

So db2ldif.pl calls "DSUtil.pm:ldapmod" which is trying to do:

        if($info{openldap} eq "yes"){
            system "ldapmodify -x -ZZ -h $info{host} -p $info{port} -D \"$info{rootdn}\" -w $myrootdnpw $info{args} -f \"$file\" > /dev/null";
        } else {
            system "ldapmodify -ZZZ -P \"$info{certdir}\" -h $info{host} -p $info{port} -D \"$info{rootdn}\" -w $myrootdnpw $info{args} -f \"$file\" > /dev/null";
        }

I'll try and look into this today...

I'm addressing the latest failure in a different ticket:

https://pagure.io/389-ds-base/issue/47536

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

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