On 28 Jan 2021, at 21:58, Marco Favero <m.faverof(a)gmail.com>
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(a)lists.fedoraproject.org
To unsubscribe send an email to 389-users-leave(a)lists.fedoraproject.org
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@lists.fedoraproje...
—
Sincerely,
William Brown
Senior Software Engineer, 389 Directory Server
SUSE Labs, Australia