Merge ~rafaeldtinoco/ubuntu/+source/pcs:lp1855943 into ubuntu/+source/pcs:ubuntu/focal-devel
- Git
- lp:~rafaeldtinoco/ubuntu/+source/pcs
- lp1855943
- Merge into ubuntu/focal-devel
Status: | Rejected |
---|---|
Rejected by: | Rafael David Tinoco |
Proposed branch: | ~rafaeldtinoco/ubuntu/+source/pcs:lp1855943 |
Merge into: | ubuntu/+source/pcs:ubuntu/focal-devel |
Diff against target: |
226 lines (+120/-5) 9 files modified
debian/changelog (+13/-0) debian/control (+4/-2) debian/patches/Fix-python-tornado-5.patch (+75/-0) debian/patches/series (+1/-0) debian/tests/control (+3/-3) debian/tests/setup (+6/-0) debian/tests/snmp (+6/-0) debian/tests/status (+6/-0) debian/tests/testsuite-python (+6/-0) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Rafael David Tinoco (community) | Disapprove | ||
Andreas Hasenack | Needs Information | ||
Review via email: mp+377171@code.launchpad.net |
Commit message
Description of the change
Rafael David Tinoco (rafaeldtinoco) wrote : | # |
Thank you Andreas, yes, since this also depends on corosync.. it should have the workaround from https:/
ulimit -H -l unlimited 2>/dev/null || {
# https:/
echo "test disabled for unprivileged namespaces"
exit 77
}
just like:
- corosync
- crmsh
- pacemaker
- 9687084... by Rafael David Tinoco
-
* Skip autopkgtest for unprivileged containers: (LP: #1828228)
- d/t/control: mark tests as skippable
- d/t/{setup,snmp,status, testsuite- python} :
skip if memlock can't be set to unlimited by root
Rafael David Tinoco (rafaeldtinoco) wrote : | # |
Alright. Thanks for checking this @ahasenack, could you, please, review this with and without privileges ? I believe the issue has been addressed and, in your case, tests shall be skipped now (so we won't fail in armhf as an example).
Andreas Hasenack (ahasenack) wrote : | # |
Checking
Andreas Hasenack (ahasenack) wrote : | # |
I think the testsuite-python test doesn't need this guard. I was able to run it on an unprivileged lxd container:
...
(Reading database ... 35508 files and directories currently installed.)
Removing autopkgtest-satdep (0) ...
autopkgtest [14:34:01]: test snmp: [------
test disabled for unprivileged namespaces
autopkgtest [14:34:02]: test snmp: -------
autopkgtest [14:34:02]: test snmp: - - - - - - - - - - results - - - - - - - - - -
snmp SKIP exit status 77 and marked as skippable
autopkgtest [14:34:03]: @@@@@@@
status SKIP exit status 77 and marked as skippable
setup SKIP exit status 77 and marked as skippable
testsuite-ruby PASS
testsuite-python PASS
snmp SKIP exit status 77 and marked as skippable
andreas@
#!/bin/sh
set -e
#ulimit -H -l unlimited 2>/dev/null || {
# # https:/
# echo "test disabled for unprivileged namespaces"
# exit 77
#}
# Ubuntu uses http proxy breaking some tests
unset http_proxy
unset https_proxy
cat >>/etc/hosts <<EOF
192.168.1.1 rh7-1 rh7-1.localhost
192.168.1.2 rh7-2 rh7-2.localhost
192.168.1.3 rh7-3 rh7-3.localhost
EOF
python3 ./pcs_test/suite.py --fast-info 2>&1
andreas@
I ran it like this:
autopkgtest -o dep8-lxd-
It skipped 97 tests, just when run in a vm (and the guard in place, which let it run in that case).
Rafael David Tinoco (rafaeldtinoco) wrote : | # |
I see.. but based on its control file:
Depends: pcs, pacemaker (>= 2.0), pacemaker-cli-utils (>= 2.0), fence-agents, booth-pacemaker
Restrictions: needs-root, rw-build-tree, skippable
Tests: testsuite-python
it would install pacemaker and that would make it to fail as pacemaker wouldn't start as a service (because of missing corosync).
Should we keep this "as-is", thus the workaround ? Or add a delta to Debian, skipping the tests ?
Andreas Hasenack (ahasenack) wrote : | # |
Indeed, pacemaker pulls in corosync, which fails to start during the apt transaction:
...
Setting up libstonithd26:amd64 (2.0.1-5ubuntu1) ...
Setting up corosync (3.0.2-1ubuntu1) ...
Created symlink /etc/systemd/
Job for corosync.service failed because the control process exited with error code.
See "systemctl status corosync.service" and "journalctl -xe" for details.
Setting up libpengine27:amd64 (2.0.1-5ubuntu1) ...
Setting up libplumb2 (1.0.12-14) ...
...
Setting up pacemaker (2.0.1-5ubuntu1) ...
Created symlink /etc/systemd/
A dependency job for pacemaker.service failed. See 'journalctl -xe' for details.
Setting up pacemaker-cli-utils (2.0.1-5ubuntu1) ...
Processing triggers for systemd (244-3ubuntu1) ...
Processing triggers for man-db (2.9.0-2) ...
Processing triggers for libc-bin (2.30-0ubuntu3) ...
root@f1:~# echo $?
0
But that didn't fail the whole thing. In the end, neither pacemaker or corosync are running, but the tests pass. Looks like the python pcs tests don't need pacemaker/corosync running, or start their own controlled copies perhaps? Or use mocks, like in unit tests? In which case the test dependencies would be incorrect.
Andreas Hasenack (ahasenack) wrote : | # |
So by not adding the check to the python testsuite, we reduce the delta, right? And it seems to work without it in an unprivileged container. Should we give this a try in bileto, or have we spent too much time on this already? :)
Rafael David Tinoco (rafaeldtinoco) wrote : | # |
Sorry, was preempted. Let me re-check that and we can decide..
Rafael David Tinoco (rafaeldtinoco) wrote : | # |
Alright,
So like we spoke about... after applying the patches with quilt I got no errors:
OK (skipped=97)
autopkgtest [20:50:27]: test testsuite-python: -------
autopkgtest [20:50:27]: test testsuite-python: - - - - - - - - - - results - - - - - - - - - -
testsuite-python PASS
autopkgtest [20:50:27]: @@@@@@@
testsuite-python PASS
But the "dependent" services were running:
$ ps -ef | grep -i pacemake
root 15933 1 0 20:37 ? 00:00:00 /usr/sbin/
haclust+ 15940 15933 0 20:37 ? 00:00:00 /usr/lib/
root 15941 15933 0 20:37 ? 00:00:00 /usr/lib/
root 15942 15933 0 20:37 ? 00:00:00 /usr/lib/
haclust+ 15943 15933 0 20:37 ? 00:00:00 /usr/lib/
haclust+ 15944 15933 0 20:37 ? 00:00:00 /usr/lib/
haclust+ 15945 15933 0 20:37 ? 00:00:00 /usr/lib/
And corosync service start will fail for armhf (unprivileged container).
I'm testing now without pacemaker/corosync activated.. to see if more tests are skipped because of that...
Rafael David Tinoco (rafaeldtinoco) wrote : | # |
Ran 5454 tests in 789.465s
OK (skipped=97)
autopkgtest [21:28:46]: test testsuite-python: -------
autopkgtest [21:28:46]: test testsuite-python: - - - - - - - - - - results - - - - - - - - - -
testsuite-python PASS
autopkgtest [21:28:46]: @@@@@@@
testsuite-python PASS
Now I'll remove the dependencies and check...
Rafael David Tinoco (rafaeldtinoco) wrote : | # |
Errr...
FileNotFoundError: [Errno 2] No such file or directory: '/usr/sbin/
pcs.lib.
Almost everything, including CIB emulation, seem to be mocked, but... I dont think its worth messing much more with this as there are some command dependencies, at least to check corosync version, that would fail without corosync.
With that said.. my vote is to keep the workaround and skip autopkgtests in unprivileged containers entirely for now, specially considering that, in our infrastructure case, clusters aren't gonna be very useful in armhf environments.
Thoughts ? Feel free to call another opinion on this!
Cheers o/
What do you think ?
Andreas Hasenack (ahasenack) wrote : | # |
Thanks for investigating the test dependencies. My only concern is that we are adding a delta to disable a test suite that seems to be working, albeit maybe by accident since the services failing to start during the apt transaction isn't triggering a fatal error. And maybe a test gets added in the future that will fail for real because of this. I'll leave it up to you, as you are maintaining this stack :)
I'm now checking why adding "rocommunity public localhost" to snmpd.conf before the other "rocommunity" lines, which is what the previous snmp test file was doing, isn't enough anymore.
Andreas Hasenack (ahasenack) wrote : | # |
So the snmp dep8 test passes with net-snmp from proposed (5.8+dfsg-
# enable localhost access to full snmp data
sed -i '/^rocommunity\
rocommunity public localhost' /etc/snmp/
The resulting /etc/snmp/
# Read-only access to everyone to the systemonly view
rocommunity public localhost <--- added by the sed above (your change reverted)
rocommunity public default -V systemonly
rocommunity6 public default -V systemonly
This is how I ran it:
autopkgtest -o dep8-revert-
The VM was created with multipass (cloud-init bits just for .br mirrors, ssh key, and my local proxy):
multipass launch -n focal-pcs-dep8 -m 2G -c 2 --cloud-init ~/cloud-init-proxy daily:focal
Let me run again without -B, i.e., let autopkgtest build the source package, see if that makes a difference. And I'll also enable set -x on that test.
Andreas Hasenack (ahasenack) wrote : | # |
hah, set -x wasn't such a great idea, as that prints to stderr and aborts the test :)
Andreas Hasenack (ahasenack) wrote : | # |
Ok, added allow-stderr, here is the last run, showing it passing without the change to the sed command in d/t/snmp:
"""
...
Get:4 http://
...
autopkgtest [18:17:39]: test snmp: [------
+ ulimit -H -l unlimited
+ OUTPUT=
+ trap cleanup 0 2 3 15
+ service corosync start
+ service pacemaker start
+ sed -i /^rocommunity\
rocommunity public localhost /etc/snmp/
+ service snmpd restart
+ service pcs_snmp_agent restart
+ sleep 60
+ pcs property set stonith-
+ pcs property set no-quorum-
+ pcs resource create dummy1 ocf:heartbeat:Dummy
+ pcs resource create dummy2 ocf:heartbeat:Dummy
+ sleep 60
+ tee /tmp/autopkgtes
+ snmpwalk -m PACEMAKER-
PACEMAKER-
PACEMAKER-
PACEMAKER-
PACEMAKER-
PACEMAKER-
PACEMAKER-
PACEMAKER-
PACEMAKER-
PACEMAKER-
PACEMAKER-
PACEMAKER-
PACEMAKER-
PACEMAKER-
PACEMAKER-
PACEMAKER-
PACEMAKER-
PACEMAKER-
PACEMAKER-
PACEMAKER-
+ grep -q RunningResource
+ cleanup
+ service pacemaker stop
+ service corosync stop
+ rm -f /tmp/autopkgtes
autopkgtest [18:19:47]: test snmp: -------
autopkgtest [18:19:47]: test snmp: - - - - - - - - - - results - - - - - - - - - -
snmp PASS
autopkgtest [18:19:47]: @@@@@@@
status PASS
setup PASS
testsuite-ruby PASS
testsuite-python PASS
snmp PASS
autopkgtest [18:19:47]: Binaries: resetting testbed apt configuration
Hit:1 http://
Hit:2 http://
Hit:3 http://
Hit:4 http://
Rafael David Tinoco (rafaeldtinoco) wrote : | # |
WHAT if I tell you I *think* the line being added to /etc/snmp/
I ran version from regular archive and in one I had:
# Read-only access to everyone to the systemonly view
rocommunity public localhost
rocommunity public default -V systemonly
rocommunity6 public default -V systemonly
but in 2 others I had:
# Read-only access to everyone to the systemonly view
rocommunity public default -V systemonly
rocommunity6 public default -V systemonly
only :\
And the autopkgtest errors LIKELY didnt have the correct line added by sed because I could reproduce the exact same errors from autopkgtest environment :\.
I'll check this tomorrow to see what could be causing this.
Thanks a lot for checking.
Andreas Hasenack (ahasenack) wrote : | # |
uh, ok, that's interesting
I uploaded my experiment to https:/
Andreas Hasenack (ahasenack) wrote : | # |
Ok, bileto finished (https:/
My branch is https:/
I think we should set -x the snmp test (which means allowing stderr in the d/t/control file) and revert the sed change, since the original one seems to be fine. If this fails randomly, with set -x we should have more debugging available. Optionally we can also cat snmpd.conf in the failure case to see why the snmpwalk didn't work, but maybe leave this more aggressive measure for later if it fails.
The unprivileged check can be there for the pythontests if you want. It's passing now without it, but might fail in the future if something is no longer mocked out. I'll leave this to you.
I'll upload pyagentx to the same bileto ppa, with the sed reverted, to see if it passes too.
Andreas Hasenack (ahasenack) wrote : | # |
I uploaded https:/
Andreas Hasenack (ahasenack) wrote : | # |
pyagentx also passed, with just the known i386 failures.
Andreas Hasenack (ahasenack) wrote : | # |
I retriggered the tests in excuses (the real thing), and looks like all we need now in pcs is the unprivileged lxd guard which otherwise fails armhf:
pcs/0.10.4-2: arm64: Pass, armhf: Regression ♻ , i386: Ignored failure, ppc64el: Pass, s390x: Pass
autopkgtest [14:20:04]: test snmp: - - - - - - - - - - stderr - - - - - - - - - -
Job for corosync.service failed because the control process exited with error code.
See "systemctl status corosync.service" and "journalctl -xe" for details.
autopkgtest [14:20:06]: @@@@@@@
status FAIL non-zero exit status 1
setup FAIL non-zero exit status 1
testsuite-ruby PASS
testsuite-python PASS
snmp FAIL non-zero exit status 1
pyagentx/0.4.1-5 is already full green:
autopkgtest for pyagentx/0.4.1-5: amd64: Pass, arm64: Pass, armhf: Pass, ppc64el: Pass, s390x: Pass
Rafael David Tinoco (rafaeldtinoco) wrote : | # |
Great. I'll re-push a version containing only the unprivileged lxd code.
Thanks for checking this Andreas.
Rafael David Tinoco (rafaeldtinoco) wrote : | # |
I re-pushed and created a PPA for that change only:
https:/
Funny, bellow, the diff is saying I have more unmerged commits than I actually have.
The last merge:
https:/
says "merged" but is showed here as not merged.
Should I have done a merge over pkg/ubuntu/proposed ?
Andreas Hasenack (ahasenack) wrote : | # |
ubuntu/devel now has 0.10.4-2, which is correct. hash is c1c10949f1707d5
You should apply your changes on top of that.
Andreas Hasenack (ahasenack) wrote : | # |
Your previous merge won't appear under the linear ubuntu/devel history because the package was synced from debian again, over the ubuntu changes. See https:/
- b96fbd8... by Rafael David Tinoco
-
changelog
- b319afa... by Rafael David Tinoco
-
update-metadata
Rafael David Tinoco (rafaeldtinoco) wrote : | # |
Thanks Andreas. Publishing History helped a lot to understand what happened. I wasn't aware that sync would ignore a changed package when already in -proposed. I just pushed it again containing both merges and 1 version change only.
I have uploaded this source to PPA:
https:/
so you can better review.
The python3-tornado merge was reviewed here:
https:/
so you can give another look before merging it also.
I hope thats enough lets see.
Please let me know if I missed something.
Best,
Rafael
Rafael David Tinoco (rafaeldtinoco) wrote : | # |
Closing this as both patches were accepted upstream:
https:/
https:/
Unmerged commits
- b319afa... by Rafael David Tinoco
-
update-metadata
- b96fbd8... by Rafael David Tinoco
-
changelog
- 9687084... by Rafael David Tinoco
-
* Skip autopkgtest for unprivileged containers: (LP: #1828228)
- d/t/control: mark tests as skippable
- d/t/{setup,snmp,status, testsuite- python} :
skip if memlock can't be set to unlimited by root - e6950bd... by Rafael David Tinoco
-
* Changed dependency back to python3-tornado 5.1.1 (LP: #1855568)
- debian/control: drop (>= 6) from python3-tornado requirement.
- d/p/Fix-python- tornado- 5.patch: workaround that fixes python-tornado
until v6 becomes available.
Preview Diff
1 | diff --git a/debian/changelog b/debian/changelog |
2 | index 85c5885..c924a48 100644 |
3 | --- a/debian/changelog |
4 | +++ b/debian/changelog |
5 | @@ -1,3 +1,16 @@ |
6 | +pcs (0.10.4-2ubuntu1) 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 | + * Skip autopkgtest for unprivileged containers: (LP: #1828228) |
13 | + - d/t/control: mark tests as skippable |
14 | + - d/t/{setup,snmp,status,testsuite-python}: |
15 | + skip if memlock can't be set to unlimited by root |
16 | + |
17 | + -- Rafael David Tinoco <rafaeldtinoco@ubuntu.com> Sun, 12 Jan 2020 06:13:16 +0000 |
18 | + |
19 | pcs (0.10.4-2) unstable; urgency=medium |
20 | |
21 | * d/salsa-ci.yml: enable CI |
22 | diff --git a/debian/control b/debian/control |
23 | index 4ac8a27..02508e1 100644 |
24 | --- a/debian/control |
25 | +++ b/debian/control |
26 | @@ -1,7 +1,8 @@ |
27 | Source: pcs |
28 | Section: admin |
29 | Priority: optional |
30 | -Maintainer: Debian HA Maintainers <debian-ha-maintainers@lists.alioth.debian.org> |
31 | +Maintainer: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> |
32 | +XSBC-Original-Maintainer: Debian HA Maintainers <debian-ha-maintainers@lists.alioth.debian.org> |
33 | Uploaders: |
34 | Valentin Vidic <vvidic@debian.org> |
35 | Build-Depends: |
36 | @@ -30,7 +31,8 @@ Depends: |
37 | python3-openssl, |
38 | python3-pkg-resources, |
39 | python3-pycurl, |
40 | - python3-tornado (>= 6), |
41 | +# LP: #1855568 - python3-tornado (>= 6) |
42 | + python3-tornado, |
43 | ruby, |
44 | ruby-backports, |
45 | ruby-ethon, |
46 | diff --git a/debian/patches/Fix-python-tornado-5.patch b/debian/patches/Fix-python-tornado-5.patch |
47 | new file mode 100644 |
48 | index 0000000..586bf67 |
49 | --- /dev/null |
50 | +++ b/debian/patches/Fix-python-tornado-5.patch |
51 | @@ -0,0 +1,75 @@ |
52 | +Description: Fix tornado 5 tests |
53 | + Make tests work with tornado 5 until tornado 6 becomes |
54 | + available in Debian. |
55 | + |
56 | + [Backport Notes] |
57 | + |
58 | + Patch was applied upstream and dropped when python3-tornado 6 became |
59 | + available. After being dropped, python3-tornado was moved back to version 5, |
60 | + because of python2 to python3 migration, and it exists as a fake 6 version: |
61 | + '6.0.3+really5.1.1-2' up to today. In Ubuntu there is not a fake python3- |
62 | + tornado package for version 6, so keeping a working version 5 is needed. |
63 | + |
64 | +Author: Valentin Vidic <vvidic@debian.org> |
65 | +Applied-Upstream: https://salsa.debian.org/ha-team/pcs/commit/86ac09e4e09236d89af55c9a637a4f57afc1f9db |
66 | +Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=939271 |
67 | +Bug-Ubuntu: http://bugs.launchpad.net/bugs/1855568 |
68 | +Reviewed-by: Rafael David Tinoco <rafaeldtinoco@ubuntu.com> |
69 | +Last-Update: 2019-12-10 |
70 | +--- |
71 | +This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ |
72 | +--- a/pcs_test/tier0/daemon/app/test_app_remote.py |
73 | ++++ b/pcs_test/tier0/daemon/app/test_app_remote.py |
74 | +@@ -1,4 +1,5 @@ |
75 | + import logging |
76 | ++import re |
77 | + from urllib.parse import urlencode |
78 | + from unittest import mock |
79 | + |
80 | +@@ -90,15 +91,17 @@ |
81 | + else dict(method=method) |
82 | + ) |
83 | + |
84 | ++ self.http_client.fetch( |
85 | ++ self.get_url("/remote/set_sync_options"), |
86 | ++ self.stop, |
87 | ++ **kwargs |
88 | ++ ) |
89 | ++ |
90 | + # Without lock the timeout should be enough to finish task. With the |
91 | + # lock it should raise because of timeout. The same timeout is used for |
92 | + # noticing differences between test with and test without lock. The |
93 | + # timeout is so short to prevent unnecessary slowdown. |
94 | +- fetch_sync_options = lambda: self.http_client.fetch( |
95 | +- self.get_url("/remote/set_sync_options"), |
96 | +- **kwargs |
97 | +- ) |
98 | +- return self.io_loop.run_sync(fetch_sync_options, timeout=0.05) |
99 | ++ return self.wait(timeout=0.05) |
100 | + |
101 | + def check_call_wrapper_without_lock(self, method): |
102 | + self.assert_wrappers_response(self.fetch_set_sync_options(method)) |
103 | +@@ -107,21 +110,13 @@ |
104 | + self.lock.acquire() |
105 | + try: |
106 | + self.fetch_set_sync_options(method) |
107 | +- except TornadoTimeoutError: |
108 | ++ except AssertionError as e: |
109 | ++ self.assertTrue(re.match(".*time.*out.*", str(e)) is not None) |
110 | + # The http_client timeouted because of lock and this is how we test |
111 | + # the locking function. However event loop on the server side should |
112 | + # finish. So we release the lock and the request successfully |
113 | + # finish. |
114 | + self.lock.release() |
115 | +- # Now, there is an unfinished request. It was started by calling |
116 | +- # fetch("/remote/set_sync_options") (in self.fetch_set_sync_options) |
117 | +- # and it was waiting for the lock to be released. |
118 | +- # The lock was released and the request is able to be finished now. |
119 | +- # So, io_loop needs an opportunity to execute the rest of request. |
120 | +- # Next line runs io_loop to finish hanging request. Without this an |
121 | +- # error appears during calling |
122 | +- # `self.http_server.close_all_connections` in tearDown... |
123 | +- self.io_loop.run_sync(lambda: None) |
124 | + else: |
125 | + raise AssertionError("Timeout not raised") |
126 | + |
127 | diff --git a/debian/patches/series b/debian/patches/series |
128 | index f0be2e0..0ebd1b3 100644 |
129 | --- a/debian/patches/series |
130 | +++ b/debian/patches/series |
131 | @@ -4,3 +4,4 @@ Replace-chkconfig.patch |
132 | Update-snmp-service-file.patch |
133 | Fix-python-testsuite.patch |
134 | Update-pam-config.patch |
135 | +Fix-python-tornado-5.patch |
136 | diff --git a/debian/tests/control b/debian/tests/control |
137 | index 0ca8e23..b75632f 100644 |
138 | --- a/debian/tests/control |
139 | +++ b/debian/tests/control |
140 | @@ -1,5 +1,5 @@ |
141 | Depends: pcs, pacemaker (>= 2.0), pacemaker-cli-utils (>= 2.0) |
142 | -Restrictions: needs-root |
143 | +Restrictions: needs-root, skippable |
144 | Tests: status, setup |
145 | |
146 | Depends: pcs, make, ruby-rack-test |
147 | @@ -7,9 +7,9 @@ Restrictions: rw-build-tree |
148 | Tests: testsuite-ruby |
149 | |
150 | Depends: pcs, pacemaker (>= 2.0), pacemaker-cli-utils (>= 2.0), fence-agents, booth-pacemaker |
151 | -Restrictions: needs-root, rw-build-tree |
152 | +Restrictions: needs-root, rw-build-tree, skippable |
153 | Tests: testsuite-python |
154 | |
155 | Depends: pcs-snmp, pacemaker (>= 2.0), pacemaker-cli-utils (>= 2.0), snmp (>= 5.8), snmpd (>= 5.8), snmp-mibs-downloader |
156 | -Restrictions: needs-root |
157 | +Restrictions: needs-root, skippable |
158 | Tests: snmp |
159 | diff --git a/debian/tests/setup b/debian/tests/setup |
160 | index 59c1b76..c248722 100755 |
161 | --- a/debian/tests/setup |
162 | +++ b/debian/tests/setup |
163 | @@ -2,6 +2,12 @@ |
164 | |
165 | set -e |
166 | |
167 | +ulimit -H -l unlimited 2>/dev/null || { |
168 | + # https://bugs.launchpad.net/bugs/1828228 |
169 | + echo "test disabled for unprivileged namespaces" |
170 | + exit 77 |
171 | +} |
172 | + |
173 | cleanup () { |
174 | service pcsd stop |
175 | service pacemaker stop |
176 | diff --git a/debian/tests/snmp b/debian/tests/snmp |
177 | index 937731f..2c620bd 100755 |
178 | --- a/debian/tests/snmp |
179 | +++ b/debian/tests/snmp |
180 | @@ -2,6 +2,12 @@ |
181 | |
182 | set -e |
183 | |
184 | +ulimit -H -l unlimited 2>/dev/null || { |
185 | + # https://bugs.launchpad.net/bugs/1828228 |
186 | + echo "test disabled for unprivileged namespaces" |
187 | + exit 77 |
188 | +} |
189 | + |
190 | OUTPUT=$AUTOPKGTEST_TMP/walk.out |
191 | |
192 | cleanup () { |
193 | diff --git a/debian/tests/status b/debian/tests/status |
194 | index 0eb6002..a7e4511 100755 |
195 | --- a/debian/tests/status |
196 | +++ b/debian/tests/status |
197 | @@ -2,6 +2,12 @@ |
198 | |
199 | set -e |
200 | |
201 | +ulimit -H -l unlimited 2>/dev/null || { |
202 | + # https://bugs.launchpad.net/bugs/1828228 |
203 | + echo "test disabled for unprivileged namespaces" |
204 | + exit 77 |
205 | +} |
206 | + |
207 | cleanup () { |
208 | service pacemaker stop |
209 | service corosync stop |
210 | diff --git a/debian/tests/testsuite-python b/debian/tests/testsuite-python |
211 | index 24394a5..582730f 100755 |
212 | --- a/debian/tests/testsuite-python |
213 | +++ b/debian/tests/testsuite-python |
214 | @@ -2,6 +2,12 @@ |
215 | |
216 | set -e |
217 | |
218 | +ulimit -H -l unlimited 2>/dev/null || { |
219 | + # https://bugs.launchpad.net/bugs/1828228 |
220 | + echo "test disabled for unprivileged namespaces" |
221 | + exit 77 |
222 | +} |
223 | + |
224 | # Ubuntu uses http proxy breaking some tests |
225 | unset http_proxy |
226 | unset https_proxy |
This test will fail in an unprivileged lxd container, because corosync won't start:
Jan 06 13:46:54 focal-pcs corosync[18089]: [TOTEM ] Initializing transport (Kronosnet).
Jan 06 13:46:55 focal-pcs corosync[18089]: [TOTEM ] knet_handle_new failed: File name too long (36)
Jan 06 13:46:55 focal-pcs corosync[18089]: [KNET ] transport: Failed to set socket buffer via force option 33: Operation not permitted
Jan 06 13:46:55 focal-pcs corosync[18089]: [KNET ] transport: Unable to set local socketpair receive buffer: File name too long
Jan 06 13:46:55 focal-pcs corosync[18089]: [KNET ] handle: Unable to initialize internal hostsockpair: File name too long
Jan 06 13:46:55 focal-pcs corosync[18089]: [MAIN ] Can't initialize TOTEM layer
Jan 06 13:46:55 focal-pcs corosync[18089]: [MAIN ] Corosync Cluster Engine exiting with status 15 at main.c:1531.