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
# returns the full config hash for a given server
sub get_server_config {
my( $self, $server ) = @_;
- my $xpath = "/opensrf/default|/opensrf/hosts/$server";
+
+ # Work around a Net::Domain bug that can result in fqdn like foo.example.com,bar.com
+ my @servers = split /,/, $server;
+ my $xpath = "/opensrf/default";
+ foreach (@servers) {
+ $xpath .= "|/opensrf/hosts/$_";
+ }
return $self->_get( $xpath );
}