RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 2003068 - [RFE] Provide add/remove syntax for command `pcs stonith update-scsi-devices` [rhel-8.6.0]
Summary: [RFE] Provide add/remove syntax for command `pcs stonith update-scsi-devices`...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: pcs
Version: 8.5
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: rc
: 8.6
Assignee: Miroslav Lisik
QA Contact: cluster-qe@redhat.com
URL:
Whiteboard:
Depends On: 1992668
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-09-10 10:45 UTC by RHEL Program Management Team
Modified: 2022-05-10 15:24 UTC (History)
11 users (show)

Fixed In Version: pcs-0.10.11-1.el8
Doc Type: Enhancement
Doc Text:
Feature: Provide add/remove syntax for command `pcs stonith update-scsi-devices` Reason: The add/remove syntax of the command is more comfortable for a user because it does not need to specify currently configured devices. Result: Command `pcs stonith update-scsi-devices` now supports add/remove syntax for updating fence scsi devices.
Clone Of: 1992668
Environment:
Last Closed: 2022-05-10 14:50:48 UTC
Type: ---
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
proposed fix + tests (205.64 KB, patch)
2021-09-24 14:16 UTC, Miroslav Lisik
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-96825 0 None None None 2021-09-10 10:49:31 UTC
Red Hat Knowledge Base (Solution) 4526971 0 None None None 2021-11-16 16:26:19 UTC
Red Hat Product Errata RHEA-2022:1978 0 None None None 2022-05-10 14:51:23 UTC

Comment 1 Miroslav Lisik 2021-09-24 14:16:47 UTC
Created attachment 1825906 [details]
proposed fix + tests

Updated command:
* pcs stonith update-scsi-devices

Test:
* setup a cluster with a fence scsi stonith resource
* setup resources running on each node
* update fence scsi devices using command `pcs stonith update-scsi-devices add <device>... remove <device>...
* check that resources were not restarted after update of devices

Comment 4 Miroslav Lisik 2021-11-02 09:24:19 UTC
DevTestResults:

[root@r8-node-01 ~]# rpm -q pcs
pcs-0.10.11-1.el8.x86_64

export disk1=/dev/disk/by-id/scsi-360014052bc36324cf7d4a709a959340b
export disk2=/dev/disk/by-id/scsi-3600140547721f8ee2774aa8bac6d8ebe

[root@r8-node-01 ~]# pcs stonith
  * fence-scsi  (stonith:fence_scsi):    Started r8-node-01
[root@r8-node-01 ~]# pcs stonith config
 Resource: fence-scsi (class=stonith type=fence_scsi)
  Attributes: devices=/dev/disk/by-id/scsi-360014052bc36324cf7d4a709a959340b pcmk_host_check=static-list pcmk_host_list="r8-node-01 r8-node-02 r8-node-03" pcmk_reboot_action=off
  Meta Attrs: provides=unfencing
  Operations: monitor interval=60s (fence-scsi-monitor-interval-60s)
[root@r8-node-01 ~]# pcs resource
  * d-01        (ocf::pacemaker:Dummy):  Started r8-node-02
  * d-02        (ocf::pacemaker:Dummy):  Started r8-node-03
  * d-03        (ocf::pacemaker:Dummy):  Started r8-node-01
  * d-04        (ocf::pacemaker:Dummy):  Started r8-node-02
  * d-05        (ocf::pacemaker:Dummy):  Started r8-node-03
  * d-06        (ocf::pacemaker:Dummy):  Started r8-node-01
[root@r8-node-01 ~]# sg_persist -n -i -k -d $disk2
  PR generation=0x0, there are NO registered reservation keys
[root@r8-node-01 ~]# pcs stonith update-scsi-devices fence-scsi add $disk2 remove $disk1
[root@r8-node-01 ~]# echo $?
0
[root@r8-node-01 ~]# pcs stonith config
 Resource: fence-scsi (class=stonith type=fence_scsi)
  Attributes: devices=/dev/disk/by-id/scsi-3600140547721f8ee2774aa8bac6d8ebe pcmk_host_check=static-list pcmk_host_list="r8-node-01 r8-node-02 r8-node-03" pcmk_reboot_action=off
  Meta Attrs: provides=unfencing
  Operations: monitor interval=60s (fence-scsi-monitor-interval-60s)

Scsi devices have been updated

[root@r8-node-01 ~]# journalctl -f -n0
-- Logs begin at Tue 2021-10-26 10:49:32 CEST. --
Oct 27 12:22:14 r8-node-01 kernel:  sdb: sdb1
Oct 27 12:22:14 r8-node-01 kernel:  sda: sda1
Oct 27 12:22:14 r8-node-01 pacemaker-fenced[11058]:  notice: Added 'fence-scsi' to device list (1 active device)
Oct 27 12:22:14 r8-node-01 pacemaker-controld[11062]:  notice: State transition S_IDLE -> S_POLICY_ENGINE
Oct 27 12:22:14 r8-node-01 pacemaker-schedulerd[11061]:  notice: Calculated transition 4, saving inputs in /var/lib/pacemaker/pengine/pe-input-819.bz2
Oct 27 12:22:14 r8-node-01 pacemaker-controld[11062]:  notice: Transition 4 (Complete=0, Pending=0, Fired=0, Skipped=0, Incomplete=0, Source=/var/lib/pacemaker/pengine/pe-input-819.bz2): Complete
Oct 27 12:22:14 r8-node-01 pacemaker-controld[11062]:  notice: State transition S_TRANSITION_ENGINE -> S_IDLE

[root@r8-node-02 ~]# journalctl -f -n0
-- Logs begin at Tue 2021-10-26 10:49:29 CEST. --
Oct 27 12:22:14 r8-node-02 kernel:  sdb: sdb1
Oct 27 12:22:14 r8-node-02 kernel:  sda: sda1
Oct 27 12:22:14 r8-node-02 pacemaker-fenced[6045]:  notice: Added 'fence-scsi' to device list (1 active device)

[root@r8-node-03 ~]# journalctl -f -n0
-- Logs begin at Tue 2021-10-26 10:49:26 CEST. --
Oct 27 12:22:14 r8-node-03 kernel:  sdb: sdb1
Oct 27 12:22:14 r8-node-03 kernel:  sda: sda1
Oct 27 12:22:14 r8-node-03 pacemaker-fenced[10780]:  notice: Added 'fence-scsi' to device list (1 active device)

No resources were restarted.

Comment 16 errata-xmlrpc 2022-05-10 14:50:48 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (pcs bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2022:1978


Note You need to log in before you can comment on or make changes to this bug.