Merge ~athos-ribeiro/ubuntu/+source/crmsh:fix-crmadmin-output into ubuntu/+source/crmsh:ubuntu/kinetic-devel

Proposed by Athos Ribeiro
Status: Merged
Approved by: git-ubuntu bot
Approved revision: not available
Merged at revision: fc264cf74f4cb906b9c9ad6c6393c4b70d4ef5f6
Proposed branch: ~athos-ribeiro/ubuntu/+source/crmsh:fix-crmadmin-output
Merge into: ubuntu/+source/crmsh:ubuntu/kinetic-devel
Diff against target: 65 lines (+43/-0)
3 files modified
debian/changelog (+7/-0)
debian/patches/lp1972730.patch (+35/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
git-ubuntu bot Approve
Bryce Harrington (community) Approve
Canonical Server Reporter Pending
Review via email: mp+440285@code.launchpad.net

This proposal supersedes a proposal from 2023-04-04.

Description of the change

SRU proposed in LP: #1972730.

PPA: https://launchpad.net/~athos-ribeiro/+archive/ubuntu/lp1972730-crmsh/+packages

DEP8 test suite local run result summary:

autopkgtest [12:21:24]: @@@@@@@@@@@@@@@@@@@@ summary
command1 PASS
command2 PASS
command3 PASS
utils.sh PASS
testsuite.sh PASS
pacemaker-basic-resource.sh PASS
pacemaker-node-status.sh PASS
pacemaker-cluster-init.sh PASS

To post a comment you must log in.
Revision history for this message
Bryce Harrington (bryce) wrote :

Just one issue needing fixed: the version number should be 4.4.0-1ubuntu1.1.

I triggered the autopkgtests, and they passed no prob:

    04.04.23 01:29:56 Log 🗒️ ✅ Triggers: crmsh/4.4.0-1ubuntu2~ppa1
    05.04.23 04:07:33 Log 🗒️ ✅ Triggers: crmsh/4.4.0-1ubuntu2~ppa1
  crmsh @ arm64:
    05.04.23 04:26:31 Log 🗒️ ✅ Triggers: crmsh/4.4.0-1ubuntu2~ppa1
  crmsh @ armhf:
    05.04.23 04:34:04 Log 🗒️ ✅ Triggers: crmsh/4.4.0-1ubuntu2~ppa1
  crmsh @ ppc64el:
    05.04.23 04:01:46 Log 🗒️ ✅ Triggers: crmsh/4.4.0-1ubuntu2~ppa1
  crmsh @ s390x:
    05.04.23 04:39:47 Log 🗒️ ✅ Triggers: crmsh/4.4.0-1ubuntu2~ppa1

Oddly, I also ran the autopkgtest locally, but it hit a failure:

autopkgtest [04:01:13]: @@@@@@@@@@@@@@@@@@@@ summary
command1 PASS
command2 PASS
command3 PASS
utils.sh FAIL non-zero exit status 1
testsuite.sh PASS
pacemaker-basic-resource.sh PASS
pacemaker-node-status.sh PASS
pacemaker-cluster-init.sh PASS

autopkgtest [03:54:16]: test utils.sh: [-----------------------
+ export LC_ALL=C
+ PKG=vim
+ dpkg --purge vim
dpkg: dependency problems prevent removal of vim:
 ubuntu-server depends on vim.

dpkg: error processing package vim (--purge):
 dependency problems - not removing
Errors were encountered while processing:
 vim
autopkgtest [03:54:16]: test utils.sh: -----------------------]
autopkgtest [03:54:17]: test utils.sh: - - - - - - - - - - results - - - - - - - - - -
utils.sh FAIL non-zero exit status 1

(I guess since I was running it in a non-ephemeral container, dpkg refused to let vim be purged. I guess that's ok, just odd.)

The patch itself LGTM, and matches what was landed upstream.

So, other than the version number the packaging all LGTM, and once that is fixed count this as approved.

### SRU text review ###

  - [impact] -> [Impact]

  - "is necessary" -> "it is necessary"

  - "in maintenance mode" -> "into maintenance mode"

I would not use paste.ubuntu.com for providing sample configs. Instead, save that to a file and upload it to the bug report as an attachment, then refer to it by the comment id# or a direct link.

I don't have juju installed on my desktop, so to make the SRU test case more paint by numbers it might be good to also include the install & setup steps. (Or, is there a simpler way to reproduce the failing without involving juju?)

I feel like there could be more to be said in [Where problems could occur] in relation to how crmadmin's output could vary, but I don't have actual suggestions there. For example, maybe an example of what the crmadmin stdout used to look like, how that has caused problems, or how the format has changed.

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

Thanks, Bryce!

> So, other than the version number the packaging all LGTM, and once that is fixed count this as approved.

In that case, I fixed it and uploaded the package.

> ### SRU text review ###

Thanks!

I addressed the minor issues (grammar and style) and pinged Felipe, who was originally driving this SRU, to check if he'd like to address the bigger ones (juju test plan and "where problems could occur")

Revision history for this message
Bryce Harrington (bryce) wrote :

Sounds good!

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

Approvers: athos-ribeiro, bryce
Uploaders: athos-ribeiro, bryce
MP auto-approved

review: Approve

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 7a719dc..c5b81d3 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,10 @@
6+crmsh (4.4.0-1ubuntu1.1) kinetic; urgency=medium
7+
8+ * d/p/lp1972730.patch: Handle the output of 'crmadmin -S' correctly.
9+ (LP: #1972730)
10+
11+ -- Athos Ribeiro <athos.ribeiro@canonical.com> Mon, 03 Apr 2023 21:06:53 -0300
12+
13 crmsh (4.4.0-1ubuntu1) kinetic; urgency=medium
14
15 * Merge with Debian unstable (LP: #1971271, #1972730). Remaining changes:
16diff --git a/debian/patches/lp1972730.patch b/debian/patches/lp1972730.patch
17new file mode 100644
18index 0000000..d8a9a58
19--- /dev/null
20+++ b/debian/patches/lp1972730.patch
21@@ -0,0 +1,35 @@
22+From f83aa41185dbc71a25a3def39d42356e503b1f96 Mon Sep 17 00:00:00 2001
23+From: liangxin1300 <XLiang@suse.com>
24+Date: Wed, 11 May 2022 11:09:28 +0800
25+Subject: [PATCH] Fix: utils: wait4dc: Make change since output of 'crmadmin -S' changed(bsc#1199412)
26+
27+Bug-Ubuntu: https://bugs.launchpad.net/ubuntu/+source/crmsh/+bug/1972730
28+Origin: upstream, https://github.com/ClusterLabs/crmsh/commit/50fe231d9ed188c8727d80bd7fb09d362c03ec32
29+Last-Update: 2023-04-03
30+---
31+ crmsh/utils.py | 11 +++--------
32+ 1 file changed, 3 insertions(+), 8 deletions(-)
33+
34+diff --git a/crmsh/utils.py b/crmsh/utils.py
35+index 9f2603a12..9ebce28fc 100644
36+--- a/crmsh/utils.py
37++++ b/crmsh/utils.py
38+@@ -895,15 +895,10 @@ def wait4dc(what="", show_progress=True):
39+ return False
40+ cmd = "crmadmin -S %s" % dc
41+ rc, s = get_stdout(add_sudo(cmd))
42+- if not s.startswith("Status"):
43+- logger.warning("%s unexpected output: %s (exit code: %d)", cmd, s, rc)
44+- return False
45+- try:
46+- dc_status = s.split()[-2]
47+- except:
48+- logger.warning("%s unexpected output: %s", cmd, s)
49++ if rc != 0:
50++ logger.error("Exit code of command {} is {}".format(cmd, rc))
51+ return False
52+- if dc_status == "S_IDLE":
53++ if re.search("S_IDLE.*ok", s):
54+ if output_started:
55+ sys.stderr.write(" done\n")
56+ return True
57diff --git a/debian/patches/series b/debian/patches/series
58index 761b4a9..0f8a51d 100644
59--- a/debian/patches/series
60+++ b/debian/patches/series
61@@ -11,3 +11,4 @@
62 0015-Fix-testsuite-errors.patch
63 0016-Fix-python2-calls.patch
64 0017-Fix-profiles-adoc.patch
65+lp1972730.patch

Subscribers

People subscribed via source and target branches