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