From 97571e6ccc9b7fa339a7e27d9b0b9ab782ff3003 Mon Sep 17 00:00:00 2001 From: Chris Lumens Date: Wed, 16 Jun 2021 13:54:10 -0400 Subject: [PATCH 1/5] Low: schemas: Copy crm_mon.rng in preparation for changes. --- xml/api/crm_mon-2.12.rng | 243 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 243 insertions(+) create mode 100644 xml/api/crm_mon-2.12.rng diff --git a/xml/api/crm_mon-2.12.rng b/xml/api/crm_mon-2.12.rng new file mode 100644 index 0000000..ffec923 --- /dev/null +++ b/xml/api/crm_mon-2.12.rng @@ -0,0 +1,243 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + granted + revoked + + + + + + + + + + + + + + + + + + + + + -- 1.8.3.1 From da394983f106f974274ddd94675a04c85086010e Mon Sep 17 00:00:00 2001 From: Chris Lumens Date: Fri, 18 Jun 2021 15:06:34 -0400 Subject: [PATCH 2/5] Refactor: Split node history out into its own XML schema. This allows for sharing it between crm_mon and crm_simulate. --- xml/Makefile.am | 2 +- xml/api/crm_mon-2.12.rng | 64 +-------------------------------------- xml/api/node-history-2.12.rng | 70 +++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 72 insertions(+), 64 deletions(-) create mode 100644 xml/api/node-history-2.12.rng diff --git a/xml/Makefile.am b/xml/Makefile.am index b9448d4..8e7b6d3 100644 --- a/xml/Makefile.am +++ b/xml/Makefile.am @@ -64,7 +64,7 @@ API_request_base = command-output \ CIB_cfg_base = options nodes resources constraints fencing acls tags alerts # Names of all schemas (including top level and those included by others) -API_base = $(API_request_base) fence-event failure generic-list item node-attrs nodes resources status +API_base = $(API_request_base) fence-event failure generic-list item node-attrs node-history nodes resources status CIB_base = cib $(CIB_cfg_base) status score rule nvset # Static schema files and transforms (only CIB has transforms) diff --git a/xml/api/crm_mon-2.12.rng b/xml/api/crm_mon-2.12.rng index ffec923..be14412 100644 --- a/xml/api/crm_mon-2.12.rng +++ b/xml/api/crm_mon-2.12.rng @@ -20,7 +20,7 @@ - + @@ -113,14 +113,6 @@ - - - - - - - - @@ -156,60 +148,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/xml/api/node-history-2.12.rng b/xml/api/node-history-2.12.rng new file mode 100644 index 0000000..9628000 --- /dev/null +++ b/xml/api/node-history-2.12.rng @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- 1.8.3.1 From bf72b2615630eef7876e443d60b34d5a316de847 Mon Sep 17 00:00:00 2001 From: Chris Lumens Date: Wed, 16 Jun 2021 14:09:31 -0400 Subject: [PATCH 3/5] Low: schemas: Copy crm_simulate.rng in preparation for changes. --- xml/api/crm_simulate-2.12.rng | 335 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 335 insertions(+) create mode 100644 xml/api/crm_simulate-2.12.rng diff --git a/xml/api/crm_simulate-2.12.rng b/xml/api/crm_simulate-2.12.rng new file mode 100644 index 0000000..9a7612d --- /dev/null +++ b/xml/api/crm_simulate-2.12.rng @@ -0,0 +1,335 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- 1.8.3.1 From c46e07788788acf5669e3f89b9344190a91c7331 Mon Sep 17 00:00:00 2001 From: Chris Lumens Date: Fri, 18 Jun 2021 15:10:19 -0400 Subject: [PATCH 4/5] Feature: tools: Add the node-summary to crm_simulate output. If --show-failcounts is given to crm_simulate, it should also display the node-summary message. See: rhbz#1686426 --- tools/crm_simulate.c | 7 +++++-- xml/api/crm_simulate-2.12.rng | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/tools/crm_simulate.c b/tools/crm_simulate.c index b4aa9d1..2ea292c 100644 --- a/tools/crm_simulate.c +++ b/tools/crm_simulate.c @@ -409,11 +409,14 @@ print_cluster_status(pe_working_set_t * data_set, unsigned int print_opts) FALSE, FALSE, all, all, FALSE); if (options.show_attrs) { - out->message(out, "node-attribute-list", data_set, - 0, rc == pcmk_rc_ok, FALSE, FALSE, FALSE, all, all); + rc = out->message(out, "node-attribute-list", data_set, + 0, rc == pcmk_rc_ok, FALSE, FALSE, FALSE, all, all); } if (options.show_failcounts) { + rc = out->message(out, "node-summary", data_set, all, all, + 0, print_opts, FALSE, FALSE, FALSE, FALSE, rc == pcmk_rc_ok); + out->message(out, "failed-action-list", data_set, all, all, rc == pcmk_rc_ok); } diff --git a/xml/api/crm_simulate-2.12.rng b/xml/api/crm_simulate-2.12.rng index 9a7612d..f90bd36 100644 --- a/xml/api/crm_simulate-2.12.rng +++ b/xml/api/crm_simulate-2.12.rng @@ -67,6 +67,9 @@ + + + -- 1.8.3.1 From bac50336e0264604716e5997b87ee7e65311b982 Mon Sep 17 00:00:00 2001 From: Chris Lumens Date: Fri, 18 Jun 2021 15:21:52 -0400 Subject: [PATCH 5/5] Low: libcrmcommon: Increase PCMK__API_VERSION for new crm_resource output. See: rhbz#1686426 --- include/crm/common/output_internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/crm/common/output_internal.h b/include/crm/common/output_internal.h index 0436cde..ba9c423 100644 --- a/include/crm/common/output_internal.h +++ b/include/crm/common/output_internal.h @@ -27,7 +27,7 @@ extern "C" { # include # include -# define PCMK__API_VERSION "2.11" +# define PCMK__API_VERSION "2.12" #if defined(PCMK__WITH_ATTRIBUTE_OUTPUT_ARGS) # define PCMK__OUTPUT_ARGS(ARGS...) __attribute__((output_args(ARGS))) -- 1.8.3.1