]> git.evergreen-ils.org Git - OpenSRF.git/log
OpenSRF.git
12 years ago2.0.1 release preparation osrf_rel_2_0_1
Dan Scott [Fri, 19 Aug 2011 16:11:54 +0000 (12:11 -0400)]
2.0.1 release preparation

Bump version numbers and update ChangeLog

Signed-off-by: Dan Scott <dscott@laurentian.ca>
12 years agoAdd a 0 to max_stanza_size in README instructions
Dan Scott [Fri, 19 Aug 2011 13:45:16 +0000 (09:45 -0400)]
Add a 0 to max_stanza_size in README instructions

Yes, that should be 2000000, not 200000 for max_stanza_size. Symptoms
included "Text of error message received from Jabber: XML stanza is too
big" in error logs and crashing OpenSRF processes.

For reference,
http://list.georgialibraries.org/pipermail/open-ils-dev/2011-August/007494.html

Signed-off-by: Dan Scott <dscott@laurentian.ca>
12 years agoLP 799718: Pass the DESTDIR variable to setup.py
Ben Webb [Mon, 25 Jul 2011 20:40:40 +0000 (21:40 +0100)]
LP 799718: Pass the DESTDIR variable to setup.py

This allows python modules to be built when creating packages.

Per comment from Dan Scott on the LP bug:

http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap03.html#tag_03_266
says "Multiple successive slashes are considered to be the same as one
slash." so in theory "--root=$(DESTDIR)/" should be just as safe as
"--root=$(DESTDIR)///", but why not go the distance and use 3 slashes to
avoid any possibility of some oddball POSIX implementation that treats 2
slashes differently for some reason?

Signed-off-by: Ben Webb <bjwebb67@googlemail.com>
Signed-off-by: Dan Scott <dscott@laurentian.ca>
12 years agoRespect DESTDIR during the build process
Ben Webb [Mon, 13 Jun 2011 12:29:36 +0000 (13:29 +0100)]
Respect DESTDIR during the build process

Replace instances of make with the generic $(MAKE)
Add $(DESTDIR) to paths it is currently missing from
Manually specify the apxs2 install location so that DESTDIR can be prepended
Attempt to create the apache directory if it does not exist

Signed-off-by: Ben Webb <bjwebb67@googlemail.com>
Signed-off-by: Dan Scott <dan@coffeecode.net>
12 years agoTeach Perl Makefile to build Build for every target
Dan Scott [Wed, 18 May 2011 14:23:18 +0000 (10:23 -0400)]
Teach Perl Makefile to build Build for every target

With the previous Perl Makefile.am, running "make check" before
running "make all" would fail on the Perl directory because it
assumed that Build would have been created from Build.PL. Factoring out
the build of Build from Build.PL and making that a prereq of the
pertinent targets avoids that problem on a clean checkout of the
OpenSRF source.

Signed-off-by: Dan Scott <dan@coffeecode.net>
12 years agoAdd Check dependencies for Fedora
dbs [Sun, 8 May 2011 15:40:23 +0000 (15:40 +0000)]
Add Check dependencies for Fedora

Required to run "make check" for the C unit tests
previously added by Kevin Beswick.

Signed-off-by: Dan Scott <dan@coffeecode.net>
git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2241 9efc2488-bf62-4759-914b-345cdb29e865

12 years agoAdd a C unit testing framework and tests for OpenSRF
dbs [Sun, 8 May 2011 15:38:58 +0000 (15:38 +0000)]
Add a C unit testing framework and tests for OpenSRF

The unit testing framework is "Check" - http://check.sourceforge.net/

These tests can be executed by running 'make check' after you
configure and compile the OpenSRF code.

To run them, you must have the 'check' package installed.

Author: Kevin Beswick <kevinbeswick00@gmail.com>
Signed-off-by: Dan Scott <dan@coffeecode.net>
Signed-off-by: Kevin Beswick <kevinbeswick00@gmail.com>
git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2240 9efc2488-bf62-4759-914b-345cdb29e865

12 years agomove jabber_state_machine_struct into header to keep 'make check' happy
dbs [Sun, 8 May 2011 15:38:31 +0000 (15:38 +0000)]
move jabber_state_machine_struct into header to keep 'make check' happy

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2239 9efc2488-bf62-4759-914b-345cdb29e865

12 years agoPatch from Kevin Beswick to support set operations on certain opensrf message fields...
erickson [Thu, 28 Apr 2011 16:21:39 +0000 (16:21 +0000)]
Patch from Kevin Beswick to support set operations on certain opensrf message fields.  note, this does not currently affect behavior, since values for messages are initially set from parsing JSON without using the access/mutators for setting values.

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2235 9efc2488-bf62-4759-914b-345cdb29e865

