Uploaded image for project: 'OpenDJ'
  1. OpenDJ
  2. OPENDJ-3609

ldif-diff/ldifdiff fails to properly differentiate schema files.

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.5.1, 3.5.0, 3.0.0
    • Fix Version/s: 3.5.2
    • Component/s: tools
    • Labels:
    • Support Ticket IDs:

      Description

      There are two issues at play here with DJ 3.x.

      1. ldif-diff fails to properly differentiate schema files containing attributeTypes and objectClasses.
      2. ldif-diff also writes the resulting diff in the wrong order. "add then delete" (bad) vs "delete then add" (good). This is the same as seen in the 2.6 SDK issue OPENDJ-1909 (problems with diffEntries)

      Issue type 1: DJ 3.5.x

      opendj; bin/$ ./status -V
      OpenDJ Server 3.5.0
      Build 20160711133456
      --
                 Name                 Build number         Revision number
      Extension: snmp-mib2605         3.5.0                6c04f4cb5de809ea1b4e8deb12925396da89d841
      
      opendj; bin/$ ./ldif-diff --outputLDIF 1-2-test.ldif --sourceLDIF ./1.ldif --targetLDIF ./2.ldif ; cat 1-2-test.ldif
      # No differences were detected between the source and target LDIF files
      opendj; bin/$ ./ldif-diff --outputLDIF SAP-CURR-test.ldif --sourceLDIF sap2.ldif --targetLDIF currentschema.ldif ; cat SAP-CURR-test.ldif
      # No differences were detected between the source and target LDIF files
      
      opendj; bin/$ ./status -V
      OpenDJ Server 3.5.1
      Build 20161018085632
      --
                 Name                 Build number         Revision number
      Extension: snmp-mib2605         3.5.1                23b322a7502f029b6d3725212c162de36f038122
      
      opendj; bin/$ ./ldif-diff --outputLDIF 1-2-test.ldif --sourceLDIF ./1.ldif --targetLDIF ./2.ldif ; cat 1-2-test.ldif
      # No differences were detected between the source and target LDIF files
      opendj; bin/$ ./ldif-diff --outputLDIF SAP-CURR-test.ldif --sourceLDIF sap2.ldif --targetLDIF currentschema.ldif ; cat SAP-CURR-test.ldif
      # No differences were detected between the source and target LDIF files
      

      Issue type 2: DJ 3.0.0

      opendj; bin/$ ./ldif-diff --outputLDIF 1-2-test.ldif --sourceLDIF ./1.ldif --targetLDIF ./2.ldif ; cat 1-2-test.ldif
      dn: cn=schema
      changetype: modify
      add: attributetypes
      attributetypes: ( 1.3.6.1.4.1.694.2.1.102 NAME 'sapAlias' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
      -
      delete: attributetypes
      attributetypes: ( 1.3.6.1.4.1.694.2.1.101 NAME 'sapUsername' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE )
      -
      add: objectclasses
      objectclasses: ( 1.3.6.1.4.1.694.2.2.6 NAME 'sapAddOnUM' SUP top AUXILIARY MUST ( sn ) MAY ( cn ) )
      -
      delete: objectclasses
      objectclasses: ( 1.3.6.1.4.1.694.2.2.6 NAME 'sapAddOnUM' SUP top AUXILIARY MUST ( sapUsername $ sn ) MAY ( cn ) )
      

      Attached:

      opendj; bin/$ unzip -l ldif-files.zip
      Archive:  ldif-files.zip
        Length     Date   Time    Name
       --------    ----   ----    ----
            319  01-05-17 09:24   1.ldif
            301  01-05-17 09:24   2.ldif
           5230  01-05-17 09:24   currentschema.ldif
           5336  01-05-17 09:24   sap2.ldif
       --------                   -------
          11186                   4 files
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                cjr Chris Ridd
                Reporter:
                lee.trujillo Lee Trujillo
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: