[qpid-dispatch] branch master updated: DISPATCH-1926: Added code to selectively allow deletion of http:yes listeners based on available libwebsockets version. This closes #995.

2021-01-25 Thread gmurthy
This is an automated email from the ASF dual-hosted git repository.

gmurthy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git


The following commit(s) were added to refs/heads/master by this push:
 new 0c27fdb  DISPATCH-1926: Added code to selectively allow deletion of 
http:yes listeners based on available libwebsockets version. This closes #995.
0c27fdb is described below

commit 0c27fdb9f5016258422f2902f98b27985e31dec9
Author: Ganesh Murthy 
AuthorDate: Fri Jan 22 15:25:04 2021 -0500

DISPATCH-1926: Added code to selectively allow deletion of http:yes 
listeners based on available libwebsockets version. This closes #995.
---
 .gitignore |  1 +
 CMakeLists.txt | 11 +
 .../management/{agent.py => agent.py.in}   |  2 +
 tests/system_tests_http.py.in  | 57 ++
 4 files changed, 52 insertions(+), 19 deletions(-)

diff --git a/.gitignore b/.gitignore
index 4c68305..92550f3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -13,6 +13,7 @@ tests/system_tests_authz_service_plugin.py
 tests/system_tests_handle_failover.py
 tests/system_tests_topology_disposition.py
 tests/system_tests_http.py
+python/qpid_dispatch_internal/management/agent.py
 *.iml
 .idea
 .metadata
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1c949f9..0854b01 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -70,6 +70,8 @@ find_package(libnghttp2 1.4.0)
 find_package(LibWebSockets 2.4.2)
 CMAKE_DEPENDENT_OPTION(USE_LIBWEBSOCKETS "Use libwebsockets for WebSocket 
support" ON
  "LIBWEBSOCKETS_FOUND" OFF)
+
+set(SKIP_DELETE_HTTP_LISTENER "True")
 if (LIBWEBSOCKETS_FOUND AND LIBWEBSOCKETS_VERSION_STRING)
   # This is a fix for DISPATCH-1513. libwebsockets versions 3.2.0 introduces a 
new flag called LWS_SERVER_OPTION_ALLOW_HTTP_ON_HTTPS_LISTENER
   # The new flag allows (as the flag says) HTTP pver HTTPS listeners. Since 
this flag is not available before lws 3.2.0 we need
@@ -79,6 +81,14 @@ if (LIBWEBSOCKETS_FOUND AND LIBWEBSOCKETS_VERSION_STRING)
   if ((LIBWEBSOCKETS_VERSION_STRING STREQUAL LWS_VERSION_WITH_SSL_FIX) OR 
(LIBWEBSOCKETS_VERSION_STRING STRGREATER  LWS_VERSION_WITH_SSL_FIX))
 set(TEST_OPTION_ALLOW_HTTP_ON_HTTPS_LISTENER "")
   endif()
+  # The listener delete functionality worked in all versions of LibWebSockets
+  # starting from v2.4.2 thru v3.2.3. It stopped working in v4.0.0 and beyond
+  if ( (LIBWEBSOCKETS_VERSION_STRING STREQUAL "2.4.2") OR (  
(LIBWEBSOCKETS_VERSION_STRING STRGREATER_EQUAL  "3.0.0") AND 
(LIBWEBSOCKETS_VERSION_STRING STRLESS  "4.0.0") )  )
+# Do not skip the tests (in system_tests_http.py) that specifically
+# test deletion of http:yes listeners.
+set(SKIP_DELETE_HTTP_LISTENER "False")
+  endif()
+
 endif(LIBWEBSOCKETS_FOUND AND LIBWEBSOCKETS_VERSION_STRING)
 
 # Python
@@ -245,6 +255,7 @@ 
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/tests/system_tests_authz_service_plug
 
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/tests/system_tests_handle_failover.py.in
 ${CMAKE_CURRENT_SOURCE_DIR}/tests/system_tests_handle_failover.py)
 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/tests/system_tests_http.py.in 
${CMAKE_CURRENT_SOURCE_DIR}/tests/system_tests_http.py)
 
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/tests/system_tests_topology_disposition.py.in
 ${CMAKE_CURRENT_SOURCE_DIR}/tests/system_tests_topology_disposition.py)
