On Mon, 2017-03-13 at 06:06 +0000, Ankit Yadav wrote:
Hello Everyone,
I am currently working on one of the issue of lib389 issue #1 cn=config. Below are some steps that I did to help myself and a question related to these steps.
lib389 issue #1 Description: Once we have enough plugin and index code, we should be able to use dsconf to compare the state of two instances. This will let us check for differing plugin, index, configuration values between two servers. Additionally, we would be able to mask "known different" values, such as fs paths, hostnames, etc. This will help in migrations and upgrades of DS.
I have an instance of 389-ds installed with this configuration:
computer name = local.com system user = dirsrv system group = dirsrv network port = 389 directory server identifier = local suffix dc=local cn = Directory Manager
To see configuration of server I tried this command : $ ldapsearch -H ldap:// -x -s base -b "" -LLL "+"
I got this output:
dn: creatorsName: cn=server,cn=plugins,cn=config modifiersName: cn=server,cn=plugins,cn=config createTimestamp: 20170313052148Z modifyTimestamp: 20170313052148Z nsUniqueId: f4bebe00-07ac11e7-80000000-00000000 namingContexts: dc=local nsBackendSuffix: userRoot:dc=local subschemaSubentry: cn=schema supportedExtension: 2.16.840.1.113730.3.5.7 supportedExtension: 2.16.840.1.113730.3.5.8 supportedExtension: 1.3.6.1.4.1.4203.1.11.3 supportedExtension: 2.16.840.1.113730.3.5.3 supportedExtension: 2.16.840.1.113730.3.5.12 supportedExtension: 2.16.840.1.113730.3.5.5 supportedExtension: 2.16.840.1.113730.3.5.6 supportedExtension: 2.16.840.1.113730.3.5.9 supportedExtension: 2.16.840.1.113730.3.5.4 supportedExtension: 2.16.840.1.113730.3.6.5 supportedExtension: 2.16.840.1.113730.3.6.6 supportedExtension: 2.16.840.1.113730.3.6.7 supportedExtension: 2.16.840.1.113730.3.6.8 supportedExtension: 1.3.6.1.4.1.4203.1.11.1 supportedControl: 2.16.840.1.113730.3.4.2 supportedControl: 2.16.840.1.113730.3.4.3 supportedControl: 2.16.840.1.113730.3.4.4 supportedControl: 2.16.840.1.113730.3.4.5 supportedControl: 1.2.840.113556.1.4.473 supportedControl: 2.16.840.1.113730.3.4.9 supportedControl: 2.16.840.1.113730.3.4.16 supportedControl: 2.16.840.1.113730.3.4.15 supportedControl: 2.16.840.1.113730.3.4.17 supportedControl: 2.16.840.1.113730.3.4.19 supportedControl: 1.3.6.1.1.13.1 supportedControl: 1.3.6.1.1.13.2 supportedControl: 1.3.6.1.4.1.42.2.27.8.5.1 supportedControl: 1.3.6.1.4.1.42.2.27.9.5.2 supportedControl: 1.2.840.113556.1.4.319 supportedControl: 1.3.6.1.4.1.42.2.27.9.5.8 supportedControl: 1.3.6.1.4.1.4203.666.5.16 supportedControl: 2.16.840.1.113730.3.4.14 supportedControl: 2.16.840.1.113730.3.4.20 supportedControl: 1.3.6.1.4.1.1466.29539.12 supportedControl: 2.16.840.1.113730.3.4.12 supportedControl: 2.16.840.1.113730.3.4.18 supportedControl: 2.16.840.1.113730.3.4.13 supportedFeatures: 1.3.6.1.4.1.4203.1.5.1 supportedSASLMechanisms: EXTERNAL supportedSASLMechanisms: SCRAM-SHA-1 supportedSASLMechanisms: GSS-SPNEGO supportedSASLMechanisms: GSSAPI supportedSASLMechanisms: DIGEST-MD5 supportedSASLMechanisms: CRAM-MD5 supportedSASLMechanisms: PLAIN supportedSASLMechanisms: LOGIN supportedSASLMechanisms: ANONYMOUS supportedLDAPVersion: 2 supportedLDAPVersion: 3 vendorName: 389 Project vendorVersion: 389-Directory/1.3.5.15 B2016.308.2026
Are the above attributes and those configuration attributes which we are trying to compare in this issue are same?
This output you are seeing is the rootDSE: It describes the features and supported components of the server.
You will eventually be looking at cn=config, but for now your first check to make the comparison work should be looking at objects from lib389/idm/group.py for example. Make two groups in dc=example,dc=com, then compare them.
You'll need a reproducable environment, so first, look at creating a py.test case in lib389/tests/, and getting that to work, to build and tear down an instance. We have plenty of examples in that folder of how to do this.
From there you can create the groups, then work on the comparison.
I hope that helps you,
Sincerely,
William Brown Software Engineer Red Hat, Australia/Brisbane