12 years agoSidestep JSON object ordering in unit tests
dbs [Mon, 25 Apr 2011 04:14:11 +0000 (04:14 +0000)]
Sidestep JSON object ordering in unit tests

Depending on the JS engine and version of Dojo, the order
of attributes in JSON objects may change (as is explicitly
allowed by the JSON spec). To avoid false test failures,
only use one attribute in the object.

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2233 9efc2488-bf62-4759-914b-345cdb29e865

13 years agochange proc managament debug message from Info to Debug
erickson [Thu, 21 Apr 2011 20:05:07 +0000 (20:05 +0000)]
change proc managament debug message from Info to Debug

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2231 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoadditional settings in sample rsyslog config: disable EscapeControlCharactersOnReceive
erickson [Tue, 12 Apr 2011 13:37:42 +0000 (13:37 +0000)]
additional settings in sample rsyslog config: disable EscapeControlCharactersOnReceive

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2229 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoHandle the common NXDOMAIN problem with Python a bit more gracefully
dbs [Wed, 30 Mar 2011 04:34:39 +0000 (04:34 +0000)]
Handle the common NXDOMAIN problem with Python a bit more gracefully

Rather than dumping a nasty full stacktrace to the command line, we
print a hopefully helpful pointer to the actual problem in plain
English.

Also, rather than stopping everything if a "stop_all" command was
issued, skip the error status in osrf_ctl.sh for the Python bit
and carry on shutting down the other services. A bit more convenient
if you want to have Python enabled but don't necessarily need it
running.

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2227 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoMake javascript unit tests more granular to ease tracking down errors
dbs [Tue, 29 Mar 2011 13:58:38 +0000 (13:58 +0000)]
Make javascript unit tests more granular to ease tracking down errors

Noticed a failure when running with Rhino 1.7RC2 that wasn't happening
with version of Rhino packaged in shrinksafe.jar, and it was a bit
tedious narrowing down which test was actually failing. Breaking up
the tests into smaller sets will make this process easier and might invite
the submission of other tests to target areas that are not yet covered.

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2225 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoA few more tests for JSON_v1.js
dbs [Tue, 29 Mar 2011 13:58:08 +0000 (13:58 +0000)]
A few more tests for JSON_v1.js

We're not really touching the interesting parts of encodeJS/decodeJS
yet, but at least we get to open the door a crack.

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2224 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoAdd DOH-based unit test harness for OpenSRF JavaScript
dbs [Tue, 29 Mar 2011 13:57:51 +0000 (13:57 +0000)]
Add DOH-based unit test harness for OpenSRF JavaScript

The Dojo Objective Harness enables us to run unit tests from the command
line or within a browser. Running tests from a command line makes it easier
to fold into the continuous integration server. Included in this commit
is a small README for setting up command-line testing and a sample set
of unit tests that exercise parts of JSON_v1.js.

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2223 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoGive Python services introspection methods matching C and Perl
dbs [Tue, 29 Mar 2011 03:06:15 +0000 (03:06 +0000)]
Give Python services introspection methods matching C and Perl

Perl and C services offer "opensrf.system.method" and
"opensrf.system.method.all" methods for accessing service
information. Renaming Python's methods to match at least
enables srfsh to access this information, even if it does
still need to be taught to provide that information in a
consistent manner.

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2221 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoImproved PID file handling in osrf_ctl.sh
dbs [Sun, 27 Mar 2011 21:37:32 +0000 (21:37 +0000)]
Improved PID file handling in osrf_ctl.sh

Joseph Lewis <joehms22@gmail.com> submitted a patch to address
https://bugs.launchpad.net/evergreen/+bug/741088 ("osrf_ctl.sh Doesn't check if
process is actually running")

As of this patch, when start_perl, start_c, or start_python are started and
existing PID files are found for those processes, instead of assuming that the
processes are actually running, osrf-ctl.sh now has the intelligence to check
the process list to see if there is a matching process. If no running process
is found, then the old PID file is removed and the start command is issued.

Two additional actions have been added, "smart_clear" and "clear_pid".

"smart_clear" checks the PID files against the running processes and removes
PID files where no running process is found. This is effectively invoked
under the covers when start_* is invoked and a PID file is found.

"clear_pid" deletes all PID files without checking to see if there are any
running processes. In most cases, it should only be invoked as part of an
automated boot sequence.

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
    have the right to submit it under the open source license
    indicated in the file; or

