Merge ~rafaeldtinoco/ubuntu/+source/pcs:lp1855568-focal into ubuntu/+source/pcs:ubuntu/focal-devel

Proposed by Rafael David Tinoco
Status: Merged
Merged at revision: f87e47afd31f0f38f30c09412565f3654e1597f8
Proposed branch: ~rafaeldtinoco/ubuntu/+source/pcs:lp1855568-focal
Merge into: ubuntu/+source/pcs:ubuntu/focal-devel
Diff against target: 131 lines (+89/-2)
4 files modified
debian/changelog (+9/-0)
debian/control (+4/-2)
debian/patches/Fix-python-tornado-5.patch (+75/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
Christian Ehrhardt  (community) Approve
Canonical Server Pending
Review via email: mp+376492@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :

This merge restores the fixes for python3-tornado 5.1.1 into pcs.
This will unblock the migration issues with pcs for now.
I'll sync and/or merge fixes in focal whenever python3-tornado 6 is available.
For now, I need pcs in order to document Ubuntu HA stack in Ubuntu Server Guide.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Some nit picks mostly around wordings and headers.
Easy to fix and then I'm +1 on this as it functionally already LGTM.

review: Needs Fixing
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

LGTM now +1

review: Approve
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

To ssh://git.launchpad.net/~usd-import-team/ubuntu/+source/pcs
 * [new tag] upload/0.10.4-1ubuntu1 -> upload/0.10.4-1ubuntu1

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 3ede087..fec2308 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,12 @@
6+pcs (0.10.4-1ubuntu1) focal; urgency=medium
7+
8+ * Changed dependency back to python3-tornado 5.1.1 (LP: #1855568)
9+ - debian/control: drop (>= 6) from python3-tornado requirement.
10+ - d/p/Fix-python-tornado-5.patch: workaround that fixes python-tornado
11+ until v6 becomes available.
12+
13+ -- Rafael David Tinoco <rafaeldtinoco@ubuntu.com> Sun, 08 Dec 2019 05:36:41 +0000
14+
15 pcs (0.10.4-1) unstable; urgency=medium
16
17 * New upstream version 0.10.4
18diff --git a/debian/control b/debian/control
19index 4ac8a27..02508e1 100644
20--- a/debian/control
21+++ b/debian/control
22@@ -1,7 +1,8 @@
23 Source: pcs
24 Section: admin
25 Priority: optional
26-Maintainer: Debian HA Maintainers <debian-ha-maintainers@lists.alioth.debian.org>
27+Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com>
28+XSBC-Original-Maintainer: Debian HA Maintainers <debian-ha-maintainers@lists.alioth.debian.org>
29 Uploaders:
30 Valentin Vidic <vvidic@debian.org>
31 Build-Depends:
32@@ -30,7 +31,8 @@ Depends:
33 python3-openssl,
34 python3-pkg-resources,
35 python3-pycurl,
36- python3-tornado (>= 6),
37+# LP: #1855568 - python3-tornado (>= 6)
38+ python3-tornado,
39 ruby,
40 ruby-backports,
41 ruby-ethon,
42diff --git a/debian/patches/Fix-python-tornado-5.patch b/debian/patches/Fix-python-tornado-5.patch
43new file mode 100644
44index 0000000..586bf67
45--- /dev/null
46+++ b/debian/patches/Fix-python-tornado-5.patch
47@@ -0,0 +1,75 @@
48+Description: Fix tornado 5 tests
49+ Make tests work with tornado 5 until tornado 6 becomes
50+ available in Debian.
51+
52+ [Backport Notes]
53+
54+ Patch was applied upstream and dropped when python3-tornado 6 became
55+ available. After being dropped, python3-tornado was moved back to version 5,
56+ because of python2 to python3 migration, and it exists as a fake 6 version:
57+ '6.0.3+really5.1.1-2' up to today. In Ubuntu there is not a fake python3-
58+ tornado package for version 6, so keeping a working version 5 is needed.
59+
60+Author: Valentin Vidic <vvidic@debian.org>
61+Applied-Upstream: https://salsa.debian.org/ha-team/pcs/commit/86ac09e4e09236d89af55c9a637a4f57afc1f9db
62+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=939271
63+Bug-Ubuntu: http://bugs.launchpad.net/bugs/1855568
64+Reviewed-by: Rafael David Tinoco <rafaeldtinoco@ubuntu.com>
65+Last-Update: 2019-12-10
66+---
67+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
68+--- a/pcs_test/tier0/daemon/app/test_app_remote.py
69++++ b/pcs_test/tier0/daemon/app/test_app_remote.py
70+@@ -1,4 +1,5 @@
71+ import logging
72++import re
73+ from urllib.parse import urlencode
74+ from unittest import mock
75+
76+@@ -90,15 +91,17 @@
77+ else dict(method=method)
78+ )
79+
80++ self.http_client.fetch(
81++ self.get_url("/remote/set_sync_options"),
82++ self.stop,
83++ **kwargs
84++ )
85++
86+ # Without lock the timeout should be enough to finish task. With the
87+ # lock it should raise because of timeout. The same timeout is used for
88+ # noticing differences between test with and test without lock. The
89+ # timeout is so short to prevent unnecessary slowdown.
90+- fetch_sync_options = lambda: self.http_client.fetch(
91+- self.get_url("/remote/set_sync_options"),
92+- **kwargs
93+- )
94+- return self.io_loop.run_sync(fetch_sync_options, timeout=0.05)
95++ return self.wait(timeout=0.05)
96+
97+ def check_call_wrapper_without_lock(self, method):
98+ self.assert_wrappers_response(self.fetch_set_sync_options(method))
99+@@ -107,21 +110,13 @@
100+ self.lock.acquire()
101+ try:
102+ self.fetch_set_sync_options(method)
103+- except TornadoTimeoutError:
104++ except AssertionError as e:
105++ self.assertTrue(re.match(".*time.*out.*", str(e)) is not None)
106+ # The http_client timeouted because of lock and this is how we test
107+ # the locking function. However event loop on the server side should
108+ # finish. So we release the lock and the request successfully
109+ # finish.
110+ self.lock.release()
111+- # Now, there is an unfinished request. It was started by calling
112+- # fetch("/remote/set_sync_options") (in self.fetch_set_sync_options)
113+- # and it was waiting for the lock to be released.
114+- # The lock was released and the request is able to be finished now.
115+- # So, io_loop needs an opportunity to execute the rest of request.
116+- # Next line runs io_loop to finish hanging request. Without this an
117+- # error appears during calling
118+- # `self.http_server.close_all_connections` in tearDown...
119+- self.io_loop.run_sync(lambda: None)
120+ else:
121+ raise AssertionError("Timeout not raised")
122+
123diff --git a/debian/patches/series b/debian/patches/series
124index f0be2e0..0ebd1b3 100644
125--- a/debian/patches/series
126+++ b/debian/patches/series
127@@ -4,3 +4,4 @@ Replace-chkconfig.patch
128 Update-snmp-service-file.patch
129 Fix-python-testsuite.patch
130 Update-pam-config.patch
131+Fix-python-tornado-5.patch

Subscribers

People subscribed via source and target branches