This is an automated email from the git hooks/post-receive script.
firstyear pushed a change to branch master in repository 389-ds-base.
from bcbc3e9 Ticket 49184 - adjust logging level in MO plugin new 54fc37b Ticket 49273 - bak2db doesn't operate with dbversion new 18ccdb4 Ticket 49281 - improve db2* tests
The 2 revisions listed above as "new" are entirely new to this repository and will be described in separate emails. The revisions listed as "adds" were already present in the repository and have only been added to this reference.
Summary of changes: dirsrvtests/tests/suites/basic/basic_test.py | 5 +++++ dirsrvtests/tests/tickets/ticket47536_test.py | 6 ++---- dirsrvtests/tests/tickets/ticket48383_test.py | 3 ++- ldap/servers/slapd/back-ldbm/dbversion.c | 6 ++++-- 4 files changed, 13 insertions(+), 7 deletions(-)
This is an automated email from the git hooks/post-receive script.
firstyear pushed a commit to branch master in repository 389-ds-base.
commit 54fc37be07da512eb01e9061c5b42006bc4e4b15 Author: William Brown firstyear@redhat.com Date: Tue Jun 6 14:31:01 2017 +1000
Ticket 49273 - bak2db doesn't operate with dbversion
Bug Description: in the dbversion corruption fix we checked for both ldbmversion and dataversion: however, we don't use dataversion in mostcases, and this causes an erro in db2bak during DBVERSION restore.
Fix Description: Only check ldbmversion, not dataversion. dataversion is checked with a warning.
https://pagure.io/389-ds-base/issue/49273
Author: wibrown
Review by: mreynosd (Thanks!) --- ldap/servers/slapd/back-ldbm/dbversion.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/ldap/servers/slapd/back-ldbm/dbversion.c b/ldap/servers/slapd/back-ldbm/dbversion.c index 33ca329..58b6732 100644 --- a/ldap/servers/slapd/back-ldbm/dbversion.c +++ b/ldap/servers/slapd/back-ldbm/dbversion.c @@ -177,7 +177,10 @@ dbversion_read(struct ldbminfo *li, const char *directory, } (void)PR_Close( prfd );
- if (*ldbmversion == NULL || *dataversion == NULL) { + if (*dataversion == NULL ) { + slapi_log_err(SLAPI_LOG_DEBUG, "dbversion_read", "dataversion not present in "%s"\n", filename); + } + if (*ldbmversion == NULL ) { /* DBVERSIOn is corrupt, COMPLAIN! */ /* This is IDRM Identifier removed (POSIX.1) * which seems appropriate for the error here :) @@ -186,7 +189,6 @@ dbversion_read(struct ldbminfo *li, const char *directory, slapi_log_err(SLAPI_LOG_CRIT, "dbversion_read", "It may be possible to recover by replacing with a valid DBVERSION file from another DB instance\n"); return EIDRM; } - return 0; } }
This is an automated email from the git hooks/post-receive script.
firstyear pushed a commit to branch master in repository 389-ds-base.
commit 18ccdb43205cfcb91104557a4c5e3eeb058554ac Author: William Brown firstyear@redhat.com Date: Tue Jun 6 15:51:39 2017 +1000
Ticket 49281 - improve db2* tests
Bug Description: In lib389 50 we change how db2bak and db2ldif work, so we need to update our tests accordingly
Fix Description: Add start/stop as needed, and prevent the raw call to perl tools.
https://pagure.io/389-ds-base/issue/49281
Author: wibrown
Review by: mreynolds (Thanks!) --- dirsrvtests/tests/suites/basic/basic_test.py | 5 +++++ dirsrvtests/tests/tickets/ticket47536_test.py | 6 ++---- dirsrvtests/tests/tickets/ticket48383_test.py | 3 ++- 3 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/dirsrvtests/tests/suites/basic/basic_test.py b/dirsrvtests/tests/suites/basic/basic_test.py index c548103..f9a954a 100644 --- a/dirsrvtests/tests/suites/basic/basic_test.py +++ b/dirsrvtests/tests/suites/basic/basic_test.py @@ -235,9 +235,11 @@ def test_basic_import_export(topology_st, import_example_ldif): assert False
# Offline + topology_st.standalone.stop() if not topology_st.standalone.ldif2db(DEFAULT_BENAME, None, None, None, import_ldif): log.fatal('test_basic_import_export: Offline import failed') assert False + topology_st.standalone.start()
# # Test online and offline LDIF export @@ -254,6 +256,7 @@ def test_basic_import_export(topology_st, import_example_ldif): assert False
# Offline export + topology_st.standalone.stop() if not topology_st.standalone.db2ldif(DEFAULT_BENAME, (DEFAULT_SUFFIX,), None, None, None, export_ldif): log.fatal('test_basic_import_export: Failed to run offline db2ldif') @@ -302,6 +305,7 @@ def test_basic_backup(topology_st, import_example_ldif): assert False
# Test offline backup + topology_st.standalone.stop() if not topology_st.standalone.db2bak(backup_dir): log.fatal('test_basic_backup: Offline backup failed') assert False @@ -310,6 +314,7 @@ def test_basic_backup(topology_st, import_example_ldif): if not topology_st.standalone.bak2db(backup_dir): log.fatal('test_basic_backup: Offline backup failed') assert False + topology_st.standalone.start()
log.info('test_basic_backup: PASSED')
diff --git a/dirsrvtests/tests/tickets/ticket47536_test.py b/dirsrvtests/tests/tickets/ticket47536_test.py index ef9817f..8847601 100644 --- a/dirsrvtests/tests/tickets/ticket47536_test.py +++ b/dirsrvtests/tests/tickets/ticket47536_test.py @@ -405,10 +405,8 @@ def test_ticket47536(topology_m2): entries = topology_m2.ms["master2"].search_s(DEFAULT_SUFFIX, ldap.SCOPE_SUBTREE, '(uid=*)') assert 20 == len(entries)
- db2ldifpl = '%s/db2ldif.pl' % topology_m2.ms["master1"].get_sbin_dir() - cmdline = [db2ldifpl, '-n', 'userRoot', '-Z', SERVERID_MASTER_1, '-D', DN_DM, '-w', PASSWORD] - log.info("##### db2ldif.pl -- %s" % (cmdline)) - doAndPrintIt(cmdline) + output_file = os.path.join(topology_m2.ms["master1"].get_ldif_dir(), "master1.ldif") + topology_m2.ms["master1"].tasks.exportLDIF(benamebase='userRoot', output_file=output_file, args={'wait': True})
log.info("Ticket 47536 - PASSED")
diff --git a/dirsrvtests/tests/tickets/ticket48383_test.py b/dirsrvtests/tests/tickets/ticket48383_test.py index b1fa93d..a147448 100644 --- a/dirsrvtests/tests/tickets/ticket48383_test.py +++ b/dirsrvtests/tests/tickets/ticket48383_test.py @@ -69,7 +69,7 @@ def test_ticket48383(topology_st): ldifpath = os.path.join(topology_st.standalone.get_ldif_dir(), "%s.ldif" % SERVERID_STANDALONE)
# stop the server - topology_st.standalone.stop(timeout=30) + topology_st.standalone.stop() # Now export and import the DB. It's easier than db2index ... topology_st.standalone.db2ldif(bename=DEFAULT_BENAME, suffixes=[DEFAULT_SUFFIX], excludeSuffixes=[], encrypt=False, repl_data=True, outputfile=ldifpath) @@ -77,6 +77,7 @@ def test_ticket48383(topology_st): result = topology_st.standalone.ldif2db(DEFAULT_BENAME, None, None, False, ldifpath)
assert (result) + topology_st.standalone.start()
# see if user1 exists at all ....
389-commits@lists.fedoraproject.org