[389-devel] Please review: With NSS SQL db, ds will not start

2017-04-04 Thread William Brown
https://pagure.io/389-ds-base/issue/49041

https://pagure.io/389-ds-base/issue/raw/files/0b80b56b4f4c765518293a0263d321cde1b101c04c5aa57a1368164e0cde29d2-0001-Ticket-49041-SSL-fails-to-start-due-to-NSS-db-versio.patch

-- 
Sincerely,

William Brown
Software Engineer
Red Hat, Australia/Brisbane



signature.asc
Description: This is a digitally signed message part
___
389-devel mailing list -- 389-devel@lists.fedoraproject.org
To unsubscribe send an email to 389-devel-le...@lists.fedoraproject.org


[389-devel] Build failed in Jenkins: 389-DS-NIGHTLY #199

2017-04-04 Thread Jenkins
See 


--
[...truncated 4276 lines...]
suites/ds_logs/ds_logs_test.py::test_check_default PASSED
suites/ds_logs/ds_logs_test.py::test_plugin_set_invalid PASSED
suites/ds_logs/ds_logs_test.py::test_log_plugin_on PASSED
suites/ds_logs/ds_logs_test.py::test_log_plugin_off PASSED
suites/dynamic_plugins/dynamic_plugins_test.py::test_dynamic_plugins PASSED
suites/filter/filter_test.py::test_filter_escaped PASSED
suites/filter/filter_test.py::test_filter_search_original_attrs PASSED
suites/filter/rfc3673_all_oper_attrs_test.py::test_supported_features PASSED
suites/filter/rfc3673_all_oper_attrs_test.py::test_search_basic[-False-oper_attr_list0]
 PASSED
suites/filter/rfc3673_all_oper_attrs_test.py::test_search_basic[-False-oper_attr_list0-*]
 PASSED
suites/filter/rfc3673_all_oper_attrs_test.py::test_search_basic[-False-oper_attr_list0-objectClass]
 PASSED
suites/filter/rfc3673_all_oper_attrs_test.py::test_search_basic[-True-oper_attr_list1]
 PASSED
suites/filter/rfc3673_all_oper_attrs_test.py::test_search_basic[-True-oper_attr_list1-*]
 PASSED
suites/filter/rfc3673_all_oper_attrs_test.py::test_search_basic[-True-oper_attr_list1-objectClass]
 PASSED
suites/filter/rfc3673_all_oper_attrs_test.py::test_search_basic[ou=people,dc=example,dc=com-False-oper_attr_list2]
 PASSED
suites/filter/rfc3673_all_oper_attrs_test.py::test_search_basic[ou=people,dc=example,dc=com-False-oper_attr_list2-*]
 PASSED
suites/filter/rfc3673_all_oper_attrs_test.py::test_search_basic[ou=people,dc=example,dc=com-False-oper_attr_list2-objectClass]
 PASSED
suites/filter/rfc3673_all_oper_attrs_test.py::test_search_basic[ou=people,dc=example,dc=com-True-oper_attr_list3]
 PASSED
suites/filter/rfc3673_all_oper_attrs_test.py::test_search_basic[ou=people,dc=example,dc=com-True-oper_attr_list3-*]
 PASSED
suites/filter/rfc3673_all_oper_attrs_test.py::test_search_basic[ou=people,dc=example,dc=com-True-oper_attr_list3-objectClass]
 PASSED
suites/filter/rfc3673_all_oper_attrs_test.py::test_search_basic[uid=all_attrs_test,ou=people,dc=example,dc=com-False-oper_attr_list4]
 PASSED
suites/filter/rfc3673_all_oper_attrs_test.py::test_search_basic[uid=all_attrs_test,ou=people,dc=example,dc=com-False-oper_attr_list4-*]
 PASSED
suites/filter/rfc3673_all_oper_attrs_test.py::test_search_basic[uid=all_attrs_test,ou=people,dc=example,dc=com-False-oper_attr_list4-objectClass]
 PASSED
suites/filter/rfc3673_all_oper_attrs_test.py::test_search_basic[uid=all_attrs_test,ou=people,dc=example,dc=com-True-oper_attr_list5]
 PASSED
