[389-ds-base] branch 389-ds-base-1.4.3 updated: Issue 49256 - log warning when thread number is very different from autotuned value
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
mreynolds 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 16203a1 Issue 49256 - log warning when thread number is very different from autotuned value
16203a1 is described below
commit 16203a191af1c4193524f6a7f67cd5033a13d4dc
Author: Mark Reynolds <mreynolds(a)redhat.com>
AuthorDate: Mon Jun 22 17:49:10 2020 -0400
Issue 49256 - log warning when thread number is very different from autotuned value
Description: To help prevent customers from setting incorrect values for
the thread number it would be useful to warn them that the
configured value is either way too low or way too high.
relates: https://pagure.io/389-ds-base/issue/49256
Reviewed by: firstyear(Thanks!)
---
dirsrvtests/tests/suites/config/autotuning_test.py | 28 ++++++++++++++++++
ldap/servers/slapd/libglobs.c | 34 +++++++++++++++++++++-
ldap/servers/slapd/slap.h | 3 ++
ldap/servers/slapd/util.c | 3 --
4 files changed, 64 insertions(+), 4 deletions(-)
diff --git a/dirsrvtests/tests/suites/config/autotuning_test.py b/dirsrvtests/tests/suites/config/autotuning_test.py
index d1c7514..5407612 100644
--- a/dirsrvtests/tests/suites/config/autotuning_test.py
+++ b/dirsrvtests/tests/suites/config/autotuning_test.py
@@ -43,6 +43,34 @@ def test_threads_basic(topo):
assert topo.standalone.config.get_attr_val_int("nsslapd-threadnumber") > 0
+def test_threads_warning(topo):
+ """Check that we log a warning if the thread number is too high or low
+
+ :id: db92412b-2812-49de-84b0-00f452cd254f
+ :setup: Standalone Instance
+ :steps:
+ 1. Get autotuned thread number
+ 2. Set threads way higher than hw threads, and find a warning in the log
+ 3. Set threads way lower than hw threads, and find a warning in the log
+ :expectedresults:
+ 1. Success
+ 2. Success
+ 3. Success
+ """
+ topo.standalone.config.set("nsslapd-threadnumber", "-1")
+ autotuned_value = topo.standalone.config.get_attr_val_utf8("nsslapd-threadnumber")
+
+ topo.standalone.config.set("nsslapd-threadnumber", str(int(autotuned_value) * 4))
+ time.sleep(.5)
+ assert topo.standalone.ds_error_log.match('.*higher.*hurt server performance.*')
+
+ if int(autotuned_value) > 1:
+ # If autotuned is 1, there isn't anything to test here
+ topo.standalone.config.set("nsslapd-threadnumber", "1")
+ time.sleep(.5)
+ assert topo.standalone.ds_error_log.match('.*lower.*hurt server performance.*')
+
+
@pytest.mark.parametrize("invalid_value", ('-2', '0', 'invalid'))
def test_threads_invalid_value(topo, invalid_value):
"""Check nsslapd-threadnumber for an invalid values
diff --git a/ldap/servers/slapd/libglobs.c b/ldap/servers/slapd/libglobs.c
index d540d84..97af7bb 100644
--- a/ldap/servers/slapd/libglobs.c
+++ b/ldap/servers/slapd/libglobs.c
@@ -4374,6 +4374,7 @@ config_set_threadnumber(const char *attrname, char *value, char *errorbuf, int a
{
int retVal = LDAP_SUCCESS;
int32_t threadnum = 0;
+ int32_t hw_threadnum = 0;
char *endp = NULL;
slapdFrontendConfig_t *slapdFrontendConfig = getFrontendConfig();
@@ -4386,8 +4387,39 @@ config_set_threadnumber(const char *attrname, char *value, char *errorbuf, int a
threadnum = strtol(value, &endp, 10);
/* Means we want to re-run the hardware detection. */
+ hw_threadnum = util_get_hardware_threads();
if (threadnum == -1) {
- threadnum = util_get_hardware_threads();
+ threadnum = hw_threadnum;
+ } else {
+ /*
+ * Log a message if the user defined thread number is very different
+ * from the hardware threads as this is probably not the optimal
+ * value.
+ */
+ if (threadnum >= hw_threadnum) {
+ if (threadnum > MIN_THREADS && threadnum / hw_threadnum >= 4) {
+ /* We're over the default minimum and way higher than the hw
+ * threads. */
+ slapi_log_err(SLAPI_LOG_NOTICE, "config_set_threadnumber",
+ "The configured thread number (%d) is significantly "
+ "higher than the number of hardware threads (%d). "
+ "This can potentially hurt server performance. If "
+ "you are unsure how to tune \"nsslapd-threadnumber\" "
+ "then set it to \"-1\" and the server will tune it "
+ "according to the system hardware\n",
+ threadnum, hw_threadnum);
+ }
+ } else if (threadnum < MIN_THREADS) {
+ /* The thread number should never be less than the minimum and
+ * hardware threads. */
+ slapi_log_err(SLAPI_LOG_WARNING, "config_set_threadnumber",
+ "The configured thread number (%d) is lower than the number "
+ "of hardware threads (%d). This will hurt server performance. "
+ "If you are unsure how to tune \"nsslapd-threadnumber\" then "
+ "set it to \"-1\" and the server will tune it according to the "
+ "system hardware\n",
+ threadnum, hw_threadnum);
+ }
}
if (*endp != '\0' || errno == ERANGE || threadnum < 1 || threadnum > 65535) {
diff --git a/ldap/servers/slapd/slap.h b/ldap/servers/slapd/slap.h
index cef8c78..7e0fa61 100644
--- a/ldap/servers/slapd/slap.h
+++ b/ldap/servers/slapd/slap.h
@@ -403,6 +403,9 @@ typedef void (*VFPV)(); /* takes undefined arguments */
#define SLAPD_DEFAULT_PW_MAX_CLASS_CHARS_ATTRIBUTE 0
#define SLAPD_DEFAULT_PW_MAX_CLASS_CHARS_ATTRIBUTE_STR "0"
+#define MIN_THREADS 16
+#define MAX_THREADS 512
+
/* Default password values. */
diff --git a/ldap/servers/slapd/util.c b/ldap/servers/slapd/util.c
index fda4fdf..7d0dc07 100644
--- a/ldap/servers/slapd/util.c
+++ b/ldap/servers/slapd/util.c
@@ -41,9 +41,6 @@
#define FILTER_BUF 128 /* initial buffer size for attr value */
#define BUF_INCR 16 /* the amount to increase the FILTER_BUF once it fills up */
-#define MIN_THREADS 16
-#define MAX_THREADS 512
-
/* slapi-private contains the pal. */
#include <slapi-private.h>
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
3 years, 10 months
[389-ds-base] branch 389-ds-base-1.3.10 updated: Issue 51166 - Log an error when a search is fully unindexed
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
mreynolds pushed a commit to branch 389-ds-base-1.3.10
in repository 389-ds-base.
The following commit(s) were added to refs/heads/389-ds-base-1.3.10 by this push:
new 49cbd94 Issue 51166 - Log an error when a search is fully unindexed
49cbd94 is described below
commit 49cbd94a07c77103416865c2ce4abec4232c5d0a
Author: Mark Reynolds <mreynolds(a)redhat.com>
AuthorDate: Thu Jun 18 15:34:23 2020 -0400
Issue 51166 - Log an error when a search is fully unindexed
Bug Description: Some plugins can trigger very expensive internal searches
that can exhaust the bdb db_locks. It is very difficult
to track these down.
Fix description: Log a message to the errors log when any search (internal or not)
is fully unindexed and provide the search details. This will
allow an admin to identify and fix indexing issues.
relates: https://pagure.io/389-ds-base/issue/51166
Reviewed by: firstyear & tbordaz(Thanks!!)
---
ldap/servers/slapd/back-ldbm/ldbm_search.c | 42 ++++++++++++++++++++++++++++--
1 file changed, 40 insertions(+), 2 deletions(-)
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_search.c b/ldap/servers/slapd/back-ldbm/ldbm_search.c
index 2ad8f74..212b6cb 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_search.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_search.c
@@ -825,13 +825,23 @@ ldbm_back_search(Slapi_PBlock *pb)
int pr_idx = -1;
Connection *pb_conn = NULL;
Operation *pb_op = NULL;
+ struct slapdplugin *plugin = NULL;
+ struct slapi_componentid *cid = NULL;
+ char *filter_str;
+ char *plugin_dn;
+ char *base_dn;
+ int32_t internal_op = operation_is_flag_set(operation, OP_FLAG_INTERNAL);
+ uint64_t connid;
+ int32_t op_id;
+ int32_t op_internal_id;
+ int32_t op_nested_count;
/*
* Return error if nsslapd-require-index is set and
* this is not an internal operation.
* We hope the plugins know what they are doing!
*/
- if (!operation_is_flag_set(operation, OP_FLAG_INTERNAL)) {
+ if (!internal_op) {
PR_Lock(inst->inst_config_mutex);
ri = inst->require_index;
@@ -844,6 +854,35 @@ ldbm_back_search(Slapi_PBlock *pb)
tmp_desc = "Search is not indexed";
}
}
+ /*
+ * When an search is fully unindexed we need to log the
+ * details as these kinds of searches can cause issues with bdb db
+ * locks being exhausted. This will help expose what indexing is
+ * missing.
+ */
+ slapi_pblock_get(pb, SLAPI_OPERATION, &pb_op);
+ slapi_pblock_get(pb, SLAPI_SEARCH_STRFILTER, &filter_str);
+ slapi_pblock_get(pb, SLAPI_TARGET_DN, &base_dn);
+
+ if (internal_op) {
+ /* Get the plugin that triggered this internal search */
+ slapi_pblock_get(pb, SLAPI_PLUGIN_IDENTITY, &cid);
+ if (cid) {
+ plugin = (struct slapdplugin *)cid->sci_plugin;
+ } else {
+ slapi_pblock_get(pb, SLAPI_PLUGIN, &plugin);
+ }
+ plugin_dn = plugin_get_dn(plugin);
+ get_internal_conn_op(&connid, &op_id, &op_internal_id, &op_nested_count);
+ slapi_log_err(SLAPI_LOG_NOTICE, "ldbm_back_search",
+ "Internal unindexed search: source (%s) search base=\"%s\" scope=%d filter=\"%s\" conn=%" PRIu64 " op=%d (internal op=%d count=%d)\n",
+ plugin_dn, base_dn, scope, filter_str, connid, op_id, op_internal_id, op_nested_count);
+ slapi_ch_free_string(&plugin_dn);
+ } else {
+ slapi_log_err(SLAPI_LOG_NOTICE, "ldbm_back_search",
+ "Unindexed search: search base=\"%s\" scope=%d filter=\"%s\" conn=%" PRIu64 " op=%d\n",
+ base_dn, scope, filter_str, pb_op->o_connid, pb_op->o_opid);
+ }
slapi_pblock_get(pb, SLAPI_OPERATION_NOTES, &opnote);
opnote |= SLAPI_OP_NOTE_FULL_UNINDEXED; /* the full filter leads to an unindexed search */
@@ -851,7 +890,6 @@ ldbm_back_search(Slapi_PBlock *pb)
slapi_pblock_set(pb, SLAPI_OPERATION_NOTES, NULL);
slapi_pblock_set(pb, SLAPI_OPERATION_NOTES, &opnote);
slapi_pblock_get(pb, SLAPI_PAGED_RESULTS_INDEX, &pr_idx);
- slapi_pblock_get(pb, SLAPI_OPERATION, &pb_op);
slapi_pblock_get(pb, SLAPI_CONNECTION, &pb_conn);
pagedresults_set_unindexed(pb_conn, pb_op, pr_idx);
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
3 years, 10 months
[389-ds-base] branch 389-ds-base-1.4.2 updated: Issue 51166 - Log an error when a search is fully unindexed
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
mreynolds pushed a commit to branch 389-ds-base-1.4.2
in repository 389-ds-base.
The following commit(s) were added to refs/heads/389-ds-base-1.4.2 by this push:
new 3fdb2ed Issue 51166 - Log an error when a search is fully unindexed
3fdb2ed is described below
commit 3fdb2ed11c62542c693ad8aa31dfec1df04f9e37
Author: Mark Reynolds <mreynolds(a)redhat.com>
AuthorDate: Thu Jun 18 15:34:23 2020 -0400
Issue 51166 - Log an error when a search is fully unindexed
Bug Description: Some plugins can trigger very expensive internal searches
that can exhaust the bdb db_locks. It is very difficult
to track these down.
Fix description: Log a message to the errors log when any search (internal or not)
is fully unindexed and provide the search details. This will
allow an admin to identify and fix indexing issues.
relates: https://pagure.io/389-ds-base/issue/51166
Reviewed by: firstyear & tbordaz(Thanks!!)
---
ldap/servers/slapd/back-ldbm/ldbm_search.c | 42 ++++++++++++++++++++++++++++--
1 file changed, 40 insertions(+), 2 deletions(-)
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_search.c b/ldap/servers/slapd/back-ldbm/ldbm_search.c
index 7777714..7235714 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_search.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_search.c
@@ -837,13 +837,23 @@ ldbm_back_search(Slapi_PBlock *pb)
int pr_idx = -1;
Connection *pb_conn = NULL;
Operation *pb_op = NULL;
+ struct slapdplugin *plugin = NULL;
+ struct slapi_componentid *cid = NULL;
+ char *filter_str;
+ char *plugin_dn;
+ char *base_dn;
+ int32_t internal_op = operation_is_flag_set(operation, OP_FLAG_INTERNAL);
+ uint64_t connid;
+ int32_t op_id;
+ int32_t op_internal_id;
+ int32_t op_nested_count;
/*
* Return error if nsslapd-require-index is set and
* this is not an internal operation.
* We hope the plugins know what they are doing!
*/
- if (!operation_is_flag_set(operation, OP_FLAG_INTERNAL)) {
+ if (!internal_op) {
PR_Lock(inst->inst_config_mutex);
ri = inst->require_index;
@@ -856,13 +866,41 @@ ldbm_back_search(Slapi_PBlock *pb)
tmp_desc = "Search is not indexed";
}
}
+ /*
+ * When an search is fully unindexed we need to log the
+ * details as these kinds of searches can cause issues with bdb db
+ * locks being exhausted. This will help expose what indexing is
+ * missing.
+ */
+ slapi_pblock_get(pb, SLAPI_OPERATION, &pb_op);
+ slapi_pblock_get(pb, SLAPI_SEARCH_STRFILTER, &filter_str);
+ slapi_pblock_get(pb, SLAPI_TARGET_DN, &base_dn);
+
+ if (internal_op) {
+ /* Get the plugin that triggered this internal search */
+ slapi_pblock_get(pb, SLAPI_PLUGIN_IDENTITY, &cid);
+ if (cid) {
+ plugin = (struct slapdplugin *)cid->sci_plugin;
+ } else {
+ slapi_pblock_get(pb, SLAPI_PLUGIN, &plugin);
+ }
+ plugin_dn = plugin_get_dn(plugin);
+ get_internal_conn_op(&connid, &op_id, &op_internal_id, &op_nested_count);
+ slapi_log_err(SLAPI_LOG_NOTICE, "ldbm_back_search",
+ "Internal unindexed search: source (%s) search base=\"%s\" scope=%d filter=\"%s\" conn=%" PRIu64 " op=%d (internal op=%d count=%d)\n",
+ plugin_dn, base_dn, scope, filter_str, connid, op_id, op_internal_id, op_nested_count);
+ slapi_ch_free_string(&plugin_dn);
+ } else {
+ slapi_log_err(SLAPI_LOG_NOTICE, "ldbm_back_search",
+ "Unindexed search: search base=\"%s\" scope=%d filter=\"%s\" conn=%" PRIu64 " op=%d\n",
+ base_dn, scope, filter_str, pb_op->o_connid, pb_op->o_opid);
+ }
opnote = slapi_pblock_get_operation_notes(pb);
opnote |= SLAPI_OP_NOTE_FULL_UNINDEXED; /* the full filter leads to an unindexed search */
opnote &= ~SLAPI_OP_NOTE_UNINDEXED; /* this note is useless because FULL_UNINDEXED includes UNINDEXED */
slapi_pblock_set_operation_notes(pb, opnote);
slapi_pblock_get(pb, SLAPI_PAGED_RESULTS_INDEX, &pr_idx);
- slapi_pblock_get(pb, SLAPI_OPERATION, &pb_op);
slapi_pblock_get(pb, SLAPI_CONNECTION, &pb_conn);
pagedresults_set_unindexed(pb_conn, pb_op, pr_idx);
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
3 years, 10 months
[389-ds-base] branch 389-ds-base-1.4.3 updated: Issue 51166 - Log an error when a search is fully unindexed
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
mreynolds 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 9e1a88c Issue 51166 - Log an error when a search is fully unindexed
9e1a88c is described below
commit 9e1a88c34e8032f969bf6f302ce37345c62e433f
Author: Mark Reynolds <mreynolds(a)redhat.com>
AuthorDate: Thu Jun 18 15:34:23 2020 -0400
Issue 51166 - Log an error when a search is fully unindexed
Bug Description: Some plugins can trigger very expensive internal searches
that can exhaust the bdb db_locks. It is very difficult
to track these down.
Fix description: Log a message to the errors log when any search (internal or not)
is fully unindexed and provide the search details. This will
allow an admin to identify and fix indexing issues.
relates: https://pagure.io/389-ds-base/issue/51166
Reviewed by: firstyear & tbordaz(Thanks!!)
---
ldap/servers/slapd/back-ldbm/ldbm_search.c | 42 ++++++++++++++++++++++++++++--
1 file changed, 40 insertions(+), 2 deletions(-)
diff --git a/ldap/servers/slapd/back-ldbm/ldbm_search.c b/ldap/servers/slapd/back-ldbm/ldbm_search.c
index 7777714..7235714 100644
--- a/ldap/servers/slapd/back-ldbm/ldbm_search.c
+++ b/ldap/servers/slapd/back-ldbm/ldbm_search.c
@@ -837,13 +837,23 @@ ldbm_back_search(Slapi_PBlock *pb)
int pr_idx = -1;
Connection *pb_conn = NULL;
Operation *pb_op = NULL;
+ struct slapdplugin *plugin = NULL;
+ struct slapi_componentid *cid = NULL;
+ char *filter_str;
+ char *plugin_dn;
+ char *base_dn;
+ int32_t internal_op = operation_is_flag_set(operation, OP_FLAG_INTERNAL);
+ uint64_t connid;
+ int32_t op_id;
+ int32_t op_internal_id;
+ int32_t op_nested_count;
/*
* Return error if nsslapd-require-index is set and
* this is not an internal operation.
* We hope the plugins know what they are doing!
*/
- if (!operation_is_flag_set(operation, OP_FLAG_INTERNAL)) {
+ if (!internal_op) {
PR_Lock(inst->inst_config_mutex);
ri = inst->require_index;
@@ -856,13 +866,41 @@ ldbm_back_search(Slapi_PBlock *pb)
tmp_desc = "Search is not indexed";
}
}
+ /*
+ * When an search is fully unindexed we need to log the
+ * details as these kinds of searches can cause issues with bdb db
+ * locks being exhausted. This will help expose what indexing is
+ * missing.
+ */
+ slapi_pblock_get(pb, SLAPI_OPERATION, &pb_op);
+ slapi_pblock_get(pb, SLAPI_SEARCH_STRFILTER, &filter_str);
+ slapi_pblock_get(pb, SLAPI_TARGET_DN, &base_dn);
+
+ if (internal_op) {
+ /* Get the plugin that triggered this internal search */
+ slapi_pblock_get(pb, SLAPI_PLUGIN_IDENTITY, &cid);
+ if (cid) {
+ plugin = (struct slapdplugin *)cid->sci_plugin;
+ } else {
+ slapi_pblock_get(pb, SLAPI_PLUGIN, &plugin);
+ }
+ plugin_dn = plugin_get_dn(plugin);
+ get_internal_conn_op(&connid, &op_id, &op_internal_id, &op_nested_count);
+ slapi_log_err(SLAPI_LOG_NOTICE, "ldbm_back_search",
+ "Internal unindexed search: source (%s) search base=\"%s\" scope=%d filter=\"%s\" conn=%" PRIu64 " op=%d (internal op=%d count=%d)\n",
+ plugin_dn, base_dn, scope, filter_str, connid, op_id, op_internal_id, op_nested_count);
+ slapi_ch_free_string(&plugin_dn);
+ } else {
+ slapi_log_err(SLAPI_LOG_NOTICE, "ldbm_back_search",
+ "Unindexed search: search base=\"%s\" scope=%d filter=\"%s\" conn=%" PRIu64 " op=%d\n",
+ base_dn, scope, filter_str, pb_op->o_connid, pb_op->o_opid);
+ }
opnote = slapi_pblock_get_operation_notes(pb);
opnote |= SLAPI_OP_NOTE_FULL_UNINDEXED; /* the full filter leads to an unindexed search */
opnote &= ~SLAPI_OP_NOTE_UNINDEXED; /* this note is useless because FULL_UNINDEXED includes UNINDEXED */
slapi_pblock_set_operation_notes(pb, opnote);
slapi_pblock_get(pb, SLAPI_PAGED_RESULTS_INDEX, &pr_idx);
- slapi_pblock_get(pb, SLAPI_OPERATION, &pb_op);
slapi_pblock_get(pb, SLAPI_CONNECTION, &pb_conn);
pagedresults_set_unindexed(pb_conn, pb_op, pr_idx);
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
3 years, 10 months
[389-ds-base] branch 389-ds-base-1.4.2 updated: Ticket 51161 - fix SLE15.2 install issps
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
firstyear pushed a commit to branch 389-ds-base-1.4.2
in repository 389-ds-base.
The following commit(s) were added to refs/heads/389-ds-base-1.4.2 by this push:
new a53c73b Ticket 51161 - fix SLE15.2 install issps
a53c73b is described below
commit a53c73bd35d7aa57e30d02ebac096f281b32642f
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 | 14 +++++++++++++-
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/src/lib389/lib389/instance/setup.py b/src/lib389/lib389/instance/setup.py
index 7dd454d..d132247 100644
--- a/src/lib389/lib389/instance/setup.py
+++ b/src/lib389/lib389/instance/setup.py
@@ -800,7 +800,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"
@@ -826,7 +828,17 @@ class SetupDs(object):
ds_instance = DirSrv(self.verbose)
if self.containerised:
ds_instance.systemd = 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.
3 years, 10 months
[389-ds-base] branch 389-ds-base-1.4.3 updated: Ticket 51161 - fix SLE15.2 install issps
by pagure@pagure.io
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.
3 years, 10 months
[389-ds-base] branch 389-ds-base-1.4.2 updated: Issue 51144 - dsctl fails with instance names that contain slapd-
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
mreynolds pushed a commit to branch 389-ds-base-1.4.2
in repository 389-ds-base.
The following commit(s) were added to refs/heads/389-ds-base-1.4.2 by this push:
new 56e97a4 Issue 51144 - dsctl fails with instance names that contain slapd-
56e97a4 is described below
commit 56e97a4e1dd623a708d04d7fe794bee70514ca3c
Author: Mark Reynolds <mreynolds(a)redhat.com>
AuthorDate: Wed Jun 10 14:07:24 2020 -0400
Issue 51144 - dsctl fails with instance names that contain slapd-
Bug Description: If an instance name contains 'slapd-' the CLI breaks:
slapd-test-slapd
Fix Description: Only strip off "slapd-" from the front of the instance
name.
relates: https://pagure.io/389-ds-base/issue/51144
Reviewed by: firstyear(Thanks!)
---
src/lib389/lib389/__init__.py | 2 +-
src/lib389/lib389/dseldif.py | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/lib389/lib389/__init__.py b/src/lib389/lib389/__init__.py
index 3bb80ab..a233788 100644
--- a/src/lib389/lib389/__init__.py
+++ b/src/lib389/lib389/__init__.py
@@ -710,7 +710,7 @@ class DirSrv(SimpleLDAPObject, object):
# Don't need a default value now since it's set in init.
if serverid is None and hasattr(self, 'serverid'):
serverid = self.serverid
- elif serverid is not None:
+ elif serverid is not None and serverid.startswith('slapd-'):
serverid = serverid.replace('slapd-', '', 1)
if self.serverid is None:
diff --git a/src/lib389/lib389/dseldif.py b/src/lib389/lib389/dseldif.py
index 96c9af9..f2725ad 100644
--- a/src/lib389/lib389/dseldif.py
+++ b/src/lib389/lib389/dseldif.py
@@ -40,7 +40,8 @@ class DSEldif(DSLint):
if serverid:
# Get the dse.ldif from the instance name
prefix = os.environ.get('PREFIX', ""),
- serverid = serverid.replace("slapd-", "")
+ if serverid.startswith("slapd-"):
+ serverid = serverid.replace("slapd-", "", 1)
self.path = "{}/etc/dirsrv/slapd-{}/dse.ldif".format(prefix[0], serverid)
else:
ds_paths = Paths(self._instance.serverid, self._instance)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
3 years, 10 months
[389-ds-base] branch 389-ds-base-1.4.3 updated: Issue 51144 - dsctl fails with instance names that contain slapd-
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
mreynolds 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 946b5e1 Issue 51144 - dsctl fails with instance names that contain slapd-
946b5e1 is described below
commit 946b5e1d3fd0408f1460f57962459885aefee0ed
Author: Mark Reynolds <mreynolds(a)redhat.com>
AuthorDate: Wed Jun 10 14:07:24 2020 -0400
Issue 51144 - dsctl fails with instance names that contain slapd-
Bug Description: If an instance name contains 'slapd-' the CLI breaks:
slapd-test-slapd
Fix Description: Only strip off "slapd-" from the front of the instance
name.
relates: https://pagure.io/389-ds-base/issue/51144
Reviewed by: firstyear(Thanks!)
---
src/lib389/lib389/__init__.py | 2 +-
src/lib389/lib389/dseldif.py | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/lib389/lib389/__init__.py b/src/lib389/lib389/__init__.py
index 4d2a8b4..c3dc6f2 100644
--- a/src/lib389/lib389/__init__.py
+++ b/src/lib389/lib389/__init__.py
@@ -710,7 +710,7 @@ class DirSrv(SimpleLDAPObject, object):
# Don't need a default value now since it's set in init.
if serverid is None and hasattr(self, 'serverid'):
serverid = self.serverid
- elif serverid is not None:
+ elif serverid is not None and serverid.startswith('slapd-'):
serverid = serverid.replace('slapd-', '', 1)
if self.serverid is None:
diff --git a/src/lib389/lib389/dseldif.py b/src/lib389/lib389/dseldif.py
index 96c9af9..f2725ad 100644
--- a/src/lib389/lib389/dseldif.py
+++ b/src/lib389/lib389/dseldif.py
@@ -40,7 +40,8 @@ class DSEldif(DSLint):
if serverid:
# Get the dse.ldif from the instance name
prefix = os.environ.get('PREFIX', ""),
- serverid = serverid.replace("slapd-", "")
+ if serverid.startswith("slapd-"):
+ serverid = serverid.replace("slapd-", "", 1)
self.path = "{}/etc/dirsrv/slapd-{}/dse.ldif".format(prefix[0], serverid)
else:
ds_paths = Paths(self._instance.serverid, self._instance)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
3 years, 10 months
[389-ds-base] branch master updated: Issue 51155 - Fix OID for sambaConfig objectclass
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
mreynolds pushed a commit to branch master
in repository 389-ds-base.
The following commit(s) were added to refs/heads/master by this push:
new c640571 Issue 51155 - Fix OID for sambaConfig objectclass
c640571 is described below
commit c6405714f6226961ceda9fff1650b1ec3a412734
Author: Mark Reynolds <mreynolds(a)redhat.com>
AuthorDate: Thu Jun 18 10:23:20 2020 -0400
Issue 51155 - Fix OID for sambaConfig objectclass
Description: The wrong OID was set for sambaConfig objectclass
relates: https://pagure.io/389-ds-base/issue/51155
Reviewed by: mreynolds & tbordaz
---
ldap/schema/60samba3.ldif | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ldap/schema/60samba3.ldif b/ldap/schema/60samba3.ldif
index 91c17be..3c530cb 100644
--- a/ldap/schema/60samba3.ldif
+++ b/ldap/schema/60samba3.ldif
@@ -506,7 +506,7 @@ objectClasses: (
################################################################################
#
objectClasses: (
- 1.3.6.1.4.1.7165.1.2.2.10
+ 1.3.6.1.4.1.7165.2.2.10
NAME 'sambaConfig'
DESC 'Samba Configuration Section'
SUP top
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
3 years, 10 months
[389-ds-base] branch 389-ds-base-1.4.2 updated: Bump version to 1.4.2.15
by pagure@pagure.io
This is an automated email from the git hooks/post-receive script.
mreynolds pushed a commit to branch 389-ds-base-1.4.2
in repository 389-ds-base.
The following commit(s) were added to refs/heads/389-ds-base-1.4.2 by this push:
new 384d03c Bump version to 1.4.2.15
384d03c is described below
commit 384d03cc599846965dceb11cffc4c901d8204831
Author: Mark Reynolds <mreynolds(a)redhat.com>
AuthorDate: Mon Jun 15 15:42:52 2020 -0400
Bump version to 1.4.2.15
---
VERSION.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/VERSION.sh b/VERSION.sh
index 4279677..0dce236 100644
--- a/VERSION.sh
+++ b/VERSION.sh
@@ -10,7 +10,7 @@ vendor="389 Project"
# PACKAGE_VERSION is constructed from these
VERSION_MAJOR=1
VERSION_MINOR=4
-VERSION_MAINT=2.14
+VERSION_MAINT=2.15
# NOTE: VERSION_PREREL is automatically set for builds made out of a git tree
VERSION_PREREL=
VERSION_DATE=$(date -u +%Y%m%d)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
3 years, 10 months