Ryan Braun [ADS]
2008-Sep-10 15:18 UTC
[Fedora-directory-users] fds 1.1+ not setting nsslapd-instancedir on install?
Hey guys. I have some perl replication scripts (fdstool) that I developed on
fds 1.0.4. On my first attempt to use them on a 1.1+ (in this particular
case 1.1.2), the changelog object creation bails because the
nsslapd-instancedir attribute in cn=config isn''t set.
##############################
# find the instance-dir
##############################
$msg = $ldap->search (
base => "cn=config",
scope => "base",
filter => "(objectClass=*)",
);
my $instance_dir =
$msg->entry(0)->get_value("nsslapd-instancedir");
ends up as null as there isn''t anything at said attribute.
Also,
shodan:/home/ryan/fdstools# ldapsearch -x -h yzxXXXX0 -D "cn=Directory
Manager" -W -b "cn=config" "objectclass=*"|grep
instancedir
Enter LDAP Password:
nsslapd-instancedir:
shodan:/home/ryan/fdstools# ldapsearch -x -h yzxXXXX0 -D "cn=Directory
Manager" -W -b "cn=config" "objectclass=*"|grep
nsslapd-ldifdir
Enter LDAP Password:
nsslapd-ldifdir: /var/lib/dirsrv/slapd-yzxdmns0/ldif
For now I''m useing nsslapd-ldifdir and just ~ s/\/ldif// to cut off the
ldir
directory, but am just confirming this behavior is intended. FWIW I built
the packages myself, so it could very well be my own fault :P
Ryan
Rich Megginson
2008-Sep-10 16:57 UTC
Re: [Fedora-directory-users] fds 1.1+ not setting nsslapd-instancedir on install?
Ryan Braun [ADS] wrote:> Hey guys. I have some perl replication scripts (fdstool) that I developed on > fds 1.0.4. On my first attempt to use them on a 1.1+ (in this particular > case 1.1.2), the changelog object creation bails because the > nsslapd-instancedir attribute in cn=config isn''t set. > > ############################## > # find the instance-dir > ############################## > $msg = $ldap->search ( > base => "cn=config", > scope => "base", > filter => "(objectClass=*)", > ); > my $instance_dir = $msg->entry(0)->get_value("nsslapd-instancedir"); > > ends up as null as there isn''t anything at said attribute. > > Also, > > shodan:/home/ryan/fdstools# ldapsearch -x -h yzxXXXX0 -D "cn=Directory > Manager" -W -b "cn=config" "objectclass=*"|grep instancedir > Enter LDAP Password: > nsslapd-instancedir: > shodan:/home/ryan/fdstools# ldapsearch -x -h yzxXXXX0 -D "cn=Directory > Manager" -W -b "cn=config" "objectclass=*"|grep nsslapd-ldifdir > Enter LDAP Password: > nsslapd-ldifdir: /var/lib/dirsrv/slapd-yzxdmns0/ldif > > > For now I''m useing nsslapd-ldifdir and just ~ s/\/ldif// to cut off the ldir > directory, but am just confirming this behavior is intended. FWIW I built > the packages myself, so it could very well be my own fault :P >Well, it depends - what were you using nsslapd-instancedir for? There are several other attributes you could use now, depending on what you''re trying to do.> Ryan > > -- > Fedora-directory-users mailing list > Fedora-directory-users@redhat.com > https://www.redhat.com/mailman/listinfo/fedora-directory-users >
Ryan Braun [ADS]
2008-Sep-10 17:18 UTC
Re: [Fedora-directory-users] fds 1.1+ not setting nsslapd-instancedir on install?
On Wednesday 10 September 2008 16:57, Rich Megginson wrote:> > shodan:/home/ryan/fdstools# ldapsearch -x -h yzxXXXX0 -D "cn=Directory > > Manager" -W -b "cn=config" "objectclass=*"|grep instancedir > > Enter LDAP Password: > > nsslapd-instancedir: > > shodan:/home/ryan/fdstools# ldapsearch -x -h yzxXXXX0 -D "cn=Directory > > Manager" -W -b "cn=config" "objectclass=*"|grep nsslapd-ldifdir > > Enter LDAP Password: > > nsslapd-ldifdir: /var/lib/dirsrv/slapd-yzxdmns0/ldif > > > > > > For now I''m useing nsslapd-ldifdir and just ~ s/\/ldif// to cut off the > > ldir directory, but am just confirming this behavior is intended. FWIW > > I built the packages myself, so it could very well be my own fault :P > > Well, it depends - what were you using nsslapd-instancedir for? There > are several other attributes you could use now, depending on what you''re > trying to do. >I was using nsslapd-instancedir to as the ref point on where to put the changelog db files. Which by default in the console (1.1+) is /var/lib/dirsrv/slapd-INSTANCE/changelog. But I couldn''t find any attributes that would just point to /var/lib/dirsrv/slapd-INSTANCE/. Which was what I assumed nsslapd-instancedir was for. I guess when I was working on the script for 1.0.4 it just happened to be set to the correct location so I used that value. Ryan
Rich Megginson
2008-Sep-10 17:30 UTC
Re: [Fedora-directory-users] fds 1.1+ not setting nsslapd-instancedir on install?
Ryan Braun [ADS] wrote:> On Wednesday 10 September 2008 16:57, Rich Megginson wrote: > >>> shodan:/home/ryan/fdstools# ldapsearch -x -h yzxXXXX0 -D "cn=Directory >>> Manager" -W -b "cn=config" "objectclass=*"|grep instancedir >>> Enter LDAP Password: >>> nsslapd-instancedir: >>> shodan:/home/ryan/fdstools# ldapsearch -x -h yzxXXXX0 -D "cn=Directory >>> Manager" -W -b "cn=config" "objectclass=*"|grep nsslapd-ldifdir >>> Enter LDAP Password: >>> nsslapd-ldifdir: /var/lib/dirsrv/slapd-yzxdmns0/ldif >>> >>> >>> For now I''m useing nsslapd-ldifdir and just ~ s/\/ldif// to cut off the >>> ldir directory, but am just confirming this behavior is intended. FWIW >>> I built the packages myself, so it could very well be my own fault :P >>> >> Well, it depends - what were you using nsslapd-instancedir for? There >> are several other attributes you could use now, depending on what you''re >> trying to do. >> >> > > I was using nsslapd-instancedir to as the ref point on where to put the > changelog db files. Which by default in the console (1.1+) > is /var/lib/dirsrv/slapd-INSTANCE/changelog. >If you want the changelog directory, use nsslapd-directory, and see http://www.redhat.com/docs/manuals/dir-server/cli/8.0/Configuration_Command_File_Reference-Plug_in_Implemented_Server_Functionality_Reference-Database_Plug_in_Attributes.html#Configuration_Command_File_Reference-Database_Attributes_under_cnconfig_cnldbm_database_cnplugins_cnconfig-nsslapd_directory when you grab that attribute, just replace /db$ with /cldb to construct the changelog directory.> But I couldn''t find any attributes that would just point > to /var/lib/dirsrv/slapd-INSTANCE/. Which was what I assumed > nsslapd-instancedir was for. >No. Fedora 1.0 put everything under /opt/fedora-ds/slapd-instance - so there was a single "instance" directory. Fedora DS 1.1 is FHS-ified - see http://directory.fedoraproject.org/wiki/FHS_Packaging> I guess when I was working on the script for 1.0.4 it just happened to be set > to the correct location so I used that value. > > Ryan > > -- > Fedora-directory-users mailing list > Fedora-directory-users@redhat.com > https://www.redhat.com/mailman/listinfo/fedora-directory-users >
Ryan Braun [ADS]
2008-Sep-11 15:57 UTC
Re: [Fedora-directory-users] fds 1.1+ not setting nsslapd-instancedir on install?
On Wednesday 10 September 2008 17:30, Rich Megginson wrote:> >> > >> Well, it depends - what were you using nsslapd-instancedir for? There > >> are several other attributes you could use now, depending on what you''re > >> trying to do. > > > > I was using nsslapd-instancedir to as the ref point on where to put the > > changelog db files. Which by default in the console (1.1+) > > is /var/lib/dirsrv/slapd-INSTANCE/changelog. > > If you want the changelog directory, use nsslapd-directory, and see > http://www.redhat.com/docs/manuals/dir-server/cli/8.0/Configuration_Command >_File_Reference-Plug_in_Implemented_Server_Functionality_Reference-Database_ >Plug_in_Attributes.html#Configuration_Command_File_Reference-Database_Attrib >utes_under_cnconfig_cnldbm_database_cnplugins_cnconfig-nsslapd_directory > > when you grab that attribute, just replace /db$ with /cldb to construct > the changelog directory. >Roger that, got it working with ############################## # find the instance-dir ############################## $msg = $ldap->search ( base => "cn=config, cn=ldbm database, cn=plugins, cn=config", scope => "sub", filter => "(objectClass=*)", ); my $instance_dir = $msg->entry(0)->get_value("nsslapd-directory"); if (!defined($instance_dir)) { print "Unable to determine the instancedir, pretty big issue, puking\n"; exit 1; } $instance_dir =~ s/\/db//; Thanks Rich. Ryan
Rich Megginson
2008-Sep-11 16:11 UTC
Re: [Fedora-directory-users] fds 1.1+ not setting nsslapd-instancedir on install?
Ryan Braun [ADS] wrote:> On Wednesday 10 September 2008 17:30, Rich Megginson wrote: > >>>> Well, it depends - what were you using nsslapd-instancedir for? There >>>> are several other attributes you could use now, depending on what you''re >>>> trying to do. >>>> >>> I was using nsslapd-instancedir to as the ref point on where to put the >>> changelog db files. Which by default in the console (1.1+) >>> is /var/lib/dirsrv/slapd-INSTANCE/changelog. >>> >> If you want the changelog directory, use nsslapd-directory, and see >> http://www.redhat.com/docs/manuals/dir-server/cli/8.0/Configuration_Command >> _File_Reference-Plug_in_Implemented_Server_Functionality_Reference-Database_ >> Plug_in_Attributes.html#Configuration_Command_File_Reference-Database_Attrib >> utes_under_cnconfig_cnldbm_database_cnplugins_cnconfig-nsslapd_directory >> >> when you grab that attribute, just replace /db$ with /cldb to construct >> the changelog directory. >> >> > > Roger that, got it working with > > ############################## > # find the instance-dir > ############################## > $msg = $ldap->search ( > base => "cn=config, cn=ldbm database, cn=plugins, cn=config", > scope => "sub", > filter => "(objectClass=*)", > ); > > my $instance_dir = $msg->entry(0)->get_value("nsslapd-directory"); > if (!defined($instance_dir)) { > print "Unable to determine the instancedir, pretty big issue, puking\n"; > exit 1; > } > $instance_dir =~ s/\/db//; >I would suggest using \/db$, but otherwise, yes, that''s it. It''s not really an instance dir anymore, more like a database instance dir - you will find under there the db dir, the changelog db dir, the default ldif db export dir, and the default db backup dir.> Thanks Rich. > > Ryan > > -- > Fedora-directory-users mailing list > Fedora-directory-users@redhat.com > https://www.redhat.com/mailman/listinfo/fedora-directory-users >