suites/filter/rfc3673_all_oper_attrs_test.py::test_search_basic[uid=all_attrs_test,ou=people,dc=example,dc=com-True-oper_attr_list5-*]
 PASSED
suites/filter/rfc3673_all_oper_attrs_test.py::test_search_basic[uid=all_attrs_test,ou=people,dc=example,dc=com-True-oper_attr_list5-objectClass]
 PASSED
suites/filter/rfc3673_all_oper_attrs_test.py::test_search_basic[cn=config-False-oper_attr_list6]
 PASSED
suites/filter/rfc3673_all_oper_attrs_test.py::test_search_basic[cn=config-False-oper_attr_list6-*]
 PASSED
suites/filter/rfc3673_all_oper_attrs_test.py::test_search_basic[cn=config-False-oper_attr_list6-objectClass]
 PASSED
suites/gssapi_repl/gssapi_repl_test.py::test_gssapi_repl PASSED
suites/memory_leaks/range_search_test.py::test_range_search PASSED
suites/paged_results/paged_results_test.py::test_search_success[6-5] PASSED
suites/paged_results/paged_results_test.py::test_search_success[5-5] PASSED
suites/paged_results/paged_results_test.py::test_search_success[5-25] PASSED
suites/paged_results/paged_results_test.py::test_search_limits_fail[50-200-cn=config,cn=ldbm
 
database,cn=plugins,cn=config-nsslapd-idlistscanlimit-100-UNWILLING_TO_PERFORM] 
PASSED
suites/paged_results/paged_results_test.py::test_search_limits_fail[5-15-cn=config-nsslapd-timelimit-20-UNAVAILABLE_CRITICAL_EXTENSION]
 PASSED
suites/paged_results/paged_results_test.py::test_search_limits_fail[21-50-cn=config-nsslapd-sizelimit-20-SIZELIMIT_EXCEEDED]
 PASSED
suites/paged_results/paged_results_test.py::test_search_limits_fail[21-50-cn=config-nsslapd-pagedsizelimit-5-SIZELIMIT_EXCEEDED]
 PASSED
suites/paged_results/paged_results_test.py::test_search_limits_fail[5-50-cn=config,cn=ldbm
 database,cn=plugins,cn=config-nsslapd-lookthroughlimit-20-ADMINLIMIT_EXCEEDED] 
PASSED
suites/paged_results/paged_results_test.py::test_search_sort_success PASSED
suites/paged_results/paged_results_test.py::test_search_abandon PASSED
suites/paged_results/paged_results_test.py::test_search_with_timelimit PASSED
suites/paged_results/paged_results_test.py::test_search_dns_ip_aci[dns = 
"localhost.localdomain"] PASSED
suites/paged_results/paged_results_test.py::test_search_dns_ip_aci[ip = "::1" 
or ip = "127.0.0.1"] PASSED
suites/paged_results/paged_results_test.py::test_search_multiple_paging PASSED
suites/paged_results/paged_results_test.py::test_search_invalid_cookie[1000] 
PASSED

[389-devel] Re: Please review: DSLdapObject compare function and user compare tests

2017-04-04 Thread William Brown
On Tue, 2017-04-04 at 23:02 +, Ankit Yadav wrote:
> Hello Everyone, 
> 
> I was working on issue #1 lib389 cn=config comparison, I have done some work 
> in that direction. I have added a compare function on DSLdapObject and have 
> written a test for comparing user object. Currently this test is not 
> complete, I am just printing the attributes values to verify the working of 
> comparison function.
> But comparison function is working, so let me know your feedback and how we 
> can proceed further with this?
> 
> Link to commit: 
> https://pagure.io/fork/ankity10/lib389/c/44b02ba4ddb54be12041052b5b75f17b9eaf6b8f?branch=ticket-1-config-compare
> 

Hey there,

Looks like a great start. A lot of comments though, but thanks for all
your effort and I hope these comments help you improve your code a lot.



27 + obj1_attrs_json = obj1.get_compare_attrs()
28 + obj2_attrs_json = obj2.get_compare_attrs()
29 + return DeepDiff(obj1_attrs_json, obj2_attrs_json)

I don't think you should convert these to json. You should be comparing
the dictionaries from the Entry directly. The JSON is only there for our
future admin server to represent the entries in a website - it should
never be used internally for operations in this library. JSON is also
non-deterministic garbage IMO, so lets avoid it "unless we need it". 