(b) The contribution is based upon previous work that, to the best
    of my knowledge, is covered under an appropriate open source
    license and I have the right under that license to submit that
    work with modifications, whether created in whole or in part
    by me, under the same open source license (unless I am
    permitted to submit under a different license), as indicated
    in the file; or

(c) The contribution was provided directly to me by some other
    person who certified (a), (b) or (c) and I have not modified
    it.

(d) I understand and agree that this project and the contribution
    are public and that a record of the contribution (including all
    personal information I submit with it, including my sign-off) is
    maintained indefinitely and may be redistributed consistent with
    this project or the open source license(s) involved.

Signed-off-by: Joseph Lewis <joehms22@gmail.com>
git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2216 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoRun OpenSRF JavaScript through jslint for a light cleanup
dbs [Sun, 13 Mar 2011 06:04:51 +0000 (06:04 +0000)]
Run OpenSRF JavaScript through jslint for a light cleanup

Mostly just semicolons, and shifting a bit of code around to reduce
usage of functions/classes before they've been defined. Staying away
from the === / !== operators for null/undefined/0/''/true/false for
now.

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2210 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoForward-port AsciiDoc version of README from 2.0.0-rc2
dbs [Fri, 11 Mar 2011 13:14:50 +0000 (13:14 +0000)]
Forward-port AsciiDoc version of README from 2.0.0-rc2

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2207 9efc2488-bf62-4759-914b-345cdb29e865

13 years agobug fix with srfsh.py introspection; better handling/reporting of service exceptions
erickson [Wed, 2 Mar 2011 18:38:38 +0000 (18:38 +0000)]
bug fix with srfsh.py introspection; better handling/reporting of service exceptions

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2197 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoconsistent w/ sigpipe handling in osrf 1.6, provide a warning and retry mechanism...
erickson [Wed, 2 Mar 2011 15:04:22 +0000 (15:04 +0000)]
consistent w/ sigpipe handling in osrf 1.6, provide a warning and retry mechanism for syswrites that fail as a result of sigpipe

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2195 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoRecommend Fedora 14 as F13 goes out of support in a few months
dbs [Mon, 28 Feb 2011 04:06:51 +0000 (04:06 +0000)]
Recommend Fedora 14 as F13 goes out of support in a few months

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2183 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoRemove max_requests config stanza from C language implementations in example config
dbs [Tue, 22 Feb 2011 18:17:24 +0000 (18:17 +0000)]
Remove max_requests config stanza from C language implementations in example config

Only Perl implementations support the max_requests stanza, so let's not confuse
matters with an unused element.

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2180 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoadded sample rsyslog opensrf configuration file
dbs [Tue, 22 Feb 2011 18:15:18 +0000 (18:15 +0000)]
added sample rsyslog opensrf configuration file

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2179 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoTrivial typo fix (also tests OpenSRF buildbot)
dbs [Tue, 22 Feb 2011 18:14:30 +0000 (18:14 +0000)]
Trivial typo fix (also tests OpenSRF buildbot)

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2178 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoRemove extraneous line for dnsmasq / Python
dbs [Tue, 22 Feb 2011 18:12:51 +0000 (18:12 +0000)]
Remove extraneous line for dnsmasq / Python

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2177 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoGet that brace back in the right place
dbs [Tue, 22 Feb 2011 18:02:07 +0000 (18:02 +0000)]
Get that brace back in the right place

Unbreak the build. Argh.

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2176 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoAdd hints to increase max_children config variable if we're hitting the maximum
dbs [Tue, 22 Feb 2011 18:01:01 +0000 (18:01 +0000)]
Add hints to increase max_children config variable if we're hitting the maximum

Already added this hint to the Python implementation, now propagating to
C and Perl.

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2175 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoClean up Python server implementation, guided by pylint
dbs [Tue, 22 Feb 2011 17:58:54 +0000 (17:58 +0000)]
Clean up Python server implementation, guided by pylint

Add some docstrings, keep line lengths at 80 or less (MORE
WHITESPACE!), remove some dead code, and add a hint to check
max_children config value if we're bumping up against the
limit.

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2174 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoon second thought, removing debug sleep method, which is (more than most) a DOS waiti...
dbs [Tue, 22 Feb 2011 17:50:06 +0000 (17:50 +0000)]
on second thought, removing debug sleep method, which is (more than most) a DOS waiting to happen.

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2173 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoApply libtools versioning to OpenSRF c-apps as well
dbs [Tue, 22 Feb 2011 17:46:39 +0000 (17:46 +0000)]
Apply libtools versioning to OpenSRF c-apps as well

We apply a -version-info argument of 2:0:2, meaning:
  * interface = 2: interface '2' of this library
  * revision = 0: first implementation of interface '2'
  * age = 2: this library can be linked with executables going back
    two interface versions

