This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
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 2000595 - crm_mon -1 sometimes report only part information
Summary: crm_mon -1 sometimes report only part information
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: pacemaker
Version: 8.5
Hardware: All
OS: All
medium
low
Target Milestone: rc
: 8.10
Assignee: Reid Wahl
QA Contact: cluster-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-09-02 13:11 UTC by tbsky
Modified: 2023-09-22 19:16 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: When a node joined the cluster, Pacemaker previously erased its known resource history and updated it with the current known status in two separate steps. Consequence: If "pcs status" were run between the two steps, it would wrongly appear that no resources were active on the joining node. Fix: The erase and update are now done in a single CIB modification. Result: "pcs status" always shows the correct known state
Clone Of:
Environment:
Last Closed: 2023-09-22 19:16:10 UTC
Type: Bug
Target Upstream Version: 2.1.7
Embargoed:


Attachments (Terms of Use)
bad situation log file (1.55 KB, text/plain)
2021-09-02 13:11 UTC, tbsky
no flags Details
normal log file (2.13 KB, text/plain)
2021-09-02 13:11 UTC, tbsky
no flags Details
server 1 log (1.24 MB, text/plain)
2021-09-10 01:55 UTC, tbsky
no flags Details
server 2(dc) log (1.68 MB, text/plain)
2021-09-10 01:56 UTC, tbsky
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker   RHEL-7646 0 None Migrated None 2023-09-22 19:16:14 UTC
Red Hat Issue Tracker RHELPLAN-95999 0 None None None 2021-09-02 13:12:06 UTC

Description tbsky 2021-09-02 13:11:00 UTC
Created attachment 1820041 [details]
bad situation log file

Description of problem:
I have scripts which use 'crm_non -1'. and sometimes the script failed. after debugging I found sometimes 'crm_mon -1' didn't report full information

Version-Release number of selected component (if applicable):
pacemaker-cli-2.1.0-8.el8.x86_64


How reproducible:
sometimes

Steps to Reproduce:
1. do some change to cluster configuration
2. run 'crm_mon -1' to get the cluster status
3.

Actual results:
sometimes the report is not full, only part of information

Expected results:
full correct information

Additional info:
I notice when the report time of "Last updated:" and "Last change:" are the same or very close, then it may trigger the problem.

please check attachment which shows the "good" and "bad" report.

Comment 1 tbsky 2021-09-02 13:11:41 UTC
Created attachment 1820042 [details]
normal log file

Comment 2 Ken Gaillot 2021-09-03 19:14:26 UTC
Hi,

What exactly is partial in the bad output? Are there resources or clone instances missing that should be active?

