Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1595422 - RFE: ability to clear stonith history
Summary: RFE: ability to clear stonith history
Status: ON_QA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: pacemaker
Version: 7.6
Hardware: Unspecified
OS: Unspecified
Target Milestone: rc
: 7.7
Assignee: Klaus Wenninger
QA Contact:
Depends On:
Blocks: 1461964 1595444 1608369 1620190
TreeView+ depends on / blocked
Reported: 2018-06-26 21:52 UTC by Ken Gaillot
Modified: 2019-03-25 13:43 UTC (History)
5 users (show)

Fixed In Version: pacemaker-1.1.20-1.el7
Doc Type: No Doc Update
Doc Text:
The relevant pcs functionality should be documented instead.
Clone Of:
: 1595444 (view as bug list)
Last Closed:
Target Upstream Version:

Attachments (Terms of Use)

Description Ken Gaillot 2018-06-26 21:52:21 UTC
Description of problem: Pacemaker's fence daemon tracks a history of all fence actions (pending, successful, and failed) taken, which can be displayed by the stonith_admin --history command, and soon by crm_mon (pcs status). However there is no way to clear the history, which will be especially relevant if showing fence failures becomes the default in crm_mon as expected.

A possible interface is a new stonith_admin option, e.g. --clear-history. It may be worthwhile to accept an optional argument "failures" or "all" (defaulting to "all"), or perhaps "all" should be the only behavior.

Comment 4 Ken Gaillot 2019-01-15 16:48:30 UTC
QA: The interface implemented is:

 stonith_admin --cleanup --history=NODE

where NODE can be a particular node name or '*' to clean all.

Comment 5 Patrik Hagara 2019-03-20 10:53:04 UTC
a few questions regarding the expected behavior:

  * the command `stonith_admin --cleanup --history node-01` should remove all recorded fence events (pending, successful and failed) from all the cluster nodes -- ie. running `stonith_admin --history node-01` afterwards from any node should show nothing, right? (and ofc, the history should not reappear after being deleted, ie. be re-synced via the mechanism from bz#1555938)

  * since the history cleanup command is supposed to remove all fence events, including pending ones, does that not interfere with cluster state transitions as calculated by pengine? assuming the stonith history is just a copy of that information and deleting it has no effect on cluster behavior -- wouldn't that prevent users from seeing the pending fence actions after clearing stonith history?

Comment 6 Klaus Wenninger 2019-03-20 12:18:41 UTC
--cleanup isn't gonna delete any pending entries as there is no separate tables for user-query and cluster behaviour.
The history is deleted on the current partition. So in theory it would be possible that the history persists on a node that wasn't part of the partition the stonith_admin-command was issued. And of course this could be synced back later on when the cluster isn't partitioned anymore.
The syncing results in all nodes of the partition (at the time the stonith_admin-command is issued) getting a superposition of all history entries available within this partition.
As there is a theoretical risk for the combination of these mechanisms leading to long history records the length of these records is trimmed to the most recent 500 events.

Comment 7 Patrik Hagara 2019-03-20 12:25:19 UTC

reproducer in comment#4 and corner cases to check in comment#5 and comment#6

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