Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ad 2 #17

Closed
wants to merge 20 commits into from
Closed

Ad 2 #17

wants to merge 20 commits into from

Conversation

calavera
Copy link
Contributor

This is a rebound of #14 with the log fixed.

The problem was that the method that checks if the log line is an error assumed that every line without a logging header came from an error. That's not true in cases like when a schema is being loaded, which is only info:

"INFO: Loading other enabled schema: \n"
"\tSchema Name: other\n"
"\t\tDisabled: false\n"
"\t\tOwner: uid=admin,ou=system\n"
"\t\tDependencies: [system, apachemeta, apache, core]\n"

Tests pass and there are no weird messages now:

calavera@dcp ~/oss/ladle (ad_2●)$ rake spec
Compiling java support code
/Users/calavera/oss/ladle/lib/ladle/apacheds/apacheds-service-2.0.0-M15.jar(org/apache/directory/api/ldap/model/name/Dn.class): warning: Cannot find annotation method 'value()' in type 'SuppressWarnings': class file for edu.umd.cs.findbugs.annotations.SuppressWarnings not found
/Users/calavera/oss/ladle/lib/ladle/apacheds/apacheds-service-2.0.0-M15.jar(org/apache/directory/api/ldap/model/name/Dn.class): warning: Cannot find annotation method 'justification()' in type 'SuppressWarnings'
Note: lib/ladle/java/net/detailedbalance/ladle/Server.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
2 warnings
/opt/boxen/rbenv/versions/2.1.0-github1/bin/ruby -S rspec spec/ladle/server_spec.rb spec/ladle/version_spec.rb
.......................................................

Finished in 2 minutes 9.3 seconds
55 examples, 0 failures

silarsis and others added 15 commits October 22, 2013 11:59
* Removed log4j file as it's now included through apacheds 2.0.0
* Upgraded net-ldap to latest version in gem spec
* made DN check for "dc=" case-insensitive
* Updated invalid credentials check as per change in apacheds result code
* Updated Server.java to support apacheds version 2.0.0

This commit does not support specification of a custom schema - however, custom schemas can be loaded after the fact as import of ldif into "ou=schema". Before release specification of custom schema should be re-introduced, although it may require that schemas are ldif rather than java.
* 'master' of https://github.com/silarsis/ladle:
  docco changes
  * support for custom schema as a standalone ldif file
  remove custom schema tests
  cleanup; added version update info, fixed variable names and version number, removed unused imports
  version up for net-ldap
  upgraded net-ldap version requirement
  version less restrictive
  up the version
  * Added apacheds 2.0.0M15 and removed apacheds 1.0.2 files * Removed log4j file as it's now included through apacheds 2.0.0 * Upgraded net-ldap to latest version in gem spec * made DN check for "dc=" case-insensitive * Updated invalid credentials check as per change in apacheds result code * Updated Server.java to support apacheds version 2.0.0
@calavera
Copy link
Contributor Author

I've also remove the java sources from the gem. They are not necessary.

@calavera
Copy link
Contributor Author

This is what the data tarball looks like now:

tar zxvf data.tar.gz
x ASL20-LICENSE
x CHANGELOG.md
x CUSTOM-SCHEMA.md
x LICENSE
x NOTICE
x README.md
x lib/ladle.rb
x lib/ladle/apacheds/antlr-2.7.6.jar
x lib/ladle/apacheds/apacheds-service-2.0.0-M15.jar
x lib/ladle/apacheds/backport-util-concurrent-2.2.jar
x lib/ladle/apacheds/commons-cli-1.0.jar
x lib/ladle/apacheds/commons-collections-3.2.jar
x lib/ladle/apacheds/commons-io-1.4.jar
x lib/ladle/apacheds/commons-lang-2.1.jar
x lib/ladle/apacheds/jcl-over-slf4j-1.5.6.jar
x lib/ladle/apacheds/jdbm-1.0.jar
x lib/ladle/apacheds/log4j-1.2.14.jar
x lib/ladle/apacheds/mina-core-1.0.2.jar
x lib/ladle/apacheds/mina-filter-ssl-1.0.2.jar
x lib/ladle/apacheds/shared-asn1-0.9.5.5.jar
x lib/ladle/apacheds/shared-asn1-codec-0.9.5.5.jar
x lib/ladle/apacheds/shared-ldap-0.9.5.5.jar
x lib/ladle/apacheds/slf4j-api-1.5.6.jar
x lib/ladle/apacheds/spring-beans-1.2.8.jar
x lib/ladle/apacheds/spring-context-1.2.8.jar
x lib/ladle/apacheds/spring-core-1.2.8.jar
x lib/ladle/apacheds/xercesImpl-2.0.2.jar
x lib/ladle/default.ldif
x lib/ladle/java/net/detailedbalance/ladle/LadleFatalException.class
x lib/ladle/java/net/detailedbalance/ladle/Main$1.class
x lib/ladle/java/net/detailedbalance/ladle/Main.class
x lib/ladle/java/net/detailedbalance/ladle/Server.class
x lib/ladle/jruby_process.rb
x lib/ladle/ruby_process.rb
x lib/ladle/server.rb
x lib/ladle/version.rb
x spec/ladle/animals-custom-schema.ldif
x spec/ladle/animals-custom.ldif
x spec/ladle/animals.ldif
x spec/ladle/server_spec.rb
x spec/ladle/version_spec.rb
x spec/spec_helper.rb

@calavera
Copy link
Contributor Author

@rsutphin it looks like Apache Directory needs more time to boot in this version. Do you want me to increase the timeout for the tests to see if they pass on travis?

@calavera
Copy link
Contributor Author

@rsutphin I'm curious about what made you move to a super old version of AD here:

e377860

I can definitely boot the ldap server via ladle with this changes, but it looks like my tests don't pass when Net::LDAP tries to execute queries on the server.

@rsutphin
Copy link
Contributor

Do you want me to increase the timeout for the tests to see if they pass on travis?

Yes, please give that a shot.

@rsutphin I'm curious about what made you move to a super old version of AD here:

Unfortunately I don't remember any more detail than what's in the commit message: something about ApacheDS 1.5 didn't work with the then-current version of net-ldap. Since net-ldap did work with my production system, I just switched to 1.0 to have something that I could usefully test with.

I'd be surprised if it's the same problem today — IIRC, net-ldap had at least a couple of major revisions since then.

@rsutphin
Copy link
Contributor

Thanks for tracking down the logging issue, BTW.

@calavera
Copy link
Contributor Author

I've increased the timeout to see what we get.

I solved my problem with Net::LDAP by removing the option to ignore server capabilities, we had it on by default for search.

@calavera
Copy link
Contributor Author

@rsutphin I'm just fighting with travis, I don't really know how to fix the problem there. So far, I haven't seen any of those errors in my environment.

The latest build passes on ruby 2.1 and jruby, which for me is enough.

@http-418 http-418 mentioned this pull request May 22, 2014
rsutphin added a commit that referenced this pull request May 24, 2014
Merge PR #18 for some doc cleanup work before merging to master. Supercedes #14
and #17; lots of work from @silarsis, @calavera, and @http-418.
@rsutphin
Copy link
Contributor

@calavera, thanks for all your work. #18 took this the last bit to completion.

@rsutphin rsutphin closed this May 24, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants