1 Change log from 2.0.0-beta1 to 2.0.0-rc1
2 ========================================
6 * examples/opensrf.xml.example: Remove max_requests config stanza from C language
7 implementations in example config
9 Only Perl implementations support the max_requests stanza, so let's not confuse
10 matters with an unused element.
12 * examples/opensrf-rsyslog.conf: added sample rsyslog opensrf configuration file
14 * src/python/osrf/app.py: Trivial typo fix (also tests OpenSRF buildbot)
16 * README: Remove extraneous line for dnsmasq / Python
18 * src/libopensrf/osrf_prefork.c: Get that brace back in the right place
20 Unbreak the build. Argh.
22 * src/libopensrf/osrf_prefork.c, src/perl/lib/OpenSRF/Server.pm: Add hints to
23 increase max_children config variable if we're hitting the maximum
25 Already added this hint to the Python implementation, now propagating to
28 * src/python/osrf/server.py: Clean up Python server implementation, guided by
31 Add some docstrings, keep line lengths at 80 or less (MORE
32 WHITESPACE!), remove some dead code, and add a hint to check
33 max_children config value if we're bumping up against the
36 * src/perl/lib/OpenSRF/Application.pm: on second thought, removing debug sleep
37 method, which is (more than most) a DOS waiting to happen.
39 * src/c-apps/Makefile.am: Apply libtools versioning to OpenSRF c-apps as well
41 We apply a -version-info argument of 2:0:2, meaning:
42 * interface = 2: interface '2' of this library
43 * revision = 0: first implementation of interface '2'
44 * age = 2: this library can be linked with executables going back
45 two interface versions
47 See http://sourceware.org/autobook/autobook/autobook_91.html for more
48 information on the -version-info argument.
50 * src/libopensrf/Makefile.am: Prepare for version 2.0.0 with versioning for 2.0.0
52 Use the libtool -version-info option to provide an explicit version
53 for the libopensrf.so library. Introducing versioned libraries will
54 give us the ability to force recompiles of linked applications when
55 binary compatibility has been broken.
57 * src/perl/lib/OpenSRF/Application.pm: added opensrf.system.sleep method; takes 1
58 param (seconds); useful for debugging child process management
60 * src/perl/lib/OpenSRF/Server.pm: Resolve encoding problem found by attempting to
61 register patrons with Unicode names
65 1. a gateway.log entry showing http_translator receiving an XMPP error message
66 2. a corresponding osrfsys.log entry "server: died with error Wide character in
67 syswrite at /usr/local/share/perl5/OpenSRF/Server.pm line 239"
69 Per normal Perl Unicode handling practices, decoding input and encoding output
70 using the Encode module and decode_utf8() / encode_utf8() appears to resolve
75 * Makefile.am: Whitespace consistency (tabs for Makefiles I guess)
77 * src/perl/lib/OpenSRF.pm: Use an Exporter-approved version number (only one
80 * src/perl/Build.PL: Correct copy/paste error in Build.PL metadata
82 OpenSRF uses GPL v2 or later, not the Perl license.
86 * src/perl/t/08-Server.t, src/perl/t/08-UnixServer.t: OpenSRF::UnixServer doesn't
89 This test was still succeeding on hosts that had installed
90 previous versions of OpenSRF, but failed on a shiny new
95 * src/perl/t/07-Transport.t: Set the correct number of expected tests so that we
96 don't fail 100% of the time
98 I guess we haven't run "make test" here since r2024 - heh.
102 * src/libopensrf/osrf_application.c, src/perl/lib/OpenSRF/Application.pm: make the
103 api CALL log line consistent across Perl and C and make it something that can be
104 pasted directly into srfsh
106 * src/python/srfsh.py: repaired call to handle_request for router query; cannot
107 survive without the self.
111 * src/python/srfsh.py: repaired bug in total request time calc, particularly when
112 a request returns no response
116 * src/extras/Makefile.install: Straighten out -f / -d flag confusion in
117 libmemcached prerequisite
119 There are two different styles of checking for previously downloaded
120 tarballs in this Makefile; the libmemcached entry combined them both
121 with unfortunate results.
125 * src/python/srfsh.py: Python srfsh enhancements
127 * Srfsh plugins can now insert new commands and add words to the tab
128 completion word bank.
129 * Addded support reading script files
130 * Added support for service open/close (connect/disconnect) for stateful
132 * Moved to class-based srfsh module for easier state maintenance
137 * src/perl/lib/OpenSRF/Application.pm: on second thought, removing debug sleep
138 method, which is (more than most) a DOS waiting to happen.
140 * src/python/osrf/server.py: improved select/read/write fault tolerance; cleaner
141 and more efficient child process idle/active list management; improved logging
145 * README: Apply patch for dnsmasq documentation
147 Thanks to Michael Giarlo <leftwing@alumni.rutgers.edu> for
148 providing this correction to the dnsmasq configuration line!
152 * src/python/opensrf.py.in: fail gracefully when opensrf.settings is not up and
157 * src/perl/lib/OpenSRF/Server.pm: don't clean up child attributes until we're done
158 with them; added pid map hash for easy/quick access to child via pid
160 * src/perl/lib/OpenSRF/Server.pm: add fault tolerance (e.g. recover from
161 interrupted select/sysread); always perform idle maintenance when there are any
162 active child processes; exit check status early when no active processes exist
164 * src/perl/lib/OpenSRF/Transport/SlimJabber/XMPPReader.pm: avoid calling sysread
165 when select exited from interruption.
167 * src/perl/lib/OpenSRF/Application.pm: added opensrf.system.sleep method; takes 1
168 param (seconds); useful for debugging child process management
172 * src/extras/Makefile.install: Lenny needs zlib1g-dev package to install
173 XML::LibXML and others
175 Per https://rt.cpan.org/Public/Bug/Display.html?id=51439; also,
176 libmemcached failed to configure and build without this.
180 * src/extras/Makefile.install, src/perl/Build.PL: no longer need FreezeThaw
182 Signed-off-by: Galen Charlton <gmc@esilibrary.com>
186 * src/libopensrf/osrf_prefork.c: in the rare case the select() is interrupted
187 while waiting on child statuses, exit early to prevent read()'s on invalid file
188 handles and allow the calling code to loop back around and try again
192 * src/python/srfsh.py: added support for introspect operation
194 * src/Makefile.am: install srfsh.py when --enable-python is set
196 * src/python/srfsh.py: added support for paging through 'less' (like C); added
197 'router' query docs; added separate env vars for pretty printing json and for
198 print network object keys; explicit opensrf disconnect on exit
200 * src/python/osrf/system.py: added network disconnect func
204 * src/python/srfsh.py: added 'router' command for router class info queries;
205 improved redline tab completion; more changes for consistency with C version;
210 * src/python/osrf/net_obj.py: repaired logic in the as-yet-unused
211 import_array_data; use the more efficient enumerate func; capture array length
212 outside of loop for efficiency; avoid calls to set/get_field and access _data
213 directly inside of the NetworkObject class for faster accessor/mutator's
215 * src/python/srfsh.py: removed debug print statement
217 * src/python/osrf/net_obj.py: rely on logic, not failure through try/catch, to
218 determine of an object is a registered network object; if an object is
219 unregistered, do not treat it as an __unknown network object (which obfuscates
220 and provides no value).
222 * src/python/srfsh.py: killed the terminal colors in srfsh.py output. They are
223 cute and all, but are likely the cause of readline oddities/artifacts (and kind
224 of distracting). Default to raw (json) output for consistency
226 Change log for 2.0.0-beta1
227 ==========================
231 * src/perl/lib/OpenSRF.pm: Bump version number for 2.0 branch
235 * .: Create rel_2_0 branch for next major OpenSRF release
239 * Limit list of Python services to those within the domain-specific activeapps
242 Fix up help with correct default PID directory and document list_all action
246 * If an alternate config file is pointed to in osrf_ctl.sh, respect it
248 In a previous edit, I accidentally removed the config file option
249 from the start_python command, which would break if anything other
250 than the configured default config file was specified as an option to
251 osrf_ctl.sh. This makes opensrf.py once again respect the authority
254 * Use the same PID directory as the opensrf-perl.pl and opensrf.py scripts
256 The default PID directories for the opensrf-perl.pl and opensrf.py scripts
257 was /openils/var/run/opensrf (assuming a prefix of '/openils'), while the
258 default PID directory for osrf_ctl.sh was /openils/var/run. This complicated
259 matters when trying to restart individual Python or Perl services, as without
260 passing an explicit PID directory argument the restart command from the
261 language-specific script would check for a PID in a different PID directory,
262 find none, and end up running a second copy of the service instead of
263 restarting the existing service.
265 The change groups all PIDs in the 'run/opensrf' subdirectory to avoid any
266 PID file conflicts (as unlikely as that might be) if OpenSRF is installed
267 in the default location - so rather than /var/local/run/*.pid, one will
268 be able to look at /var/local/run/opensrf/*.pid
272 * Add the sanity-saving step of a munged PERL5LIB to the README
274 Thanks for the nudge from Thomas Berezanksy!
276 * Commit some unit tests for Python osrf.json module
278 Recommendation: add *_test.py scripts that mirror each
279 osrf.* module in src/python/tests. Boo-yah.
285 * Use the right variable name in to_json_raw()
286 * PEP8 compliance for variable naming
288 * Simpler __tabs() implementation
290 * A solution for starting all Python services: make sh do the work
292 * Enhanced do_start() implementation in Python management script
294 Unclean shutdowns and fork() misery can create PID files that have
295 no actual process behind them. Instead of just trusting the PID file, check
296 for the running PID; if the process is not running, then remove the PID file
297 and actually start the service.
299 * Assign, don't test equality (thanks berick)
301 * Make start_all automatically daemonize services
303 * Give opensrf.py reasonable defaults for options
306 opensrf.py -l -d -f /openils/conf/opensrf_core.xml -p /openils/var/run/ -a
310 opensrf.py -l -d -a start_all
312 Isn't that better? Note that we put the PIDs into PID_DIR/run/opensrf/
313 so that if/when OpenSRF is installed outside of the /openils/ prefix,
314 the names of the processes won't conflict with any other application PIDs.
315 Unlikely, but you never know.
317 * Try not to stomp on global variable names and built-ins, add docstrings
319 * Typos: s/wait_for_child/try_wait_child/ and s/min_childen/min_children/
321 * Typo: Pass in the array of servers to the memcached client if we have one
323 * Reference constants properly
325 * Make pylint happier with PEP8-compliant argument name
327 * Fix daemonize problem that surfaced in start_all
329 Thanks to Michael Giarlo for reporting the problem, Bill Erickson
330 for pointing the way to the solution, and http://bugs.python.org/issue5313
331 for providing me with more context for the problem & solution.
333 * More debuggery for the spawning of child processes
335 * Minutes and months were reversed in Python logging timestamps
337 * Add a Python and curl example of invoking the Perl simpletext services
339 * Add a streaming version of the split() method in simpletext example
343 * Make opensrf-perl.pl handle missing configuration for services more gracefully
345 As we might want to ship configuration files with commented out sections,
346 this will alert the user that a service was listed in the hosts section
347 but the configuration for that service could not be found.
351 * Patch from Michael Giarlo to integrate python service control into osrf_ctl.sh.
353 I made the following additional changes:
355 1. copy opensrf.py into the BIN dir during install when --enable-python is used.
357 2. osrf_ctl.sh will not attempt to control python services when python is not
360 * patch from Michael Giarlo for better sanity checking during settings file
361 reading in python (avoid #comment's)
363 * added osrf.apps to installed pachages (thanks for the tip, dbs). bumped version
366 * socket_bundle typo patch from Jason Stephenson
368 Further discussion and DCO:
370 http://libmail.georgialibraries.org/pipermail/open-ils-dev/2010-November/006476.html
374 * consistent w/ the C libs, only log server message processing duration at INFO.
375 log server response processing duration at debug and w/ slighly different
376 wording. let the processing duration log message act as the indication of a
377 successfully handled message to reduce logging
381 * log message processing duration at INFO level, instead of DEBUG, consistent with
386 * Plug a minor memory leak that could occur when we opened a TCP connection
387 to a server. In practice this meant whenever we opened a Jabber session.
389 We call getaddrinfo() to get a dynamically allocated linked list of
390 addresses for a given server name. Then we traverse the list, looking
391 for one that accepts streaming connections over IPV4, in order to get
394 At the end, we call freeaddrinfo() to free the linked list.
396 Previously we would pass to freeaddrinfo() a pointer, not to the
397 head of the list, but to the node that we used for getting an IP
398 address. Prior nodes, if any, would leak.
400 Also: added calls to freeaddrinfo() in the case of early returns, to
401 avoid leaking the list in the event of an error.
403 M src/libopensrf/socket_bundle.c
407 * implemented an optional per-service stderr log for capturing miscellaneous
408 stderr output from services, similar to the old-style _unix.log files, since
409 there are often useful warnings and error messages that never bubble up to
410 syslog. for clarity, the files now use _stderr as a suffix instead of _unix.
411 stderr logs are enabled by default. included opensrf.xml example of how to
412 disable it for a given service
414 * when we add xhr responses onto the end of the queue, stash the original session
415 as well, otherwise we're attempting to ask a session questions about requests
420 * in json encoder, replace 2 sub calls w/ 1 hash lookup in heavily called code
421 path. we lose some abstraction, but it's probably worth it here
425 * Work around a Net::Domain bug that can result in fqdn's like
426 foo.example.com,bar.com
428 The bug manifested when trying to run autogen.sh, with the output:
430 No Response from settings server...going to sleep
432 This was because SettingsParser was generating invalid XPath and consquently
433 errors in the opensrf.settings service; with no response, the attempt to run
434 autogen.sh would die.
436 This workaround splits the fqdn on commas and tries each possible domain in
437 the server setting XPath. Long term we either need to wait for Net::Domain
438 bug #60729 (https://rt.cpan.org/Public/Bug/Display.html?id=60729) to be
439 resolved, or consider alternatives.
443 * return the trace-augmented message as written to the log
447 * removing vestigial references to Inbound.pm, which no longer exists in the
448 repository. this also removes get/set_listener, which were never taken advantage
449 of and are no longer of use since the listener is thoroughly hard-coded into the
454 * Bump trunk version number for OpenSRF up to 1.8.0; better than 1.4.0.
456 perlmodstyle says "A correct CPAN version number is a floating point
457 number with at least 2 digits after the decimal." so we're not in
458 compliance in any case. Oh well.
462 * Update the manifest for Perl modules to avoid build warnings
464 r2016 removed two Perl modules,
465 src/perl/lib/OpenSRF/Transport/SlimJabber/Inbound.pm
466 and src/perl/lib/OpenSRF/UnixServer.pm, and the build gets upset because the
467 manifest suggests they're missing. But no, we know where they are, and we
468 don't expect them to come back.
472 * added support for reading ContinueStatus opensrf messages in the JS opensrf lib
476 * updated mailing address of the FSF
478 * remove executable bit from module files that don't need it
480 Small nit to pick for Debianization.
484 * Replace Net::Server with local pre-forking server
486 Support max/min children and max/min spare children
488 http://libmail.georgialibraries.org/pipermail/open-ils-dev/2010-May/006068.html
492 * remove ntp and ntpdate dependencies
494 Not used by OpenSRF; these are legacies of
495 Evergreen dependencies at the time OpenSRF was
496 split off. Quite likely a bunch of deps in
497 Makefile.install aren't needed by OpenSRF