+configure_file(${CMAKE_CURRENT_SOURCE_DIR}/python/qpid_dispatch_internal/management/agent.py.in
 ${CMAKE_CURRENT_SOURCE_DIR}/python/qpid_dispatch_internal/management/agent.py)
 execute_process(COMMAND ${RUN} --sh OUTPUT_FILE config.sh)
 
 if (NOT UNITTEST_MISSING)
diff --git a/python/qpid_dispatch_internal/management/agent.py 
b/python/qpid_dispatch_internal/management/agent.py.in
similarity index 99%
rename from python/qpid_dispatch_internal/management/agent.py
rename to python/qpid_dispatch_internal/management/agent.py.in
index 275ee59..606fac8 100644
--- a/python/qpid_dispatch_internal/management/agent.py
+++ b/python/qpid_dispatch_internal/management/agent.py.in
@@ -435,6 +435,8 @@ class ListenerEntity(ConnectionBaseEntity):
 return super(ListenerEntity, self).__str__().replace("Entity(", 
"ListenerEntity(")
 
 def _delete(self):
+if self.http and ${SKIP_DELETE_HTTP_LISTENER}:
+raise BadRequestStatus("HTTP listeners cannot be deleted")
 self._qd.qd_connection_manager_delete_listener(self._dispatch, 
self._implementations[0].key)
 
 
diff --git a/tests/system_tests_http.py.in b/tests/system_tests_http.py.in
index 931baf6..9ba4c0d 100644
--- a/tests/system_tests_http.py.in
+++ b/tests/system_tests_http.py.in
@@ -49,6 +49,13 @@ class RouterTestHttp(TestCase):
 return os.path.join(DIR, 'ssl_certs', name)
 
 @classmethod
+def setUpClass(cls):
+super(RouterTestHttp, cls).setUpClass()
+# Http listener delete 

[qpid-proton] branch master updated: PROTON-2328: epoll proactor, use local variable not zeroed task member to track warm pairings

2021-01-25 Thread cliffjansen
This is an automated email from the ASF dual-hosted git repository.

cliffjansen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-proton.git


The following commit(s) were added to refs/heads/master by this push:
 new b4ce612  PROTON-2328: epoll proactor, use local variable not zeroed 
task member to track warm pairings
b4ce612 is described below

commit b4ce6127df4e9be84ebc5a6a98750bf4feb403ad
Author: Cliff Jansen 
AuthorDate: Mon Jan 25 09:06:29 2021 -0800

PROTON-2328: epoll proactor, use local variable not zeroed task member to 
track warm pairings
---
 c/src/proactor/epoll.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/c/src/proactor/epoll.c b/c/src/proactor/epoll.c
index 7467683..8c792e6 100644
--- a/c/src/proactor/epoll.c
+++ b/c/src/proactor/epoll.c
@@ -461,7 +461,7 @@ bool unassign_thread(tslot_t *ts, tslot_state new_state) {
 
   if (tsk && !deleting) {
 pn_proactor_t *p = tsk->proactor;
-ts->prev_task = ts->task;
+ts->prev_task = tsk;
 if (tsk->sched_pending) {
   // Make sure the task is already scheduled or put it on the ready list
   if (tsk->sched_ready) {


-
To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org



[qpid-dispatch] branch master updated: DISPATCH-1920: bump TSAN distro to latest (focal)

2021-01-25 Thread kgiusti
This is an automated email from the ASF dual-hosted git repository.

kgiusti pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git


The following commit(s) were added to refs/heads/master by this push:
 new f0ca5ee  DISPATCH-1920: bump TSAN distro to latest (focal)
f0ca5ee is described below

commit f0ca5ee923485960e1bcf9533e47c2dfbb49f7ea
Author: Kenneth Giusti 
AuthorDate: Thu Jan 21 09:30:11 2021 -0500

DISPATCH-1920: bump TSAN distro to latest (focal)

This closes #993
---
 .travis.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.travis.yml b/.travis.yml
index b7e23b0..4104c44 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -83,7 +83,7 @@ jobs:
 - PATH="/usr/bin:$PATH" PROTON_VERSION=0.33.0
   - name: "qdrouterd:TSAN"
 os: linux
-dist: bionic
+dist: focal
 env:
 - PATH="/usr/bin:$PATH" PROTON_VERSION=0.33.0
 - DISPATCH_CMAKE_ARGS='-DRUNTIME_CHECK=tsan'


-
To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org