This is an automated email from the git hooks/post-receive script.
firstyear pushed a commit to branch 389-ds-base-1.4.3
in repository 389-ds-base.
The following commit(s) were added to refs/heads/389-ds-base-1.4.3 by this push:
new c7d81c2 Ticket 51161 - fix SLE15.2 install issps
c7d81c2 is described below
commit c7d81c280dc91621c5623cab45efb44028997773
Author: William Brown <william(a)blackhats.net.au>
AuthorDate: Thu Jun 18 14:01:48 2020 +1000
Ticket 51161 - fix SLE15.2 install issps
Bug Description: On SLE15.2 the hostname is almost always set
incorrectly which can break the install. Newer versions of
systemd encode utf8 in their command output that trips up
the log subsystem.
Fix Description:
We have to set SER_HOST rather than using the default which is
socket.gethostname() from init.py.
Discard the special utf8 encodings in the log output for systemd
https://pagure.io/389-ds-base/issue/51161
Author: William Brown <william(a)blackhats.net.au>
Review by: mreynolds (Thanks!)
---
src/lib389/lib389/instance/setup.py | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/src/lib389/lib389/instance/setup.py b/src/lib389/lib389/instance/setup.py
index 06d9043..fb2b2d9 100644
--- a/src/lib389/lib389/instance/setup.py
+++ b/src/lib389/lib389/instance/setup.py
@@ -804,7 +804,9 @@ class SetupDs(object):
args = ' '.join(ensure_list_str(result.args))
stdout = ensure_str(result.stdout)
stderr = ensure_str(result.stderr)
- self.log.debug(f"CMD: {args} ; STDOUT: {stdout} ; STDERR:
{stderr}")
+ # Systemd encodes some odd charecters into it's symlink output on newer
versions which
+ # can trip up the logger.
+ self.log.debug(f"CMD: {args} ; STDOUT: {stdout} ; STDERR:
{stderr}".encode("utf-8"))
# Setup tmpfiles_d
tmpfile_d = ds_paths.tmpfiles_d + "/dirsrv-" +
slapd['instance_name'] + ".conf"
@@ -831,7 +833,16 @@ class SetupDs(object):
if self.containerised:
ds_instance.systemd_override = general['systemd']
+ # By default SUSE does something extremely silly - it creates a hostname
+ # that CANT be resolved by DNS. As a result this causes all installs to
+ # fail. We need to guarantee that we only connect to localhost here, as
+ # it's the only stable and guaranteed way to connect to the instance
+ # at this point.
+ #
+ # Alternately, we could use ldapi instead, which would prevent the need
+ # to configure a temp root pw in the setup phase.
args = {
+ SER_HOST: "localhost",
SER_PORT: slapd['port'],
SER_SERVERID_PROP: slapd['instance_name'],
SER_ROOT_DN: slapd['root_dn'],
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.