From 89886ba4ee67058bb3448d26f772b66767097f0e Mon Sep 17 00:00:00 2001 From: Mark Reynolds Date: Nov 23 2018 14:39:41 +0000 Subject: Ticket 49994 - Add backend features to CLI Description: Added backend features (chaining, db, indexes, vlv, attr encryption, and monitor to the CLI. Addressed https://pagure.io/389-ds-base/issue/48881 that prevented VLV search/index entries from being updated. Also updated jstree js file. https://pagure.io/389-ds-base/issue/49994 Reviewed by: spichugi & firstyear(Thanks!) --- diff --git a/ldap/servers/slapd/back-ldbm/vlv.c b/ldap/servers/slapd/back-ldbm/vlv.c index 23825c2..f439182 100644 --- a/ldap/servers/slapd/back-ldbm/vlv.c +++ b/ldap/servers/slapd/back-ldbm/vlv.c @@ -184,12 +184,12 @@ vlv_ModifySearchEntry(Slapi_PBlock *pb __attribute__((unused)), slapi_rwlock_rdlock(be->vlvSearchList_lock); p = vlvSearch_finddn((struct vlvSearch *)be->vlvSearchList, slapi_entry_get_sdn(entryBefore)); if (p != NULL) { - slapi_log_err(SLAPI_LOG_INFO, "vlv_ModifySearchEntry", "Modified Virtual List View Search (%s), " - "which will be enabled when the database is rebuilt.\n", + slapi_log_err(SLAPI_LOG_NOTICE, "vlv_ModifySearchEntry", "Modified Virtual List View Search (%s), " + "which will be enabled when the database is rebuilt.\n", p->vlv_name); } slapi_rwlock_unlock(be->vlvSearchList_lock); - return SLAPI_DSE_CALLBACK_DO_NOT_APPLY; + return SLAPI_DSE_CALLBACK_OK; } @@ -203,8 +203,9 @@ vlv_ModifyIndexEntry(Slapi_PBlock *pb __attribute__((unused)), char *returntext __attribute__((unused)), void *arg __attribute__((unused))) { - slapi_log_err(SLAPI_LOG_INFO, "vlv_ModifyIndexEntry", "Modified Virtual List View Index.\n"); - return SLAPI_DSE_CALLBACK_DO_NOT_APPLY; + slapi_log_err(SLAPI_LOG_NOTICE, "vlv_ModifyIndexEntry", "Modified Virtual List View Index, " + "you will need to reindex this VLV entry(or rebuilt database) for these changes to take effect.\n"); + return SLAPI_DSE_CALLBACK_OK; } diff --git a/src/cockpit/389-console/src/backend.js b/src/cockpit/389-console/src/backend.js index e1a006e..f396b89 100644 --- a/src/cockpit/389-console/src/backend.js +++ b/src/cockpit/389-console/src/backend.js @@ -15,6 +15,31 @@ var index_btn_html = '' + ''; + +var chaining_attr_map = { + 'nsbindconnectionslimit': '--conn-bind-limit', + 'nsoperationconnectionslimit': '--conn-op-limit', + 'nsabandonedsearchcheckinterval': '--abandon-check-interval', + 'nsconcurrentbindlimit': '--bind-limit', + 'nsconcurrentoperationslimit': '--op-limit', + 'nsproxiedauthorization': '--proxied-auth', + 'nsconnectionlife': '--conn-lifetime', + 'nsbindtimeout': '--bind-timeout', + 'nsreferralonscopedsearch': '--return-ref', + 'nschecklocalaci': '--check-aci', + 'nsbindretrylimit': '--bind-attempts', + 'nsslapd-sizelimit': '--size-limit', + 'nsslapd-timelimit': '--time-limit', + 'nshoplimit': '--hop-limit', + 'nsmaxresponsedelay': '--response-delay', + 'nsmaxtestresponsedelay': '--test-response-delay', + 'nsusestarttls':'--use-starttls' , + 'nsfarmserverurl': '--server-url', + 'nsbindmechanism': '--bind-mech', + 'nsmultiplexorbinddn': '--bind-dn', + 'nsmultiplexorcredentials': '--bind-pw' +}; + function customMenu (node) { var dblink_items = { "delete_link": { diff --git a/src/cockpit/389-console/src/ds.js b/src/cockpit/389-console/src/ds.js index 1051425..e781138 100644 --- a/src/cockpit/389-console/src/ds.js +++ b/src/cockpit/389-console/src/ds.js @@ -29,13 +29,13 @@ var DSCTL = "dsctl"; var DSCREATE = "dscreate"; var ENV = ""; -/* + // Used for local development testing var DSCONF = '/home/mareynol/source/ds389/389-ds-base/src/lib389/cli/dsconf'; var DSCTL = '/home/mareynol/source/ds389/389-ds-base/src/lib389/cli/dsctl'; var DSCREATE = '/home/mareynol/source/ds389/389-ds-base/src/lib389/cli/dscreate'; var ENV = 'PYTHONPATH=/home/mareynol/source/ds389/389-ds-base/src/lib389'; -*/ + /* * Console logging function for CLI commands @@ -323,7 +323,8 @@ function load_config (){ * Start with the dropdowns, if this fails we stop here, otherwise we assume * we are up and running and we can load the other config/ */ - var cmd = [DSCONF, '-j', 'ldapi://%2fvar%2frun%2f' + server_id + '.socket','backend', 'list', '--suffix']; + var cmd = [DSCONF, '-j', 'ldapi://%2fvar%2frun%2f' + server_id + '.socket','backend', 'suffix', 'list', '--suffix']; + log_cmd('load_config', 'get backend list', cmd); cockpit.spawn(cmd, { superuser: true, "err": "message", "environ": [ENV]}).done(function(data) { // Update dropdowns for (var idx in dropdowns) { diff --git a/src/cockpit/389-console/src/monitor.html b/src/cockpit/389-console/src/monitor.html index 3feaf0b..4ce889b 100644 --- a/src/cockpit/389-console/src/monitor.html +++ b/src/cockpit/389-console/src/monitor.html @@ -705,7 +705,7 @@ -