See http://sourceware.org/autobook/autobook/autobook_91.html for more
information on the -version-info argument.

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2172 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoPrepare for version 2.0.0 with versioning for 2.0.0
dbs [Tue, 22 Feb 2011 17:44:25 +0000 (17:44 +0000)]
Prepare for version 2.0.0 with versioning for 2.0.0

Use the libtool -version-info option to provide an explicit version
for the libopensrf.so library. Introducing versioned libraries will
give us the ability to force recompiles of linked applications when
binary compatibility has been broken.

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2171 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoadded opensrf.system.sleep method; takes 1 param (seconds); useful for debugging...
dbs [Tue, 22 Feb 2011 17:41:00 +0000 (17:41 +0000)]
added opensrf.system.sleep method; takes 1 param (seconds); useful for debugging child process management

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2170 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoResolve encoding problem found by attempting to register patrons with Unicode names
dbs [Tue, 22 Feb 2011 14:42:00 +0000 (14:42 +0000)]
Resolve encoding problem found by attempting to register patrons with Unicode names

Symptoms were:

1. a gateway.log entry showing http_translator receiving an XMPP error message
2. a corresponding osrfsys.log entry "server: died with error Wide character in syswrite at /usr/local/share/perl5/OpenSRF/Server.pm line 239"

Per normal Perl Unicode handling practices, decoding input and encoding output
using the Encode module and decode_utf8() / encode_utf8() appears to resolve
the problem.

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2169 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoWhitespace consistency (tabs for Makefiles I guess)
dbs [Mon, 31 Jan 2011 05:59:01 +0000 (05:59 +0000)]
Whitespace consistency (tabs for Makefiles I guess)

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2165 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoUse an Exporter-approved version number (only one decimal place)
dbs [Mon, 31 Jan 2011 05:49:52 +0000 (05:49 +0000)]
Use an Exporter-approved version number (only one decimal place)

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2163 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoCorrect copy/paste error in Build.PL metadata
dbs [Mon, 31 Jan 2011 04:50:38 +0000 (04:50 +0000)]
Correct copy/paste error in Build.PL metadata

OpenSRF uses GPL v2 or later, not the Perl license.

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2160 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoOpenSRF::UnixServer doesn't live here any more
dbs [Fri, 28 Jan 2011 16:18:28 +0000 (16:18 +0000)]
OpenSRF::UnixServer doesn't live here any more

This test was still succeeding on hosts that had installed
previous versions of OpenSRF, but failed on a shiny new
test instance.

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2156 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoSet the correct number of expected tests so that we don't fail 100% of the time
dbs [Wed, 26 Jan 2011 03:34:46 +0000 (03:34 +0000)]
Set the correct number of expected tests so that we don't fail 100% of the time

I guess we haven't run "make test" here since r2024 - heh.

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2150 9efc2488-bf62-4759-914b-345cdb29e865

13 years agomake the api CALL log line consistent across Perl and C and make it something that...
erickson [Fri, 21 Jan 2011 15:13:55 +0000 (15:13 +0000)]
make the api CALL log line consistent across Perl and C and make it something that can be pasted directly into srfsh

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2147 9efc2488-bf62-4759-914b-345cdb29e865

13 years agorepaired call to handle_request for router query; cannot survive without the self.
erickson [Fri, 21 Jan 2011 15:13:50 +0000 (15:13 +0000)]
repaired call to handle_request for router query; cannot survive without the self.

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2146 9efc2488-bf62-4759-914b-345cdb29e865

13 years agorepaired bug in total request time calc, particularly when a request returns no response
erickson [Mon, 20 Dec 2010 02:56:15 +0000 (02:56 +0000)]
repaired bug in total request time calc, particularly when a request returns no response

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2139 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoStraighten out -f / -d flag confusion in libmemcached prerequisite
dbs [Mon, 20 Dec 2010 02:54:50 +0000 (02:54 +0000)]
Straighten out -f / -d flag confusion in libmemcached prerequisite

There are two different styles of checking for previously downloaded
tarballs in this Makefile; the libmemcached entry combined them both
with unfortunate results.

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2137 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoPython srfsh enhancements
erickson [Mon, 20 Dec 2010 01:22:19 +0000 (01:22 +0000)]
Python srfsh enhancements

