Merge ~michal-maloszewski99/ubuntu/+source/resource-agents:wal-postgresql-jammy-lp2013084 into ubuntu/+source/resource-agents:ubuntu/jammy-devel

Proposed by Michał Małoszewski
Status: Merged
Approved by: git-ubuntu bot
Approved revision: not available
Merged at revision: 4b250e0e0c7e1e855c9acd2ce1a8b81b4853dfa8
Proposed branch: ~michal-maloszewski99/ubuntu/+source/resource-agents:wal-postgresql-jammy-lp2013084
Merge into: ubuntu/+source/resource-agents:ubuntu/jammy-devel
Diff against target: 60 lines (+38/-0)
3 files modified
debian/changelog (+8/-0)
debian/patches/pgsql-heartbeat-postgresql-issue-jammy.patch (+29/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
git-ubuntu bot Approve
Athos Ribeiro (community) Approve
Canonical Server Reporter Pending
Review via email: mp+442253@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Michał Małoszewski (michal-maloszewski99) wrote :

Results: (from http://autopkgtest.ubuntu.com/results/autopkgtest-jammy-michal-maloszewski99-jammy-wal-receiver-naming-lp-2013084/?format=plain)
  resource-agents @ amd64:
    http://autopkgtest.ubuntu.com/results/autopkgtest-jammy-michal-maloszewski99-jammy-wal-receiver-naming-lp-2013084/jammy/amd64/r/resource-agents/20230503_102034_4bf00@/log.gz
    03.05.23 10:20:34 ✅ Triggers: resource-agents/1:4.7.0-1ubuntu7.2~ppa1
  resource-agents @ arm64:
    http://autopkgtest.ubuntu.com/results/autopkgtest-jammy-michal-maloszewski99-jammy-wal-receiver-naming-lp-2013084/jammy/arm64/r/resource-agents/20230503_104008_dc154@/log.gz
    03.05.23 10:40:08 ✅ Triggers: resource-agents/1:4.7.0-1ubuntu7.2~ppa1
  resource-agents @ armhf:
    http://autopkgtest.ubuntu.com/results/autopkgtest-jammy-michal-maloszewski99-jammy-wal-receiver-naming-lp-2013084/jammy/armhf/r/resource-agents/20230503_100334_25e5b@/log.gz
    03.05.23 10:03:34 ✅ Triggers: resource-agents/1:4.7.0-1ubuntu7.2~ppa1
    http://autopkgtest.ubuntu.com/results/autopkgtest-jammy-michal-maloszewski99-jammy-wal-receiver-naming-lp-2013084/jammy/armhf/r/resource-agents/20230503_100354_7245f@/log.gz
    03.05.23 10:03:54 ✅ Triggers: resource-agents/1:4.7.0-1ubuntu7.2~ppa1
  resource-agents @ ppc64el:
    http://autopkgtest.ubuntu.com/results/autopkgtest-jammy-michal-maloszewski99-jammy-wal-receiver-naming-lp-2013084/jammy/ppc64el/r/resource-agents/20230503_101310_11793@/log.gz
    03.05.23 10:13:10 ✅ Triggers: resource-agents/1:4.7.0-1ubuntu7.2~ppa1

Revision history for this message
Michał Małoszewski (michal-maloszewski99) wrote :

working on the sru template

Revision history for this message
Michał Małoszewski (michal-maloszewski99) wrote :

sru template attached to the bug report

Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

Thanks Michal! This is looking great so far :)

I added 2 comments below with some suggestions for your DEP3 headers.

Also, it would be nice to update the SRU template test plan in the "actual" and "expected" results to emphasize what kind of output the tester should expect. Should the running program fail in any of the cases? how would the failure manifest itself? What a successful run (fix) looks like?

review: Needs Information
Revision history for this message
Michał Małoszewski (michal-maloszewski99) wrote :

Hi Athos,

Thank you for taking a look.
DEP3 headers + SRU template (actual/expected result) changed.
It can be re-reviewed.

Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

Thanks, Michal! I added another inline comment and am discussing an SRU template snippet below:

> Actual result:

> After typing in: "ps -ef" the wal receiver process should be named "wal receiver process".

> Expected result:

> If the monitor function is triggered, then after typing in: "ps -ef" the wal receiver process should be named "walreceiver".

The patch is __not__ changing the name of the process at all. It changes the string that the pgsql monitor looks for, when monitoring the process. Therefore, using `ps` to describe actual/expected behaviors does not seem to be the best approach here.

Revision history for this message
Michał Małoszewski (michal-maloszewski99) wrote (last edit ):

Hi Athos, thanks for review update from you. I updated the patch according to the comment added inline.
Moreover, I brushed up a bit on the "results section" and yeah, indeed, the fix is about the monitor function as well, so it was hard for me to imagine a bit of the operation without performing test steps, but after the fix, the monitor function should operate correctly. I think that my sentences there now are better than the previous ones, and say the tester that the expected and actual problem is about the monitor function and that string which that function is looking for.

So it can be re-reviewed.

Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

Thanks Michal!

The patch LGTM. The SRU test plan could still be more descriptive, but I will leave that to the SRU team to decide (see https://bugs.launchpad.net/ubuntu/+source/resource-agents/+bug/2013084/comments/8).

review: Approve
Revision history for this message
git-ubuntu bot (git-ubuntu-bot) wrote :

Approvers: athos-ribeiro, michal-maloszewski99
Uploaders: athos-ribeiro
MP auto-approved

review: Approve
Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

On a second thought, before uploading this, it would be nice to double check the status of LP: #1981598 since there is an update in proposed there for a while now (https://ubuntu-archive-team.ubuntu.com/proposed-migration/jammy/update_excuses.html#resource-agents)

Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

To avoid blocking Michal any further, I uploaded this one:

Uploading to ubuntu (via ftp to upload.ubuntu.com):
  Uploading resource-agents_4.7.0-1ubuntu7.2.dsc: done.
  Uploading resource-agents_4.7.0-1ubuntu7.2.debian.tar.xz: done.
  Uploading resource-agents_4.7.0-1ubuntu7.2_source.buildinfo: done.
  Uploading resource-agents_4.7.0-1ubuntu7.2_source.changes: done.
Successfully uploaded packages.

Make sure to check the status of LP: #1981598. If this should override the update in proposed so both land in updates together, we will need a second upload to also include 4.7.0-1ubuntu7.1 changelog entries in our upload.

Revision history for this message
Michał Małoszewski (michal-maloszewski99) wrote :

Ok, I will track it. Thank you

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 9e1b55d..ddaf5de 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,11 @@
6+resource-agents (1:4.7.0-1ubuntu7.2) jammy; urgency=medium
7+
8+ * d/p/pgsql-heartbeat-postgresql-issue-jammy.patch: walreceiver name
9+ is changed to make the check for running wal receiver process
10+ compatible with PostgreSQL >= 11 (LP: #2013084)
11+
12+ -- Michal Maloszewski <michal.maloszewski@canonical.com> Wed, 03 May 2023 10:44:56 +0200
13+
14 resource-agents (1:4.7.0-1ubuntu7.1) jammy; urgency=medium
15
16 * d/control: breaks/replaces for file reorg (LP: #1981598)
17diff --git a/debian/patches/pgsql-heartbeat-postgresql-issue-jammy.patch b/debian/patches/pgsql-heartbeat-postgresql-issue-jammy.patch
18new file mode 100644
19index 0000000..8a0906a
20--- /dev/null
21+++ b/debian/patches/pgsql-heartbeat-postgresql-issue-jammy.patch
22@@ -0,0 +1,29 @@
23+From 214149d28142e4889e27f6637de8a8508c2f4d27 Mon Sep 17 00:00:00 2001
24+From: Andreas Ntaflos <andreas.ntaflos@rise-world.com>
25+Date: Thu, 24 Dec 2020 13:57:18 +0100
26+Subject: [PATCH] pgsql: make wal receiver check compatible with PostgreSQL >=
27+ 11
28+
29+In PostgreSQL 11 and later the wal receiver process is named
30+"walreceiver" instead of "wal receiver process". This change makes the
31+check for a running wal receiver process compatible with both variants.
32+
33+Origin: upstream, https://github.com/ClusterLabs/resource-agents/commit/214149d28142e4889e27f6637de8a8508c2f4d27
34+Bug: https://github.com/ClusterLabs/resource-agents/issues/1551
35+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/resource-agents/+bug/2013084
36+Last-Update: 2023-05-03
37+---
38+ heartbeat/pgsql | 2 +-
39+ 1 file changed, 1 insertion(+), 1 deletion(-)
40+
41+--- a/heartbeat/pgsql
42++++ b/heartbeat/pgsql
43+@@ -934,7 +934,7 @@
44+ local pgsql_real_monitor_status=$1
45+
46+ PID=`head -n 1 $PIDFILE`
47+- receiver_parent_pids=`ps -ef | tr -s " " | grep "[w]al receiver process" | cut -d " " -f 3`
48++ receiver_parent_pids=`ps -ef | tr -s " " | grep "[w]al\s*receiver" | cut -d " " -f 3`
49+
50+ if echo "$receiver_parent_pids" | grep -q -w "$PID" ; then
51+ attrd_updater -n "$PGSQL_WAL_RECEIVER_STATUS_ATTR" -v "normal" -q
52diff --git a/debian/patches/series b/debian/patches/series
53index d4e9090..2f239b8 100644
54--- a/debian/patches/series
55+++ b/debian/patches/series
56@@ -6,3 +6,4 @@ ocft-configs.patch
57 gitignore.patch
58 reproducible.patch
59 var-run.patch
60+pgsql-heartbeat-postgresql-issue-jammy.patch

Subscribers

People subscribed via source and target branches