From 5b8070aee9f53c14333447d1444f5b83921cac28 Mon Sep 17 00:00:00 2001 From: "E. Scott Daniels" Date: Wed, 25 Sep 2019 13:02:30 -0400 Subject: [PATCH] Point external nng reference for reconnect fix Begin using NNG commit e618abf8f3db2a94269a79c8901a51148d48fcc2 in order to pick up the fix for NNG bug: #970 TCP connections through docker-proxy do not reconnect Change-Id: I367ea489ff86519c17a357ff9415a873e14e1f1e Changes to incorporate new NNG conn shut error NNG added a connection shut error when the reconnection through proxy bug was fixed. This change catches the new state and sets the status in the message accordingly. Small tweak to application tests to prvent timing issues when running in jenkins verification environment. Signed-off-by: E. Scott Daniels Change-Id: Idaf98feb6c7b5724f1cceab8ba051bb5fccd7a7e --- BUILD | 11 +++++++++++ CHANGES | 9 ++++++++- CMakeLists.txt | 2 +- ext/nng | 2 +- src/rmr/nng/src/sr_nng_static.c | 5 +++++ test/app_test/run_lcall_test.ksh | 1 + test/app_test/run_rr_test.ksh | 1 + 7 files changed, 28 insertions(+), 3 deletions(-) diff --git a/BUILD b/BUILD index bf4121a..24e604f 100644 --- a/BUILD +++ b/BUILD @@ -55,6 +55,7 @@ the configuration: -DPACK_EXTERNALS=1 Include external libraries used to build in the run-time package -DPRESERVE_PTYPE=1 Do not change the processor type when naming deb packages -DSKIP_EXTERNALS=1 Do not use Nano/NNG submodules when building; use installed packages + (See caution in the 'Libraries' section below) Packages @@ -142,6 +143,16 @@ might require separate libraries, and thus the library name is given a suffix of _nng to reflect the transport mechanism in use. +NNG version with a commit ID of 906d5ea1b3d67bece941d8a4e0a049e5f6c65051 +is required to build RMR. That version (as yet untagged) adds a +new error state which we must trap. While application environments +are encouraged to also build and install at least this version of +NNG, RMR is still compatable back to the version tagged as 1.1.1. +If you opt to build with the -DSKIP_EXTERNALS=1 flag set, you must +ensure that this version of NNG is present in your build environment. +If you do not set this flag, the proper NNG source will be used +automatically. + Regardless of transport mechanism supported by an RMR library, the RMR API will be identical, thus it is possible for an application to shift mechanisms simply by referencing a different library (should diff --git a/CHANGES b/CHANGES index dce91d3..1df866c 100644 --- a/CHANGES +++ b/CHANGES @@ -1,7 +1,14 @@ - +pic2 API and build change and fixe summaries. Doc correctsions and/or changes are not mentioned here; see the commit messages. +2019 September 25; version 1.8.3 + Correct application level test issue causing timing problems during + jenkins verification testing at command and merge + + Handle the NNG connection shutdown status which may now be + generated when a connection throug a proxy is reset. + 2019 September 25; version 1.8.2 Correct bug in rmr_torcv_msg() when timeout set to zero (0). diff --git a/CMakeLists.txt b/CMakeLists.txt index e98bdc7..6ab910c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,7 +36,7 @@ cmake_minimum_required( VERSION 3.5 ) set( major_version "1" ) # should be automatically populated from git tag later, but until CI process sets a tag we use this set( minor_version "8" ) -set( patch_level "2" ) +set( patch_level "3" ) set( install_root "${CMAKE_INSTALL_PREFIX}" ) set( install_inc "include/rmr" ) diff --git a/ext/nng b/ext/nng index 8a9fd80..e618abf 160000 --- a/ext/nng +++ b/ext/nng @@ -1 +1 @@ -Subproject commit 8a9fd805d96201c780610b765f9e6dd9f2eda642 +Subproject commit e618abf8f3db2a94269a79c8901a51148d48fcc2 diff --git a/src/rmr/nng/src/sr_nng_static.c b/src/rmr/nng/src/sr_nng_static.c index dfe3d04..5ca4403 100644 --- a/src/rmr/nng/src/sr_nng_static.c +++ b/src/rmr/nng/src/sr_nng_static.c @@ -42,6 +42,10 @@ into the message, and sets errno to something that might be useful. If we don't have a specific RMr state, then we return the default (e.g. receive failed). + + The addition of the connection shut error code to the switch requires + that the NNG version at commit e618abf8f3db2a94269a (or after) be + used for compiling RMR. */ static inline int xlate_nng_state( int state, int def_state ) { @@ -81,6 +85,7 @@ static inline int xlate_nng_state( int state, int def_state ) { state = def_state; break; + case NNG_ECONNSHUT: // new error with nng commit e618abf8f3db2a94269a79c8901a51148d48fcc2 (Sept 2019) case NNG_ECLOSED: errno = EBADFD; // file des not in a good state for the operation state = def_state; diff --git a/test/app_test/run_lcall_test.ksh b/test/app_test/run_lcall_test.ksh index c159042..a1cafb0 100644 --- a/test/app_test/run_lcall_test.ksh +++ b/test/app_test/run_lcall_test.ksh @@ -102,6 +102,7 @@ then sed "s!%%hostname%%!$hn!" rt.mask >local.rt fi +export RMR_ASYNC_CONN=0 # ensure we don't lose first msg as drops waiting for conn look like errors cthreads=3 # number of caller threads nmsg=100 # total number of messages to be exchanged (-n value changes) delay=500 # microsec sleep between msg 1,000,000 == 1s diff --git a/test/app_test/run_rr_test.ksh b/test/app_test/run_rr_test.ksh index d602945..c1714a9 100644 --- a/test/app_test/run_rr_test.ksh +++ b/test/app_test/run_rr_test.ksh @@ -96,6 +96,7 @@ then sed "s!%%hostname%%!$hn!" rt.mask >local.rt fi +export RMR_ASYNC_CONN=0 # ensure we don't lose first msg as drops waiting for conn look like errors nmsg=10 # total number of messages to be exchanged (-n value changes) delay=1000 # microsec sleep between msg 1,000,000 == 1s (shorter than others b/c/ we are sending to multiple) wait=1 -- 2.16.6