Re: lib389 question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> On 28 Jan 2021, at 21:58, Marco Favero <m.faverof@xxxxxxxxx> wrote:
> 
> Hello,
>  I'm new in this list, thank you for developing 389ds!

Thanks for using it!

> 
> I would like some hints about lib389.
> 
> dscreate allows to set some parameters only when you create an instance.

I think the only parameter that *can not* change after an install is "instance_name". Everything else is possible to alter later. 

> So it' very difficult to maintain all configuration parameters among db and instances and replicated instances.
> 
> I'm writing my tool to manage all configuration parameters in one place (a yaml file). Just a wrapper for dsconf. See at
> 
>  https://github.com/falon/ds-easyconf
> 
> I would like to call dsconf from an external host only, different from hosts where the 389ds run. So I have installed the python3-lib389 rpm in that different host.
> 
> Let suppose I have
> 
>  tst1.example.com
>  tst2.example.com
>  tst3.example.com
> 
> where 389ds Directory Server run after dscreate process.
> 
> I have another host:
> 
>  manage.example.com
> 
> where I have installed lib389 rpm only, and from that remote host I configure the tst*.example.com servers through dsconf.
> 
> The problem is that dsconf exit with the error "defaults.inf not found in any well known location!".

Can you re-run with 'dsconf -v <other options>"? dsconf should be able to work remotely. 

What version of 389-ds are you using as well? And on what distro?


> 
> So I have taken the defaults.inf from a 389ds host (one of tst*.example.com) and I have placed it in the new path /usr/share/dirsrv/inf of manage.example.com.
> 
> Now dsconf works fine.
> 
> I would like to know if there are some reason to avoid to do that. Or, if simply the python3-lib389 forgot to install the defaults.inf in the proper path.

I'd like to check your version, but it should work, so this sounds like either a bug in lib389 (requesting paths when not available) or a packaging issues.


Since you are already using python, you could more easily just use lib389 directly rather than subprocess to dsconf btw:


from lib389 import DirSrv
import logging

log = logging.getLogger()
log.setLevel(logging.DEBUG)

ds = DirSrv(verbose=True, external_log=log)
ds.remote_simple_allocate(ldapuri="ldaps://ldapuri", binddn="", password="")
ds.open()


from there you can pass the ds instance into things to configure them:

from lib389.config import Config
dsconfig = Config(ds)
dsconfig.set('nsslapd-port', '389')

There is a lot more you can do too, but this seems much more preferrable to shelling out. 

Hope that helps, 


> 
> Thank you very much
> Warm Regards
> Marco
> _______________________________________________
> 389-users mailing list -- 389-users@xxxxxxxxxxxxxxxxxxxxxxx
> To unsubscribe send an email to 389-users-leave@xxxxxxxxxxxxxxxxxxxxxxx
> Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives: https://lists.fedoraproject.org/archives/list/389-users@xxxxxxxxxxxxxxxxxxxxxxx

—
Sincerely,

William Brown

Senior Software Engineer, 389 Directory Server
SUSE Labs, Australia
_______________________________________________
389-users mailing list -- 389-users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to 389-users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/389-users@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora User Discussion]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora News]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora QA]     [Fedora Triage]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Yosemite Photos]     [Linux Apps]     [Maemo Users]     [Gnome Users]     [KDE Users]     [Fedora Tools]     [Fedora Art]     [Fedora Docs]     [Maemo Users]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Fedora ARM]

  Powered by Linux