Merge ~rafaeldtinoco/ubuntu/+source/resource-agents:lp1895343-focal into ubuntu/+source/resource-agents:ubuntu/focal-devel

Proposed by Rafael David Tinoco
Status: Rejected
Rejected by: Lucas Kanashiro
Proposed branch: ~rafaeldtinoco/ubuntu/+source/resource-agents:lp1895343-focal
Merge into: ubuntu/+source/resource-agents:ubuntu/focal-devel
Diff against target: 89 lines (+67/-0)
3 files modified
debian/changelog (+7/-0)
debian/patches/lp1895343-01-azure-lb-Dont-redirect-nc-listener-output-to-pidfile.patch (+59/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
Lucas Kanashiro (community) Needs Fixing
Canonical Server Pending
Rafael David Tinoco Pending
Review via email: mp+392747@code.launchpad.net

Commit message

BUG: https://bugs.launchpad.net/ubuntu/+source/resource-agents/+bug/1895343
PPA: https://launchpad.net/~rafaeldtinoco/+archive/ubuntu/lp1895343

Both bugs: LP: #1894323 (fence-agents) & SF: #00289211 and LP: #1895343 (resource-agents) are part of our effort to get fence/resource agents back-ported to Bionic & Focal to Azure.

----

This is the Focal merge for resource-agents attempt of backporting azure-lb and azure-events.
Actually those 2 don't need backport as they're already present in Focal. This merge is only
leveling azure-lb up with the other merge (for same bug) doing the Bionic backport (the fix was placed in Bionic and I did not want to let Focal not to have the same fix).

Note: You might require to fill LP description with a SRU template for this one.

To post a comment you must log in.
Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :
Download full text (4.5 KiB)

* Changelog:
  - [-] old content and logical tag match as expected
  - [x] changelog entry correct version and targeted codename
  - [√] changelog entries correct
  - [-] update-maintainer has been run

* Actual changes:
  - [√] no upstream changes to consider
  - [√] no further upstream version to consider
  - [√] debian changes look safe

* Old Delta:
  - [-] dropped changes are ok to be dropped
  - [√] nothing else to drop
  - [√] changes forwarded upstream/debian (if appropriate)

* New Delta:
  - [x] no new patches added
  - [√] patches match what was proposed upstream
  - [√] patches correctly included in debian/patches/series
  - [√] patches have correct DEP3 metadata

* Build/Test:
  - [√] build is ok
  - [x] verified PPA package installs/uninstalls
  - [√] autopkgtest against the PPA package passes
  - [√] sanity checks test fine

The version needs to be updated to 1:4.5.0-2ubuntu2.2 because 1:4.5.0-2ubuntu2.1 was just accepted in focal-proposed as part of this SRU:

https://bugs.launchpad.net/ubuntu/+source/resource-agents/+bug/1900016

I ran the DEP-8 tests with autopkgtest and everything passed:

autopkgtest [11:45:45]: @@@@@@@@@@@@@@@@@@@@ summary
IPaddr2 PASS
command1 PASS
command2 PASS
command3 PASS
command4 PASS
command5 PASS
command6 PASS
command7 PASS
command8 PASS
command9 PASS
command10 PASS
command11 PASS
command12 PASS

The linked PPA is targeting Bionic and not Focal, so I did a local build and tested it in my Azure cluster with a load balance setup. Everything went well, the azure-lb resource is processing health probe requests as expected. This is the CIB of my cluster where I tested this package:

node 1: vm01
node 2: vm02
node 3: vm03
primitive fence-vm01 stonith:fence_azure_arm \
        params action=reboot plug=vm01 resourceGroup=focal-ha username=XXXXXXXX-097d-4821-868b-a51b5be081f0 login=XXXXXXXX-097d-4821-868b-a51b5be081f0 passwd="XXXXXXXXXX" tenantId=XXXXXXXX-f848-46d4-a96f-be6df491fe15 subscriptionId=XXXXXXXX-f311-482d-a746-82b73fc32b27 pcmk_reboot_timeout=900 \
        op monitor interval=3600 timeout=120
primitive fence-vm02 stonith:fence_azure_arm \
        params action=reboot plug=vm02 resourceGroup=focal-ha username=XXXXXXXX-097d-4821-868b-a51b5be081f0 login=XXXXXXXX-097d-4821-868b-a51b5be081f0 passwd="XXXXXXXXXX" tenantId=XXXXXXXX-f848-46d4-a96f-be6df491fe15 subscriptionId=XXXXXXXX-f311-482d-a746-82b73fc32b27 pcmk_reboot_timeout=900 \
        op monitor interval=3600 timeout=120
primitive fence-vm03 stonith:fence_azure_arm \
        params action=reboot plug=vm03 resourceGroup=focal-ha username=XXXXXXXX-097d-4821-868b-a51b5be081f0 login=XXXXXXXX-097d-4821-868b-a51b5be081f0 passwd="XXXXXXXXXX" tenantId=XXXXXXXX-f848-46d4-a96f-be6df491fe15 subscriptionId=XXXXXXXX-f311-482d-a746-82b73fc32b27 pcmk_reboot_timeout=900 \
        op monitor interval=3600 timeout=120
primitive lb-healthprobe azure-lb \
        params port=8000 nc="/bin/nc" \
        op monitor interval=10 timeout=20
location l-fence-vm01 fence-vm01 -inf: vm01
location l-fence-vm02 fence-vm02...

Read more...

review: Needs Fixing
Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

Unmerged commits

78e50cb... by Rafael David Tinoco

changelog

aeb52ec... by Rafael David Tinoco

* Microsoft Azure HA Enablement: azure-lb & azure-events (LP: #1895343)
  + d/p/lp1895343-01-azure-lb-Dont-redirect-nc-listener-output-to-pidfile.patch

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 befbee5..34a7770 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,10 @@
6+resource-agents (1:4.5.0-2ubuntu2.1) focal; urgency=medium
7+
8+ * Microsoft Azure HA Enablement: azure-lb & azure-events (LP: #1895343)
9+ + d/p/lp1895343-01-azure-lb-Dont-redirect-nc-listener-output-to-pidfile.patch
10+
11+ -- Rafael David Tinoco <rafaeldtinoco@ubuntu.com> Mon, 26 Oct 2020 04:00:13 +0000
12+
13 resource-agents (1:4.5.0-2ubuntu2) focal; urgency=medium
14
15 * Remove bind9 autopkgtest not compatible with ubuntu (LP: #1872877)
16diff --git a/debian/patches/lp1895343-01-azure-lb-Dont-redirect-nc-listener-output-to-pidfile.patch b/debian/patches/lp1895343-01-azure-lb-Dont-redirect-nc-listener-output-to-pidfile.patch
17new file mode 100644
18index 0000000..c617ad1
19--- /dev/null
20+++ b/debian/patches/lp1895343-01-azure-lb-Dont-redirect-nc-listener-output-to-pidfile.patch
21@@ -0,0 +1,59 @@
22+Description: azure-lb: Don't redirect nc listener output to pidfile
23+
24+The `lb_start()` function spawns an `nc` listener background process
25+and echoes the resulting pid to `$pidfile`. Due to a bug in the
26+redirection, all future data received by the `nc` process is also
27+appended to `$pidfile`.
28+
29+If binary data is received later and appended to `$pidfile`, the
30+monitor operation fails when `grep` searches the now-binary file.
31+
32+```
33+line 97: kill: Binary: arguments must be process or job IDs ]
34+line 97: kill: file: arguments must be process or job IDs ]
35+line 97: kill: /var/run/nc_PF2_02.pid: arguments must be process or job
36+ IDs ]
37+line 97: kill: matches: arguments must be process or job IDs ]
38+```
39+
40+Then the start operation fails during recovery. `lb_start()` spawns a
41+new `nc` process, but the old process is still running and using the
42+configured port.
43+
44+```
45+nc_PF2_02_start_0:777:stderr [ Ncat: bind to :::62502: Address
46+ already in use. QUITTING. ]
47+```
48+
49+This patch fixes the issue by removing the `nc &` command from the
50+section whose output gets redirected to `$pidfile`. Now, only the `nc`
51+PID is echoed to `$pidfile`.
52+
53+Resolves: RHBZ#1850778
54+Resolves: RHBZ#1850779
55+
56+Author: Reid wahl <nrwahl@protonmail.com>
57+Origin: upstream, https://github.com/ClusterLabs/resource-agents/commit/d22700fc
58+Reviewed-by: Rafael David Tinoco <rafaeldtinoco@ubuntu.com>
59+Last-Update: 2020-10-23
60+---
61+ heartbeat/azure-lb | 3 ++-
62+ 1 file changed, 2 insertions(+), 1 deletion(-)
63+
64+diff --git a/heartbeat/azure-lb b/heartbeat/azure-lb
65+index 81fbc62..b35fc2c 100755
66+--- a/heartbeat/azure-lb
67++++ b/heartbeat/azure-lb
68+@@ -103,7 +103,8 @@ lb_start() {
69+ if ! lb_monitor; then
70+ ocf_log debug "Starting $process: $cmd"
71+ # Execute the command as created above
72+- eval "$cmd & echo \$!" > $pidfile
73++ $cmd &
74++ echo $! > $pidfile
75+ if lb_monitor; then
76+ ocf_log debug "$process: $cmd started successfully, calling monitor"
77+ lb_monitor
78+--
79+2.17.1
80+
81diff --git a/debian/patches/series b/debian/patches/series
82index d4e9090..3ebc208 100644
83--- a/debian/patches/series
84+++ b/debian/patches/series
85@@ -6,3 +6,4 @@ ocft-configs.patch
86 gitignore.patch
87 reproducible.patch
88 var-run.patch
89+lp1895343-01-azure-lb-Dont-redirect-nc-listener-output-to-pidfile.patch

Subscribers

People subscribed via source and target branches