* Srfsh plugins can now insert new commands and add words to the tab
completion word bank.
* Addded support reading script files
* Added support for service open/close (connect/disconnect) for stateful
connections
* Moved to class-based srfsh module for easier state maintenance
* More doc strings

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2134 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoon second thought, removing debug sleep method, which is (more than most) a DOS waiti...
erickson [Mon, 13 Dec 2010 14:58:04 +0000 (14:58 +0000)]
on second thought, removing debug sleep method, which is (more than most) a DOS waiting to happen.

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2127 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoimproved select/read/write fault tolerance; cleaner and more efficient child process...
erickson [Mon, 13 Dec 2010 14:54:08 +0000 (14:54 +0000)]
improved select/read/write fault tolerance; cleaner and more efficient child process idle/active list management; improved logging

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2125 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoApply patch for dnsmasq documentation
dbs [Wed, 1 Dec 2010 03:11:53 +0000 (03:11 +0000)]
Apply patch for dnsmasq documentation

Thanks to Michael Giarlo <leftwing@alumni.rutgers.edu> for
providing this correction to the dnsmasq configuration line!

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2122 9efc2488-bf62-4759-914b-345cdb29e865

13 years agofail gracefully when opensrf.settings is not up and running
erickson [Tue, 30 Nov 2010 14:27:50 +0000 (14:27 +0000)]
fail gracefully when opensrf.settings is not up and running

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2120 9efc2488-bf62-4759-914b-345cdb29e865

13 years agodon't clean up child attributes until we're done with them; added pid map hash for...
erickson [Mon, 29 Nov 2010 20:16:21 +0000 (20:16 +0000)]
don't clean up child attributes until we're done with them;  added pid map hash for easy/quick access to child via pid

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2117 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoadd fault tolerance (e.g. recover from interrupted select/sysread); always perform...
erickson [Mon, 29 Nov 2010 19:19:02 +0000 (19:19 +0000)]
add fault tolerance (e.g. recover from interrupted select/sysread); always perform idle maintenance when there are any active child processes; exit check status early when no active processes exist

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2114 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoavoid calling sysread when select exited from interruption.
erickson [Mon, 29 Nov 2010 19:18:41 +0000 (19:18 +0000)]
avoid calling sysread when select exited from interruption.

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2113 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoadded opensrf.system.sleep method; takes 1 param (seconds); useful for debugging...
erickson [Mon, 29 Nov 2010 19:18:33 +0000 (19:18 +0000)]
added opensrf.system.sleep method; takes 1 param (seconds); useful for debugging child process management

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2112 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoLenny needs zlib1g-dev package to install XML::LibXML and others
dbs [Mon, 29 Nov 2010 04:11:30 +0000 (04:11 +0000)]
Lenny needs zlib1g-dev package to install XML::LibXML and others

Per https://rt.cpan.org/Public/Bug/Display.html?id=51439; also,
libmemcached failed to configure and build without this.

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2108 9efc2488-bf62-4759-914b-345cdb29e865

13 years agono longer need FreezeThaw
gmc [Wed, 24 Nov 2010 17:16:53 +0000 (17:16 +0000)]
no longer need FreezeThaw

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2105 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoin the rare case the select() is interrupted while waiting on child statuses, exit...
erickson [Mon, 22 Nov 2010 22:22:01 +0000 (22:22 +0000)]
in the rare case the select() is interrupted while waiting on child statuses, exit early to prevent read()'s on invalid file handles and allow the calling code to loop back around and try again

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2102 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoadded support for introspect operation
erickson [Sat, 20 Nov 2010 15:50:44 +0000 (15:50 +0000)]
added support for introspect operation

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2100 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoinstall srfsh.py when --enable-python is set
erickson [Sat, 20 Nov 2010 15:29:13 +0000 (15:29 +0000)]
install srfsh.py when --enable-python is set

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2098 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoadded support for paging through 'less' (like C); added 'router' query docs; added...
erickson [Sat, 20 Nov 2010 15:29:02 +0000 (15:29 +0000)]
added support for paging through 'less' (like C); added 'router' query docs;  added separate env vars for pretty printing json and for print network object keys;   explicit opensrf disconnect on exit

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2097 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoadded network disconnect func
erickson [Sat, 20 Nov 2010 15:28:57 +0000 (15:28 +0000)]
added network disconnect func

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2096 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoadded 'router' command for router class info queries; improved redline tab completion...
erickson [Fri, 19 Nov 2010 02:42:34 +0000 (02:42 +0000)]
added 'router' command for router class info queries; improved redline tab completion; more changes for consistency with C version; general cleanup

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2092 9efc2488-bf62-4759-914b-345cdb29e865

