1 Changelog for 2.0.0 final release
2 =================================
6 * src/extras/Makefile.install: Add Check dependencies for Fedora
8 Required to run "make check" for the C unit tests
9 previously added by Kevin Beswick.
11 Signed-off-by: Dan Scott <dan@coffeecode.net>
13 * Makefile.am, configure.ac, src/extras/Makefile.install, tests: Add a C unit
14 testing framework and tests for OpenSRF
16 The unit testing framework is "Check" - http://check.sourceforge.net/
18 These tests can be executed by running 'make check' after you
19 configure and compile the OpenSRF code.
21 To run them, you must have the 'check' package installed.
23 Author: Kevin Beswick <kevinbeswick00@gmail.com>
24 Signed-off-by: Dan Scott <dan@coffeecode.net>
25 Signed-off-by: Kevin Beswick <kevinbeswick00@gmail.com>
27 * include/opensrf/transport_session.h, src/libopensrf/transport_session.c: move
28 jabber_state_machine_struct into header to keep 'make check' happy
32 * src/javascript/opensrf.js: Patch from Kevin Beswick to support set operations on
33 certain opensrf message fields. note, this does not currently affect behavior,
34 since values for messages are initially set from parsing JSON without using the
35 access/mutators for setting values.
39 * src/javascript/tests/testJSON_v1.js: Sidestep JSON object ordering in unit tests
41 Depending on the JS engine and version of Dojo, the order
42 of attributes in JSON objects may change (as is explicitly
43 allowed by the JSON spec). To avoid false test failures,
44 only use one attribute in the object.
48 * src/libopensrf/osrf_prefork.c: change proc managament debug message from Info to
53 * examples/opensrf-rsyslog.conf: additional settings in sample rsyslog config:
54 disable EscapeControlCharactersOnReceive
58 * bin/osrf_ctl.sh.in, src/python/opensrf.py.in: Handle the common NXDOMAIN problem
59 with Python a bit more gracefully
61 Rather than dumping a nasty full stacktrace to the command line, we
62 print a hopefully helpful pointer to the actual problem in plain
65 Also, rather than stopping everything if a "stop_all" command was
66 issued, skip the error status in osrf_ctl.sh for the Python bit
67 and carry on shutting down the other services. A bit more convenient
68 if you want to have Python enabled but don't necessarily need it
73 * src/javascript/tests/testJSON_v1.js: Make javascript unit tests more granular to
74 ease tracking down errors
76 Noticed a failure when running with Rhino 1.7RC2 that wasn't happening
77 with version of Rhino packaged in shrinksafe.jar, and it was a bit
78 tedious narrowing down which test was actually failing. Breaking up
79 the tests into smaller sets will make this process easier and might invite
80 the submission of other tests to target areas that are not yet covered.
82 * src/javascript/tests/testJSON_v1.js: A few more tests for JSON_v1.js
84 We're not really touching the interesting parts of encodeJS/decodeJS
85 yet, but at least we get to open the door a crack.
87 * src/javascript/tests: Add DOH-based unit test harness for OpenSRF JavaScript
89 The Dojo Objective Harness enables us to run unit tests from the command
90 line or within a browser. Running tests from a command line makes it easier
91 to fold into the continuous integration server. Included in this commit
92 is a small README for setting up command-line testing and a sample set
93 of unit tests that exercise parts of JSON_v1.js.
95 * src/python/osrf/app.py: Give Python services introspection methods matching C
98 Perl and C services offer "opensrf.system.method" and
99 "opensrf.system.method.all" methods for accessing service
100 information. Renaming Python's methods to match at least
101 enables srfsh to access this information, even if it does
102 still need to be taught to provide that information in a
107 * bin/osrf_ctl.sh.in: Improved PID file handling in osrf_ctl.sh
109 Joseph Lewis <joehms22@gmail.com> submitted a patch to address
110 https://bugs.launchpad.net/evergreen/+bug/741088 ("osrf_ctl.sh Doesn't check if
111 process is actually running")
113 As of this patch, when start_perl, start_c, or start_python are started and
114 existing PID files are found for those processes, instead of assuming that the
115 processes are actually running, osrf-ctl.sh now has the intelligence to check
116 the process list to see if there is a matching process. If no running process
117 is found, then the old PID file is removed and the start command is issued.
119 Two additional actions have been added, "smart_clear" and "clear_pid".
121 "smart_clear" checks the PID files against the running processes and removes
122 PID files where no running process is found. This is effectively invoked
123 under the covers when start_* is invoked and a PID file is found.
125 "clear_pid" deletes all PID files without checking to see if there are any
126 running processes. In most cases, it should only be invoked as part of an
127 automated boot sequence.
129 Developer's Certificate of Origin 1.1
131 By making a contribution to this project, I certify that:
133 (a) The contribution was created in whole or in part by me and I
134 have the right to submit it under the open source license
135 indicated in the file; or
137 (b) The contribution is based upon previous work that, to the best
138 of my knowledge, is covered under an appropriate open source
139 license and I have the right under that license to submit that
140 work with modifications, whether created in whole or in part
141 by me, under the same open source license (unless I am
142 permitted to submit under a different license), as indicated
145 (c) The contribution was provided directly to me by some other
146 person who certified (a), (b) or (c) and I have not modified
149 (d) I understand and agree that this project and the contribution
150 are public and that a record of the contribution (including all
151 personal information I submit with it, including my sign-off) is
152 maintained indefinitely and may be redistributed consistent with
153 this project or the open source license(s) involved.
155 Signed-off-by: Joseph Lewis <joehms22@gmail.com>
159 * src/javascript/DojoSRF.js, src/javascript/JSON_v0.js, src/javascript/JSON_v1.js,
160 src/javascript/opensrf.js, src/javascript/opensrf_xhr.js,
161 src/javascript/opensrf_xmpp.js: Run OpenSRF JavaScript through jslint for a
164 Mostly just semicolons, and shifting a bit of code around to reduce
165 usage of functions/classes before they've been defined. Staying away
166 from the === / !== operators for null/undefined/0/''/true/false for
171 * README: Forward-port AsciiDoc version of README from 2.0.0-rc2
173 Change log from 2.0.0-rc1 to 2.0.0-rc2
174 ========================================
178 * src/python/srfsh.py: bug fix with srfsh.py introspection; better
179 handling/reporting of service exceptions
181 * src/perl/lib/OpenSRF/Server.pm: consistent w/ sigpipe handling in osrf 1.6,
182 provide a warning and retry mechanism for syswrites that fail as a result of
185 Change log from 2.0.0-beta1 to 2.0.0-rc1
186 ========================================
190 * examples/opensrf.xml.example: Remove max_requests config stanza from C language
191 implementations in example config
193 Only Perl implementations support the max_requests stanza, so let's not confuse
194 matters with an unused element.
196 * examples/opensrf-rsyslog.conf: added sample rsyslog opensrf configuration file
198 * src/python/osrf/app.py: Trivial typo fix (also tests OpenSRF buildbot)
200 * README: Remove extraneous line for dnsmasq / Python
202 * src/libopensrf/osrf_prefork.c: Get that brace back in the right place
204 Unbreak the build. Argh.
206 * src/libopensrf/osrf_prefork.c, src/perl/lib/OpenSRF/Server.pm: Add hints to
207 increase max_children config variable if we're hitting the maximum
209 Already added this hint to the Python implementation, now propagating to
212 * src/python/osrf/server.py: Clean up Python server implementation, guided by
215 Add some docstrings, keep line lengths at 80 or less (MORE
216 WHITESPACE!), remove some dead code, and add a hint to check
217 max_children config value if we're bumping up against the
220 * src/perl/lib/OpenSRF/Application.pm: on second thought, removing debug sleep
221 method, which is (more than most) a DOS waiting to happen.
223 * src/c-apps/Makefile.am: Apply libtools versioning to OpenSRF c-apps as well
225 We apply a -version-info argument of 2:0:2, meaning:
226 * interface = 2: interface '2' of this library
227 * revision = 0: first implementation of interface '2'
228 * age = 2: this library can be linked with executables going back
229 two interface versions
231 See http://sourceware.org/autobook/autobook/autobook_91.html for more
232 information on the -version-info argument.
234 * src/libopensrf/Makefile.am: Prepare for version 2.0.0 with versioning for 2.0.0
236 Use the libtool -version-info option to provide an explicit version
237 for the libopensrf.so library. Introducing versioned libraries will
238 give us the ability to force recompiles of linked applications when
239 binary compatibility has been broken.
241 * src/perl/lib/OpenSRF/Application.pm: added opensrf.system.sleep method; takes 1
242 param (seconds); useful for debugging child process management
244 * src/perl/lib/OpenSRF/Server.pm: Resolve encoding problem found by attempting to
245 register patrons with Unicode names
249 1. a gateway.log entry showing http_translator receiving an XMPP error message
250 2. a corresponding osrfsys.log entry "server: died with error Wide character in
251 syswrite at /usr/local/share/perl5/OpenSRF/Server.pm line 239"
253 Per normal Perl Unicode handling practices, decoding input and encoding output
254 using the Encode module and decode_utf8() / encode_utf8() appears to resolve
259 * Makefile.am: Whitespace consistency (tabs for Makefiles I guess)
261 * src/perl/lib/OpenSRF.pm: Use an Exporter-approved version number (only one
264 * src/perl/Build.PL: Correct copy/paste error in Build.PL metadata
266 OpenSRF uses GPL v2 or later, not the Perl license.
270 * src/perl/t/08-Server.t, src/perl/t/08-UnixServer.t: OpenSRF::UnixServer doesn't
273 This test was still succeeding on hosts that had installed
274 previous versions of OpenSRF, but failed on a shiny new
279 * src/perl/t/07-Transport.t: Set the correct number of expected tests so that we
280 don't fail 100% of the time
282 I guess we haven't run "make test" here since r2024 - heh.
286 * src/libopensrf/osrf_application.c, src/perl/lib/OpenSRF/Application.pm: make the
287 api CALL log line consistent across Perl and C and make it something that can be
288 pasted directly into srfsh
290 * src/python/srfsh.py: repaired call to handle_request for router query; cannot
291 survive without the self.
295 * src/python/srfsh.py: repaired bug in total request time calc, particularly when
296 a request returns no response
300 * src/extras/Makefile.install: Straighten out -f / -d flag confusion in
301 libmemcached prerequisite
303 There are two different styles of checking for previously downloaded
304 tarballs in this Makefile; the libmemcached entry combined them both
305 with unfortunate results.
309 * src/python/srfsh.py: Python srfsh enhancements
311 * Srfsh plugins can now insert new commands and add words to the tab
312 completion word bank.
313 * Addded support reading script files
314 * Added support for service open/close (connect/disconnect) for stateful
316 * Moved to class-based srfsh module for easier state maintenance
321 * src/perl/lib/OpenSRF/Application.pm: on second thought, removing debug sleep
322 method, which is (more than most) a DOS waiting to happen.
324 * src/python/osrf/server.py: improved select/read/write fault tolerance; cleaner
325 and more efficient child process idle/active list management; improved logging
329 * README: Apply patch for dnsmasq documentation
331 Thanks to Michael Giarlo <leftwing@alumni.rutgers.edu> for
332 providing this correction to the dnsmasq configuration line!
336 * src/python/opensrf.py.in: fail gracefully when opensrf.settings is not up and
341 * src/perl/lib/OpenSRF/Server.pm: don't clean up child attributes until we're done
342 with them; added pid map hash for easy/quick access to child via pid
344 * src/perl/lib/OpenSRF/Server.pm: add fault tolerance (e.g. recover from
345 interrupted select/sysread); always perform idle maintenance when there are any
346 active child processes; exit check status early when no active processes exist
348 * src/perl/lib/OpenSRF/Transport/SlimJabber/XMPPReader.pm: avoid calling sysread
349 when select exited from interruption.
351 * src/perl/lib/OpenSRF/Application.pm: added opensrf.system.sleep method; takes 1
352 param (seconds); useful for debugging child process management
356 * src/extras/Makefile.install: Lenny needs zlib1g-dev package to install
357 XML::LibXML and others
359 Per https://rt.cpan.org/Public/Bug/Display.html?id=51439; also,
360 libmemcached failed to configure and build without this.
364 * src/extras/Makefile.install, src/perl/Build.PL: no longer need FreezeThaw
366 Signed-off-by: Galen Charlton <gmc@esilibrary.com>
370 * src/libopensrf/osrf_prefork.c: in the rare case the select() is interrupted
371 while waiting on child statuses, exit early to prevent read()'s on invalid file
372 handles and allow the calling code to loop back around and try again
376 * src/python/srfsh.py: added support for introspect operation
378 * src/Makefile.am: install srfsh.py when --enable-python is set
380 * src/python/srfsh.py: added support for paging through 'less' (like C); added
381 'router' query docs; added separate env vars for pretty printing json and for
382 print network object keys; explicit opensrf disconnect on exit
384 * src/python/osrf/system.py: added network disconnect func
388 * src/python/srfsh.py: added 'router' command for router class info queries;
389 improved redline tab completion; more changes for consistency with C version;
394 * src/python/osrf/net_obj.py: repaired logic in the as-yet-unused
395 import_array_data; use the more efficient enumerate func; capture array length
396 outside of loop for efficiency; avoid calls to set/get_field and access _data
397 directly inside of the NetworkObject class for faster accessor/mutator's
399 * src/python/srfsh.py: removed debug print statement
401 * src/python/osrf/net_obj.py: rely on logic, not failure through try/catch, to
402 determine of an object is a registered network object; if an object is
403 unregistered, do not treat it as an __unknown network object (which obfuscates
404 and provides no value).
406 * src/python/srfsh.py: killed the terminal colors in srfsh.py output. They are
407 cute and all, but are likely the cause of readline oddities/artifacts (and kind
408 of distracting). Default to raw (json) output for consistency
410 Change log for 2.0.0-beta1
411 ==========================
415 * src/perl/lib/OpenSRF.pm: Bump version number for 2.0 branch
419 * .: Create rel_2_0 branch for next major OpenSRF release
423 * Limit list of Python services to those within the domain-specific activeapps
426 Fix up help with correct default PID directory and document list_all action
430 * If an alternate config file is pointed to in osrf_ctl.sh, respect it
432 In a previous edit, I accidentally removed the config file option
433 from the start_python command, which would break if anything other
434 than the configured default config file was specified as an option to
435 osrf_ctl.sh. This makes opensrf.py once again respect the authority
438 * Use the same PID directory as the opensrf-perl.pl and opensrf.py scripts
440 The default PID directories for the opensrf-perl.pl and opensrf.py scripts
441 was /openils/var/run/opensrf (assuming a prefix of '/openils'), while the
442 default PID directory for osrf_ctl.sh was /openils/var/run. This complicated
443 matters when trying to restart individual Python or Perl services, as without
444 passing an explicit PID directory argument the restart command from the
445 language-specific script would check for a PID in a different PID directory,
446 find none, and end up running a second copy of the service instead of
447 restarting the existing service.
449 The change groups all PIDs in the 'run/opensrf' subdirectory to avoid any
450 PID file conflicts (as unlikely as that might be) if OpenSRF is installed
451 in the default location - so rather than /var/local/run/*.pid, one will
452 be able to look at /var/local/run/opensrf/*.pid
456 * Add the sanity-saving step of a munged PERL5LIB to the README
458 Thanks for the nudge from Thomas Berezanksy!
460 * Commit some unit tests for Python osrf.json module
462 Recommendation: add *_test.py scripts that mirror each
463 osrf.* module in src/python/tests. Boo-yah.
469 * Use the right variable name in to_json_raw()
470 * PEP8 compliance for variable naming
472 * Simpler __tabs() implementation
474 * A solution for starting all Python services: make sh do the work
476 * Enhanced do_start() implementation in Python management script
478 Unclean shutdowns and fork() misery can create PID files that have
479 no actual process behind them. Instead of just trusting the PID file, check
480 for the running PID; if the process is not running, then remove the PID file
481 and actually start the service.
483 * Assign, don't test equality (thanks berick)
485 * Make start_all automatically daemonize services
487 * Give opensrf.py reasonable defaults for options
490 opensrf.py -l -d -f /openils/conf/opensrf_core.xml -p /openils/var/run/ -a
494 opensrf.py -l -d -a start_all
496 Isn't that better? Note that we put the PIDs into PID_DIR/run/opensrf/
497 so that if/when OpenSRF is installed outside of the /openils/ prefix,
498 the names of the processes won't conflict with any other application PIDs.
499 Unlikely, but you never know.
501 * Try not to stomp on global variable names and built-ins, add docstrings
503 * Typos: s/wait_for_child/try_wait_child/ and s/min_childen/min_children/
505 * Typo: Pass in the array of servers to the memcached client if we have one
507 * Reference constants properly
509 * Make pylint happier with PEP8-compliant argument name
511 * Fix daemonize problem that surfaced in start_all
513 Thanks to Michael Giarlo for reporting the problem, Bill Erickson
514 for pointing the way to the solution, and http://bugs.python.org/issue5313
515 for providing me with more context for the problem & solution.
517 * More debuggery for the spawning of child processes
519 * Minutes and months were reversed in Python logging timestamps
521 * Add a Python and curl example of invoking the Perl simpletext services
523 * Add a streaming version of the split() method in simpletext example
527 * Make opensrf-perl.pl handle missing configuration for services more gracefully
529 As we might want to ship configuration files with commented out sections,
530 this will alert the user that a service was listed in the hosts section
531 but the configuration for that service could not be found.
535 * Patch from Michael Giarlo to integrate python service control into osrf_ctl.sh.
537 I made the following additional changes:
539 1. copy opensrf.py into the BIN dir during install when --enable-python is used.
541 2. osrf_ctl.sh will not attempt to control python services when python is not
544 * patch from Michael Giarlo for better sanity checking during settings file
545 reading in python (avoid #comment's)
547 * added osrf.apps to installed pachages (thanks for the tip, dbs). bumped version
550 * socket_bundle typo patch from Jason Stephenson
552 Further discussion and DCO:
554 http://libmail.georgialibraries.org/pipermail/open-ils-dev/2010-November/006476.html
558 * consistent w/ the C libs, only log server message processing duration at INFO.
559 log server response processing duration at debug and w/ slighly different
560 wording. let the processing duration log message act as the indication of a
561 successfully handled message to reduce logging
565 * log message processing duration at INFO level, instead of DEBUG, consistent with
570 * Plug a minor memory leak that could occur when we opened a TCP connection
571 to a server. In practice this meant whenever we opened a Jabber session.
573 We call getaddrinfo() to get a dynamically allocated linked list of
574 addresses for a given server name. Then we traverse the list, looking
575 for one that accepts streaming connections over IPV4, in order to get
578 At the end, we call freeaddrinfo() to free the linked list.
580 Previously we would pass to freeaddrinfo() a pointer, not to the
581 head of the list, but to the node that we used for getting an IP
582 address. Prior nodes, if any, would leak.
584 Also: added calls to freeaddrinfo() in the case of early returns, to
585 avoid leaking the list in the event of an error.
587 M src/libopensrf/socket_bundle.c
591 * implemented an optional per-service stderr log for capturing miscellaneous
592 stderr output from services, similar to the old-style _unix.log files, since
593 there are often useful warnings and error messages that never bubble up to
594 syslog. for clarity, the files now use _stderr as a suffix instead of _unix.
595 stderr logs are enabled by default. included opensrf.xml example of how to
596 disable it for a given service
598 * when we add xhr responses onto the end of the queue, stash the original session
599 as well, otherwise we're attempting to ask a session questions about requests
604 * in json encoder, replace 2 sub calls w/ 1 hash lookup in heavily called code
605 path. we lose some abstraction, but it's probably worth it here
609 * Work around a Net::Domain bug that can result in fqdn's like
610 foo.example.com,bar.com
612 The bug manifested when trying to run autogen.sh, with the output:
614 No Response from settings server...going to sleep
616 This was because SettingsParser was generating invalid XPath and consquently
617 errors in the opensrf.settings service; with no response, the attempt to run
618 autogen.sh would die.
620 This workaround splits the fqdn on commas and tries each possible domain in
621 the server setting XPath. Long term we either need to wait for Net::Domain
622 bug #60729 (https://rt.cpan.org/Public/Bug/Display.html?id=60729) to be
623 resolved, or consider alternatives.
627 * return the trace-augmented message as written to the log
631 * removing vestigial references to Inbound.pm, which no longer exists in the
632 repository. this also removes get/set_listener, which were never taken advantage
633 of and are no longer of use since the listener is thoroughly hard-coded into the
638 * Bump trunk version number for OpenSRF up to 1.8.0; better than 1.4.0.
640 perlmodstyle says "A correct CPAN version number is a floating point
641 number with at least 2 digits after the decimal." so we're not in
642 compliance in any case. Oh well.
646 * Update the manifest for Perl modules to avoid build warnings
648 r2016 removed two Perl modules,
649 src/perl/lib/OpenSRF/Transport/SlimJabber/Inbound.pm
650 and src/perl/lib/OpenSRF/UnixServer.pm, and the build gets upset because the
651 manifest suggests they're missing. But no, we know where they are, and we
652 don't expect them to come back.
656 * added support for reading ContinueStatus opensrf messages in the JS opensrf lib
660 * updated mailing address of the FSF
662 * remove executable bit from module files that don't need it
664 Small nit to pick for Debianization.
668 * Replace Net::Server with local pre-forking server
670 Support max/min children and max/min spare children
672 http://libmail.georgialibraries.org/pipermail/open-ils-dev/2010-May/006068.html
676 * remove ntp and ntpdate dependencies
678 Not used by OpenSRF; these are legacies of
679 Evergreen dependencies at the time OpenSRF was
680 split off. Quite likely a bunch of deps in
681 Makefile.install aren't needed by OpenSRF