Comment 3 tbsky 2021-09-04 01:50:51 UTC
(In reply to Ken Gaillot from comment #2)
> Hi,
> 
> What exactly is partial in the bad output? Are there resources or clone
> instances missing that should be active?

please check attachment which shows the "good" and "bad" report. the bad report is miss half lines of resource status.

Comment 4 tbsky 2021-09-04 01:57:15 UTC
(In reply to tbsky from comment #3)
> (In reply to Ken Gaillot from comment #2)
> > Hi,
> > 
> > What exactly is partial in the bad output? Are there resources or clone
> > instances missing that should be active?
> 
> please check attachment which shows the "good" and "bad" report. the bad
> report is miss half lines of resource status.

Actually you can see that in the bad report, the resources which are running at "love-2-test.example.com" are gone. only resources which are running at "love-1-test.example.com" left.

Comment 5 Ken Gaillot 2021-09-09 22:13:21 UTC
Would you be able to attach /var/log/pacemaker/pacemaker.log from both nodes from the time of the failure (Sep 2, which might be rotated)?

Comment 6 tbsky 2021-09-10 01:55:40 UTC
Created attachment 1821932 [details]
server 1 log

Comment 7 tbsky 2021-09-10 01:56:44 UTC
Created attachment 1821933 [details]
server 2(dc) log

Comment 8 tbsky 2021-09-10 01:58:30 UTC
Hi:
   attached pacemaker logs. hope they can reveal something.

Comment 9 Ken Gaillot 2021-09-10 19:40:13 UTC
Thanks for the logs.

When a node joins the cluster's controller group, the DC clears its previous resource history and adds the current history state as given in the join message. The problem is that the DC does this in two separate CIB requests, and if the crm_mon happens to run between the two, it will see no resource history for the joining node.

The solution will be to consolidate these into a single CIB request (which will require coding some new capabilities in the CIB). We can use this bz to track that fix.

Separately, in the attached logs, your cluster is more likely to hit this because the nodes are continuously starting new DC elections due to the CIB being replaced. It appears something is repeatedly changing the configuration during this time with the cibadmin tool (or a wrapper such as pcs). Examples of the changes:

    Sep 02 20:41:16 love-1-test.example.com pacemaker-based     [2781] (cib_perform_op)     info: -- /cib/configuration/constraints/rsc_location[@id='location-kvm-11-love-2-test.example.com-99']
    ...
    Sep 02 20:41:17 love-1-test.example.com pacemaker-based     [2781] (cib_perform_op)     info: ++ /cib/configuration/constraints:  <rsc_location id="location-kvm-11-love-1-test.example.com-99" node="love-1-test.example.com" rsc="kvm-11" score="99"/>
    ...
    Sep 02 20:42:05 love-1-test.example.com pacemaker-based     [2781] (cib_perform_op)     info: +  /cib/configuration/resources/clone[@id='kvm-11-drbd-clone']/meta_attributes[@id='kvm-11-drbd-clone-meta_attributes']/nvpair[@id='kvm-11-drbd-clone-meta_attributes-promoted-max']:  @value=2
    ...
    Sep 02 20:42:08 love-1-test.example.com pacemaker-based     [2781] (cib_perform_op)     info: +  /cib/configuration/resources/primitive[@id='kvm-11']/meta_attributes[@id='kvm-11-meta_attributes']/nvpair[@id='kvm-11-meta_attributes-allow-migrate']:  @value=true

and so on. If the CIB is simply modified (cibadmin --modify/--delete), no election is needed, but if the entire CIB is replaced (--replace, which I believe pcs uses), the nodes may have changed, so a new DC election is needed. The new election triggers the erasing and resetting of the resource history. It might be possible for us to avoid calling a new election if the nodes have not changed, but I'm not sure that's doable in a reliable and quick way.

The first thing I'd do is identify what's changing the configuration. Then there may be an obvious way to mitigate the issue.

Comment 10 tbsky 2021-09-11 01:01:27 UTC
Thanks for the detailed explain. 

Indeed I use pcs to manage the whole cluster, but sometimes something may go wrong and not repeatable. so I decide to write a testing script which create/delete/migrate drbd/vm resources(mostly with pcs command). the testing script result is highly unstable, the cluster sometimes reports failed resource without any reason. I don't know what's wrong since there are many other elements involved like libvirtd,drbd and their resource agents. the only thing I am sure is that "crm_mon -1" should be related to pacemaker so I report it.

now I doubt all these come from the same source as you described. 

among all these situation, "vm migration failed" annoys me most. I can see migration succeed logs in the first server, but suddenly peer server decide the resource "cannot run anywhere" and the vm resource need to destroy at both servers. the behavior is not repeatable every time, so I spent weeks trying to find out what's the racing. I will try to modify the test script to see if I can get stable result.

thanks again for your kindly help!

Comment 11 Reid Wahl 2022-12-22 01:18:56 UTC
(In reply to Ken Gaillot from comment #9)
> Separately, in the attached logs, your cluster is more likely to hit this
> because the nodes are continuously starting new DC elections due to the CIB
> being replaced. It appears something is repeatedly changing the
> configuration during this time with the cibadmin tool (or a wrapper such as
> pcs). Examples of the changes:
> ...
> 
> and so on. If the CIB is simply modified (cibadmin --modify/--delete), no
> election is needed, but if the entire CIB is replaced (--replace, which I
> believe pcs uses), the nodes may have changed, so a new DC election is
> needed. The new election triggers the erasing and resetting of the resource
> history. It might be possible for us to avoid calling a new election if the
> nodes have not changed, but I'm not sure that's doable in a reliable and
> quick way.

This part might be fixed upstream already by f522821.
  - Mid: based controld: Suppresses unnecessary Election execution. (https://github.com/ClusterLabs/pacemaker/pull/2547/commits/f522821)

Comment 12 Reid Wahl 2022-12-22 01:24:47 UTC
(In reply to Reid Wahl from comment #11)
> This part might be fixed upstream already by f522821.
>   - Mid: based controld: Suppresses unnecessary Election execution.
> (https://github.com/ClusterLabs/pacemaker/pull/2547/commits/f522821)

Depends on the specifics. `pcs` often replaces only the configuration but will replace the entire CIB if `pcs cluster cib-push` is run without `--config` or `--scope configuration`.

Comment 14 RHEL Program Management 2023-03-02 07:27:49 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.

Comment 16 Ken Gaillot 2023-06-15 16:27:06 UTC
Fixed in upstream main branch as of commit 5e3b3d142

Comment 19 RHEL Program Management 2023-09-02 07:28:13 UTC
After evaluating this issue, there are no plans to address it further or fix it in an upcoming release.  Therefore, it is being closed.  If plans change such that this issue will be fixed in an upcoming release, then the bug can be reopened.

Comment 20 Reid Wahl 2023-09-02 21:31:34 UTC
Reopening because this is fixed as mentioned in comment 16.

Comment 22 Reid Wahl 2023-09-02 21:33:41 UTC
(In reply to Reid Wahl from comment #20)
> Reopening because this is fixed as mentioned in comment 16.

5e3b3d142 introduced a regression though, so a fix would need the commits in https://github.com/ClusterLabs/pacemaker/pull/3180/commits as well. At least through 44c51814, but we should grab them all to be safe.

Comment 23 RHEL Program Management 2023-09-22 19:15:28 UTC
Issue migration from Bugzilla to Jira is in process at this time. This will be the last message in Jira copied from the Bugzilla bug.

Comment 24 RHEL Program Management 2023-09-22 19:16:10 UTC
This BZ has been automatically migrated to the issues.redhat.com Red Hat Issue Tracker. All future work related to this report will be managed there.

Due to differences in account names between systems, some fields were not replicated.  Be sure to add yourself to Jira issue's "Watchers" field to continue receiving updates and add others to the "Need Info From" field to continue requesting information.

To find the migrated issue, look in the "Links" section for a direct link to the new issue location. The issue key will have an icon of 2 footprints next to it, and begin with "RHEL-" followed by an integer.  You can also find this issue by visiting https://issues.redhat.com/issues/?jql= and searching the "Bugzilla Bug" field for this BZ's number, e.g. a search like:

"Bugzilla Bug" = 1234567

In the event you have trouble locating or viewing this issue, you can file an issue by sending mail to rh-issues. You can also visit https://access.redhat.com/articles/7032570 for general account information.


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