13 years agorepaired logic in the as-yet-unused import_array_data; use the more efficient enumera...
erickson [Tue, 16 Nov 2010 14:09:09 +0000 (14:09 +0000)]
repaired logic in the as-yet-unused import_array_data; use the more efficient enumerate func; capture array length outside of loop for efficiency; avoid calls to set/get_field and access _data directly inside of the NetworkObject class for faster accessor/mutator's

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2090 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoremoved debug print statement
erickson [Tue, 16 Nov 2010 14:09:02 +0000 (14:09 +0000)]
removed debug print statement

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2089 9efc2488-bf62-4759-914b-345cdb29e865

13 years agorely on logic, not failure through try/catch, to determine of an object is a register...
erickson [Tue, 16 Nov 2010 03:38:06 +0000 (03:38 +0000)]
rely on logic, not failure through try/catch, to determine of an object is a registered network object;  if an object is unregistered, do not treat it as an __unknown network object (which obfuscates and provides no value).

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2086 9efc2488-bf62-4759-914b-345cdb29e865

13 years agokilled the terminal colors in srfsh.py output. They are cute and all, but are likely...
erickson [Tue, 16 Nov 2010 03:37:49 +0000 (03:37 +0000)]
killed the terminal colors in srfsh.py output.  They are cute and all, but are likely the cause of readline oddities/artifacts (and kind of distracting).  Default to raw (json) output for consistency

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2085 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoBump version number for 2.0 branch
dbs [Mon, 15 Nov 2010 21:10:06 +0000 (21:10 +0000)]
Bump version number for 2.0 branch

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2082 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoCreate rel_2_0 branch for next major OpenSRF release
dbs [Mon, 15 Nov 2010 20:49:18 +0000 (20:49 +0000)]
Create rel_2_0 branch for next major OpenSRF release

git-svn-id: svn://svn.open-ils.org/OpenSRF/branches/rel_2_0@2078 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoLimit list of Python services to those within the domain-specific activeapps section
dbs [Sun, 14 Nov 2010 04:15:24 +0000 (04:15 +0000)]
Limit list of Python services to those within the domain-specific activeapps section

Fix up help with correct default PID directory and document list_all action

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2077 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoIf an alternate config file is pointed to in osrf_ctl.sh, respect it
dbs [Thu, 11 Nov 2010 14:47:12 +0000 (14:47 +0000)]
If an alternate config file is pointed to in osrf_ctl.sh, respect it

In a previous edit, I accidentally removed the config file option
from the start_python command, which would break if anything other
than the configured default config file was specified as an option to
osrf_ctl.sh. This makes opensrf.py once again respect the authority
of osrf_ctl.sh.

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2076 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoUse the same PID directory as the opensrf-perl.pl and opensrf.py scripts
dbs [Thu, 11 Nov 2010 14:25:02 +0000 (14:25 +0000)]
Use the same PID directory as the opensrf-perl.pl and opensrf.py scripts

The default PID directories for the opensrf-perl.pl and opensrf.py scripts
was /openils/var/run/opensrf (assuming a prefix of '/openils'), while the
default PID directory for osrf_ctl.sh was /openils/var/run. This complicated
matters when trying to restart individual Python or Perl services, as without
passing an explicit PID directory argument the restart command from the
language-specific script would check for a PID in a different PID directory,
find none, and end up running a second copy of the service instead of
restarting the existing service.