You already have:

42 + attrs_entry = self._instance.getEntry(self._dn,
ldap.SCOPE_BASE, "(objectclass=*)", ["*", "+"])42 +
attrs_entry = self._instance.getEntry(self._dn, ldap.SCOPE_BASE,
"(objectclass=*)", ["*", "+"])

So you should probably return either the entry data dict from here
instead, then compare on that an example of this here:

As "inspiration", look at:

https://pagure.io/lib389/blob/master/f/lib389/_entry.py#_91

It's worth exploring and reading the code for what you use to find gems
like this you may be able to copy or reuse. I think in this case, it's
better to make a new compare function based on this code rather than
trying to hack entry.__eq__ to work in this case, if that makes sense. 


 5 + from deepdiff import DeepDiff

Please don't add library dependencies, unless it exists as a package on
RHEL7, we can not support extra dependencies in our code. 

"""
yum search deepdiff
...
Warning: No matches found for: deepdiff
No matches found
"""


With these lines:

12   class DSLdapObject(DSLogging):
13 + compare_exclude = []

4   class UserAccount(DSLdapObject):
5 + compare_exclude = ['nsuniqueid']
6 + 

Make sure you put these attributes in __init__() of the objects as:

def __init__()
self._compare_exclude =  

The reason for this is that the top level attribute is global to all instances. 
So if any subclass overrides
the attribute, it causes the override of the parents attribute for ALL 
subclasses: this causes horrible
horrible issues that are near impossible to resolve. You need to make these 
self. to indicate
they are on the single instance only, which makes it work correctly.

As well, because these are internal, prefix the variable with an _ to say it's 
private. Therefore:

def __init__()
self._compare_exclude =  

Remember, especially on the UserAccount, to put the self._compare_exclude 
*after* the call
to super(UserAccount).__init__! , else the super call will just flush it back 
to the DSLdapObject
value. 



With your test case, you don't need:

57 + assert (len(users.list()) == 1)

Because if the user fails to create, we throw an exception from users.create, 
so the test
will fail at that stage. :) 


74 + print("testuser1 all attributes: ")

try to use 

log.[info,debug,error]() instead. This way based on the
DEBBUGING environment variable we see more or less output. We shouldn't
have "print" anywhere in the code base. 


88 + # We want to capture std out while running this module through
pytest, hence adding explicit test failure

Run py.test with "-s" to show the stdout during the test instead :) 


Remember, to test users that are the same and also different! Also, a
user compared to itself must be the same also, and a user compared to a
different object class should also be false! IE compare a user to a
group :) 


I hope that this advice helps you: I know it's a lot to change, but
thanks for your work! 

-- 
Sincerely,

William Brown
Software Engineer
Red Hat, Australia/Brisbane



signature.asc
Description: This is a digitally signed message part
___
389-devel mailing list -- 389-devel@lists.fedoraproject.org
To unsubscribe send an email to 389-devel-le...@lists.fedoraproject.org


[389-devel] Please review: New test cases and lib389 fix

2017-04-04 Thread Simon Pichugin
Hi team,
please, review my new test cases for replication acceptance test suite
and a small fix for lib389.

https://pagure.io/389-ds-base/issue/48085
https://pagure.io/389-ds-base/issue/raw/files/a9826a42730d4ffad4ae826ef9d5e96fa585e06c1dcf67b4e9854a50ca659601-0001-Issue-48085-Expand-the-repl-acceptance-test-suite.patch

https://pagure.io/lib389/issue/16
https://pagure.io/lib389/issue/raw/files/cde155ba9405f66ee9bc6428401f3027d307e300872d93c4bdfc8aa000f62ad8-0001-Issue-16-Reset-InstScriptsEnabled-argument-during-th.patch

Thanks,
Simon


signature.asc
Description: PGP signature
___
389-devel mailing list -- 389-devel@lists.fedoraproject.org
To unsubscribe send an email to 389-devel-le...@lists.fedoraproject.org


[389-devel] Build failed in Jenkins: 389-ds-base #1239

2017-04-04 Thread jenkins
See 

Changes:

[thierry bordaz] Ticket 49209 - Hang due to omitted replica lock release

