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

Subscribers

People subscribed via source and target branches