ERROR: node.status-attr: Expected (node cmd attr [value]), takes at least 3 arguments (1 given)

Bug #1972022 reported by Felipe Reyes
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack HA Cluster Charm
Fix Committed
Undecided
Unassigned

Bug Description

Running the `pause` action on jammy fails with the following output:

$ juju run-action --wait hacluster/0 pause
unit-hacluster-0:
  UnitId: hacluster/0
  id: "4"
  message: Command '['crm', 'node', 'status', 'juju-47672c-zaza-1aedb14e2d72-4']'
    returned non-zero exit status 1.
  results:
    Stderr: |
      ERROR: node.status-attr: Expected (node cmd attr [value]), takes at least 3 arguments (1 given)
  status: failed
  timing:
    completed: 2022-05-06 20:00:16 +0000 UTC
    enqueued: 2022-05-06 20:00:15 +0000 UTC
    started: 2022-05-06 20:00:15 +0000 UTC

crmsh removed the command "crm node status" - https://github.com/ClusterLabs/crmsh/pull/753

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-hacluster (master)
Changed in charm-hacluster:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-hacluster (master)

Reviewed: https://review.opendev.org/c/openstack/charm-hacluster/+/840994
Committed: https://opendev.org/openstack/charm-hacluster/commit/1347ea00c1627566d5c9ed3efadb098a52d42c23
Submitter: "Zuul (22348)"
Branch: master

commit 1347ea00c1627566d5c9ed3efadb098a52d42c23
Author: Felipe Reyes <email address hidden>
Date: Fri May 6 17:33:51 2022 -0400

    Drop the use of 'crm node status' on jammy.

    The version of crmsh available on jammy doesn't have the 'crm node
    status' subcommand available since it was removed[0], this change uses
    the command 'crm node attribute' to figure out if the node is in standby
    mode when running on ubuntu>=jammy, and 'crm node show' to get the list
    of nodes.

    [0] https://github.com/ClusterLabs/crmsh/pull/753

    Change-Id: Iafb711be220573cb701527ec84de285edd8942cf
    Closes-Bug: #1972022

Changed in charm-hacluster:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to charm-hacluster (stable/jammy)

Fix proposed to branch: stable/jammy
Review: https://review.opendev.org/c/openstack/charm-hacluster/+/852578

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to charm-hacluster (master)

Related fix proposed to branch: master
Review: https://review.opendev.org/c/openstack/charm-hacluster/+/854651

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to charm-hacluster (stable/jammy)

Related fix proposed to branch: stable/jammy
Review: https://review.opendev.org/c/openstack/charm-hacluster/+/854652

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to charm-hacluster (master)

Reviewed: https://review.opendev.org/c/openstack/charm-hacluster/+/854651
Committed: https://opendev.org/openstack/charm-hacluster/commit/4e53bea0769d6c8c37e1e2a612c191961e738222
Submitter: "Zuul (22348)"
Branch: master

commit 4e53bea0769d6c8c37e1e2a612c191961e738222
Author: Felipe Reyes <email address hidden>
Date: Thu Aug 25 12:13:33 2022 -0400

    Fix 'crm node show' parsing to get list of nodes.

    The command 'crm node show' is used on jammy to retrieve the list of
    nodes defined in a cluster, although this command also includes the
    properties set on a node (e.g. standby=off) which breaks the current
    logic parsing.

    This change uses a regular expresion to filter out all the lines from
    the output that don't start with a non-white character (^\S+).

    Change-Id: I3e00daa1b877a7faae1370f08b2d9c5bd7795c5f
    Closes-Bug: #1987685
    Related-Bug: #1972022

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to charm-hacluster (stable/jammy)

Reviewed: https://review.opendev.org/c/openstack/charm-hacluster/+/852578
Committed: https://opendev.org/openstack/charm-hacluster/commit/a45438b3fa93772e558275d058088ab0cfd033b0
Submitter: "Zuul (22348)"
Branch: stable/jammy

commit a45438b3fa93772e558275d058088ab0cfd033b0
Author: Felipe Reyes <email address hidden>
Date: Fri May 6 17:33:51 2022 -0400

    Drop the use of 'crm node status' on jammy.

    The version of crmsh available on jammy doesn't have the 'crm node
    status' subcommand available since it was removed[0], this change uses
    the command 'crm node attribute' to figure out if the node is in standby
    mode when running on ubuntu>=jammy, and 'crm node show' to get the list
    of nodes.

    [0] https://github.com/ClusterLabs/crmsh/pull/753

    Change-Id: Iafb711be220573cb701527ec84de285edd8942cf
    Closes-Bug: #1972022
    (cherry picked from commit 1347ea00c1627566d5c9ed3efadb098a52d42c23)

tags: added: in-stable-jammy
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to charm-hacluster (stable/jammy)

Reviewed: https://review.opendev.org/c/openstack/charm-hacluster/+/854652
Committed: https://opendev.org/openstack/charm-hacluster/commit/a2ed86b295cb445f5f1d1a4eee0127f34d6073a1
Submitter: "Zuul (22348)"
Branch: stable/jammy

commit a2ed86b295cb445f5f1d1a4eee0127f34d6073a1
Author: Felipe Reyes <email address hidden>
Date: Thu Aug 25 12:13:33 2022 -0400

    Fix 'crm node show' parsing to get list of nodes.

    The command 'crm node show' is used on jammy to retrieve the list of
    nodes defined in a cluster, although this command also includes the
    properties set on a node (e.g. standby=off) which breaks the current
    logic parsing.

    This change uses a regular expresion to filter out all the lines from
    the output that don't start with a non-white character (^\S+).

    Change-Id: I3e00daa1b877a7faae1370f08b2d9c5bd7795c5f
    Closes-Bug: #1987685
    Related-Bug: #1972022
    (cherry picked from commit 4e53bea0769d6c8c37e1e2a612c191961e738222)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.