--
Started by an SCM change
Building remotely on F25 (Fedora25 fedora Fedora fedora25) in workspace 

Wiping out workspace first.
Cloning the remote Git repository
Cloning repository http://pagure.io/389-ds-base.git
 > git init  # 
 > timeout=10
Fetching upstream changes from http://pagure.io/389-ds-base.git
 > git --version # timeout=10
 > git -c core.askpass=true fetch --tags --progress 
 > http://pagure.io/389-ds-base.git +refs/heads/*:refs/remotes/origin/*
 > git config remote.origin.url http://pagure.io/389-ds-base.git # timeout=10
 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # 
 > timeout=10
 > git config remote.origin.url http://pagure.io/389-ds-base.git # timeout=10
Fetching upstream changes from http://pagure.io/389-ds-base.git
 > git -c core.askpass=true fetch --tags --progress 
 > http://pagure.io/389-ds-base.git +refs/heads/*:refs/remotes/origin/*
 > git rev-parse origin/master^{commit} # timeout=10
Checking out Revision 7dc991b16b97bacb69ddb334358e27e1220ca27b (origin/master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 7dc991b16b97bacb69ddb334358e27e1220ca27b
 > git rev-list 0550cead9f7e62ffe47c64a853d200f75b93ff5d # timeout=10
[389-ds-base] $ /bin/sh -e /tmp/hudson6402623994585077221.sh

Running configure...
CFLAGS= -Wall CXXFLAGS= -Wall ./configure --with-tmpfiles-d=/etc/tmpfiles.d 
--with-openldap --enable-autobind --enable-gcc-security --with-selinux 
--with-systemdsystemunitdir=/lib/systemd/system 
--with-systemdsystemconfdir=/etc/systemd/system --enable-debug
Build log is 
https://jenkins.fedorainfracloud.org/job/389-ds-base/ws/build.1239.txt
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
autoreconf: configure.ac: tracing
autoreconf: running: libtoolize --copy --force
libtoolize: putting auxiliary files in '.'.
libtoolize: copying file './ltmain.sh'
libtoolize: putting macros in 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
libtoolize: Consider adding 'AC_CONFIG_MACRO_DIRS([m4])' to configure.ac,
libtoolize: and rerunning libtoolize and aclocal.
autoreconf: running: /usr/bin/autoconf --force
autoreconf: running: /usr/bin/autoheader --force
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:29: installing './compile'
configure.ac:25: installing './config.guess'
configure.ac:25: installing './config.sub'
configure.ac:14: installing './install-sh'
configure.ac:14: installing './missing'
Makefile.am: installing './depcomp'
parallel-tests: installing './test-driver'
autoreconf: Leaving directory `.'

Running make...
Build log is 
https://jenkins.fedorainfracloud.org/job/389-ds-base/ws/build.1239.txt

Checking for warnings...
Build https://jenkins.fedorainfracloud.org/job/389-ds-base/1239/ failed
There are build warnings
Warning log is 
https://jenkins.fedorainfracloud.org/job/389-ds-base/ws/build-warns.1239.txt
Last 100 lines of warning log:

ldap/servers/slapd/util.c:1492:65: warning: zero-length gnu_printf format 
string [-Wformat-zero-length]
ldap/servers/slapd/slapi-private.h:40:81: note: in definition of macro 
‘slapi_log_err’
ldap/servers/slapd/util.c:1468:15: warning: ‘util_getvirtualmemsize’ defined 
but not used [-Wunused-function]


Build step 'Execute shell' marked build as failure
___
389-devel mailing list -- 389-devel@lists.fedoraproject.org
To unsubscribe send an email to 389-devel-le...@lists.fedoraproject.org


[389-devel] Please review 49209: Hang due to omitted replica lock release

2017-04-04 Thread thierry bordaz

https://pagure.io/389-ds-base/issue/49209

patch is: 
https://pagure.io/389-ds-base/issue/raw/files/8adf20a3bebb247024662ee92aa8783d99f85fd0183398822a856287a75fe7fd-0001-Ticket-49209-Hang-due-to-omitted-replica-lock-releas.patch

___
389-devel mailing list -- 389-devel@lists.fedoraproject.org
To unsubscribe send an email to 389-devel-le...@lists.fedoraproject.org