The change groups all PIDs in the 'run/opensrf' subdirectory to avoid any
PID file conflicts (as unlikely as that might be) if OpenSRF is installed
in the default location - so rather than /var/local/run/*.pid, one will
be able to look at /var/local/run/opensrf/*.pid

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2075 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoAdd the sanity-saving step of a munged PERL5LIB to the README
dbs [Wed, 10 Nov 2010 19:14:19 +0000 (19:14 +0000)]
Add the sanity-saving step of a munged PERL5LIB to the README

Thanks for the nudge from Thomas Berezanksy!

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2074 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoCommit some unit tests for Python osrf.json module
dbs [Wed, 10 Nov 2010 03:33:15 +0000 (03:33 +0000)]
Commit some unit tests for Python osrf.json module

Recommendation: add *_test.py scripts that mirror each
osrf.* module in src/python/tests. Boo-yah.

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2073 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoosrf.json clean up
dbs [Tue, 9 Nov 2010 22:54:39 +0000 (22:54 +0000)]
osrf.json clean up

  * Use the right variable name in to_json_raw()
  * PEP8 compliance for variable naming
  * Add docstrings
  * Simpler __tabs() implementation

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2072 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoA solution for starting all Python services: make sh do the work
dbs [Tue, 9 Nov 2010 21:39:44 +0000 (21:39 +0000)]
A solution for starting all Python services: make sh do the work

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2071 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoEnhanced do_start() implementation in Python management script
dbs [Tue, 9 Nov 2010 18:17:50 +0000 (18:17 +0000)]
Enhanced do_start() implementation in Python management script

Unclean shutdowns and fork() misery can create PID files that have
no actual process behind them. Instead of just trusting the PID file, check
for the running PID; if the process is not running, then remove the PID file
and actually start the service.

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2070 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoAssign, don't test equality (thanks berick)
dbs [Tue, 9 Nov 2010 17:54:13 +0000 (17:54 +0000)]
Assign, don't test equality (thanks berick)

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2069 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoMake start_all automatically daemonize services
dbs [Tue, 9 Nov 2010 17:28:29 +0000 (17:28 +0000)]
Make start_all automatically daemonize services

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2068 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoGive opensrf.py reasonable defaults for options
dbs [Tue, 9 Nov 2010 16:21:15 +0000 (16:21 +0000)]
Give opensrf.py reasonable defaults for options

Rather than:
opensrf.py -l -d -f /openils/conf/opensrf_core.xml -p /openils/var/run/ -a start_all

you can now use:
opensrf.py -l -d -a start_all

Isn't that better? Note that we put the PIDs into PID_DIR/run/opensrf/
so that if/when OpenSRF is installed outside of the /openils/ prefix,
the names of the processes won't conflict with any other application PIDs.
Unlikely, but you never know.

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2067 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoTry not to stomp on global variable names and built-ins, add docstrings
dbs [Tue, 9 Nov 2010 15:58:21 +0000 (15:58 +0000)]
Try not to stomp on global variable names and built-ins, add docstrings

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2066 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoTypos: s/wait_for_child/try_wait_child/ and s/min_childen/min_children/
dbs [Tue, 9 Nov 2010 14:59:21 +0000 (14:59 +0000)]
Typos: s/wait_for_child/try_wait_child/ and s/min_childen/min_children/

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2065 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoTypo: Pass in the array of servers to the memcached client if we have one
dbs [Tue, 9 Nov 2010 14:56:01 +0000 (14:56 +0000)]
Typo: Pass in the array of servers to the memcached client if we have one

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2064 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoReference constants properly
dbs [Tue, 9 Nov 2010 14:46:03 +0000 (14:46 +0000)]
Reference constants properly

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2063 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoMake pylint happier with PEP8-compliant argument name
dbs [Tue, 9 Nov 2010 14:32:13 +0000 (14:32 +0000)]
Make pylint happier with PEP8-compliant argument name

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2062 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoFix daemonize problem that surfaced in start_all
dbs [Tue, 9 Nov 2010 14:22:25 +0000 (14:22 +0000)]
Fix daemonize problem that surfaced in start_all

Thanks to Michael Giarlo for reporting the problem, Bill Erickson
for pointing the way to the solution, and http://bugs.python.org/issue5313
for providing me with more context for the problem & solution.

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2061 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoMore debuggery for the spawning of child processes
dbs [Tue, 9 Nov 2010 13:59:55 +0000 (13:59 +0000)]
More debuggery for the spawning of child processes

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2060 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoMinutes and months were reversed in Python logging timestamps
dbs [Tue, 9 Nov 2010 13:50:43 +0000 (13:50 +0000)]
Minutes and months were reversed in Python logging timestamps

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2059 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoAdd a Python and curl example of invoking the Perl simpletext services
dbs [Tue, 9 Nov 2010 01:59:03 +0000 (01:59 +0000)]
Add a Python and curl example of invoking the Perl simpletext services

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2058 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoAdd a streaming version of the split() method in simpletext example
dbs [Tue, 9 Nov 2010 01:57:38 +0000 (01:57 +0000)]
Add a streaming version of the split() method in simpletext example

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2057 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoMake opensrf-perl.pl handle missing configuration for services more gracefully
dbs [Mon, 8 Nov 2010 21:03:55 +0000 (21:03 +0000)]
Make opensrf-perl.pl handle missing configuration for services more gracefully

As we might want to ship configuration files with commented out sections,
this will alert the user that a service was listed in the hosts section
but the configuration for that service could not be found.

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2056 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoPatch from Michael Giarlo to integrate python service control into osrf_ctl.sh.
erickson [Fri, 5 Nov 2010 20:57:43 +0000 (20:57 +0000)]
Patch from Michael Giarlo to integrate python service control into osrf_ctl.sh.

I made the following additional changes:

1. copy opensrf.py into the BIN dir during install when --enable-python is used.

2. osrf_ctl.sh will not attempt to control python services when python is not enabled for opensrf.

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2055 9efc2488-bf62-4759-914b-345cdb29e865

13 years agopatch from Michael Giarlo for better sanity checking during settings file reading...
erickson [Fri, 5 Nov 2010 15:15:53 +0000 (15:15 +0000)]
patch from Michael Giarlo for better sanity checking during settings file reading in python (avoid #comment's)

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2054 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoadded osrf.apps to installed pachages (thanks for the tip, dbs). bumped version...
erickson [Fri, 5 Nov 2010 14:48:14 +0000 (14:48 +0000)]
added osrf.apps to installed pachages (thanks for the tip, dbs).  bumped version in prep for 2.0

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2053 9efc2488-bf62-4759-914b-345cdb29e865

13 years agosocket_bundle typo patch from Jason Stephenson
erickson [Fri, 5 Nov 2010 12:59:00 +0000 (12:59 +0000)]
socket_bundle typo patch from Jason Stephenson

Further discussion and DCO:

http://libmail.georgialibraries.org/pipermail/open-ils-dev/2010-November/006476.html

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2051 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoconsistent w/ the C libs, only log server message processing duration at INFO. log...
erickson [Tue, 26 Oct 2010 14:12:15 +0000 (14:12 +0000)]
consistent w/ the C libs, only log server message processing duration at INFO.  log server response processing duration at debug and w/ slighly different wording.  let the processing duration log message act as the indication of a successfully handled message to reduce logging

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2049 9efc2488-bf62-4759-914b-345cdb29e865

13 years agolog message processing duration at INFO level, instead of DEBUG, consistent with...
erickson [Mon, 25 Oct 2010 16:28:23 +0000 (16:28 +0000)]
log message processing duration at INFO level, instead of DEBUG, consistent with the C libs

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2047 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoPlug a minor memory leak that could occur when we opened a TCP connection
scottmk [Thu, 14 Oct 2010 16:30:17 +0000 (16:30 +0000)]
Plug a minor memory leak that could occur when we opened a TCP connection
to a server.  In practice this meant whenever we opened a Jabber session.

We call getaddrinfo() to get a dynamically allocated linked list of
addresses for a given server name.  Then we traverse the list, looking
for one that accepts streaming connections over IPV4, in order to get
an IP address.

At the end, we call freeaddrinfo() to free the linked list.

Previously we would pass to freeaddrinfo() a pointer, not to the
head of the list, but to the node that we used for getting an IP
address.  Prior nodes, if any, would leak.

Also: added calls to freeaddrinfo() in the case of early returns, to
avoid leaking the list in the event of an error.

M    src/libopensrf/socket_bundle.c

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2036 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoimplemented an optional per-service stderr log for capturing miscellaneous stderr...
erickson [Tue, 12 Oct 2010 14:53:41 +0000 (14:53 +0000)]
implemented an optional per-service stderr log for capturing miscellaneous stderr output from services, similar to the old-style _unix.log files, since there are often useful warnings and error messages that never bubble up to syslog.  for clarity, the files now use _stderr as a suffix instead of _unix.  stderr logs are enabled by default.  included opensrf.xml example of how to disable it for a given service

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2035 9efc2488-bf62-4759-914b-345cdb29e865

13 years agowhen we add xhr responses onto the end of the queue, stash the original session as...
erickson [Tue, 12 Oct 2010 02:58:16 +0000 (02:58 +0000)]
when we add xhr responses onto the end of the queue, stash the original session as well, otherwise we're attempting to ask a session questions about requests it's not tracking

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2031 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoin json encoder, replace 2 sub calls w/ 1 hash lookup in heavily called code path...
erickson [Thu, 7 Oct 2010 12:57:56 +0000 (12:57 +0000)]
in json encoder, replace 2 sub calls w/ 1 hash lookup in heavily called code path.  we lose some abstraction, but it's probably worth it here

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2030 9efc2488-bf62-4759-914b-345cdb29e865

13 years agoWork around a Net::Domain bug that can result in fqdn's like foo.example.com,bar.com
dbs [Tue, 28 Sep 2010 17:35:26 +0000 (17:35 +0000)]
Work around a Net::Domain bug that can result in fqdn's like foo.example.com,bar.com

The bug manifested when trying to run autogen.sh, with the output:
Updating fieldmapper
No Response from settings server...going to sleep

This was because SettingsParser was generating invalid XPath and consquently
errors in the opensrf.settings service; with no response, the attempt to run
autogen.sh would die.

This workaround splits the fqdn on commas and tries each possible domain in
the server setting XPath. Long term we either need to wait for Net::Domain
bug #60729 (https://rt.cpan.org/Public/Bug/Display.html?id=60729) to be
resolved, or consider alternatives.

git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@2029 9efc2488-bf62-4759-914b-345cdb29e865