Skip to content

Commit

Permalink
Merge pull request #2090 from clumens/bundle-display-2.0
Browse files Browse the repository at this point in the history
Fix: scheduler: Add the node name back to bundle instances.
  • Loading branch information
kgaillot committed Jun 8, 2020
2 parents 0db37d6 + e5bb6f1 commit 44045c0
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 11 deletions.
10 changes: 5 additions & 5 deletions cts/cli/regression.crm_mon.exp
Original file line number Diff line number Diff line change
Expand Up @@ -623,8 +623,8 @@ Active Resources:
* Started: [ cluster01 ]
* Fencing (stonith:fence_xvm): Started cluster01
* Container bundle set: httpd-bundle [pcmk:http]:
* httpd-bundle-0 (192.168.122.131) (ocf::heartbeat:apache): Started
* httpd-bundle-1 (192.168.122.132) (ocf::heartbeat:apache): Stopped
* httpd-bundle-0 (192.168.122.131) (ocf::heartbeat:apache): Started cluster02
* httpd-bundle-1 (192.168.122.132) (ocf::heartbeat:apache): Stopped cluster01
=#=#=#= End test: Text output of partially active resources - OK (0) =#=#=#=
* Passed: crm_mon - Text output of partially active resources
=#=#=#= Begin test: XML output of partially active resources =#=#=#=
Expand Down Expand Up @@ -757,8 +757,8 @@ Full List of Resources:
* Stopped: [ cluster02 ]
* Fencing (stonith:fence_xvm): Started cluster01
* Container bundle set: httpd-bundle [pcmk:http]:
* httpd-bundle-0 (192.168.122.131) (ocf::heartbeat:apache): Started
* httpd-bundle-1 (192.168.122.132) (ocf::heartbeat:apache): Stopped
* httpd-bundle-0 (192.168.122.131) (ocf::heartbeat:apache): Started cluster02
* httpd-bundle-1 (192.168.122.132) (ocf::heartbeat:apache): Stopped cluster01
=#=#=#= End test: Text output of partially active resources, with inactive resources - OK (0) =#=#=#=
* Passed: crm_mon - Text output of partially active resources, with inactive resources
=#=#=#= Begin test: Text output of partially active resources, with inactive resources, filtered by node =#=#=#=
Expand All @@ -778,7 +778,7 @@ Full List of Resources:
* Started: [ cluster01 ]
* Fencing (stonith:fence_xvm): Started cluster01
* Container bundle set: httpd-bundle [pcmk:http]:
* httpd-bundle-1 (192.168.122.132) (ocf::heartbeat:apache): Stopped
* httpd-bundle-1 (192.168.122.132) (ocf::heartbeat:apache): Stopped cluster01
=#=#=#= End test: Text output of partially active resources, with inactive resources, filtered by node - OK (0) =#=#=#=
* Passed: crm_mon - Text output of partially active resources, with inactive resources, filtered by node
=#=#=#= Begin test: Text output of partially active resources, filtered by node =#=#=#=
Expand Down
20 changes: 14 additions & 6 deletions lib/pengine/bundle.c
Original file line number Diff line number Diff line change
Expand Up @@ -1563,9 +1563,8 @@ pe__bundle_xml(pcmk__output_t *out, va_list args)

static void
pe__bundle_replica_output_html(pcmk__output_t *out, pe__bundle_replica_t *replica,
long options)
pe_node_t *node, long options)
{
pe_node_t *node = NULL;
pe_resource_t *rsc = replica->child;

int offset = 0;
Expand Down Expand Up @@ -1647,7 +1646,12 @@ pe__bundle_html(pcmk__output_t *out, va_list args)

out->end_list(out);
} else {
pe__bundle_replica_output_html(out, replica, options);
if (pcmk__rsc_is_filtered(replica->container, only_show)) {
continue;
}

pe__bundle_replica_output_html(out, replica, pe__current_node(replica->container),
options);
}

pcmk__output_xml_pop_parent(out);
Expand All @@ -1659,9 +1663,8 @@ pe__bundle_html(pcmk__output_t *out, va_list args)

static void
pe__bundle_replica_output_text(pcmk__output_t *out, pe__bundle_replica_t *replica,
long options)
pe_node_t *node, long options)
{
pe_node_t *node = NULL;
pe_resource_t *rsc = replica->child;

int offset = 0;
Expand Down Expand Up @@ -1739,7 +1742,12 @@ pe__bundle_text(pcmk__output_t *out, va_list args)

out->end_list(out);
} else {
pe__bundle_replica_output_text(out, replica, options);
if (pcmk__rsc_is_filtered(replica->container, only_show)) {
continue;
}

pe__bundle_replica_output_text(out, replica, pe__current_node(replica->container),
options);
}
}

Expand Down

0 comments on commit 44045c0

Please sign in to comment.