Page MenuHomeClusterLabs Projects

No OneTemporary

diff --git a/.gitignore b/.gitignore
index 9b7834facd..c85ba09d47 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,250 +1,251 @@
# Common
\#*
.\#*
GPATH
GRTAGS
GTAGS
TAGS
Makefile
Makefile.in
.deps
.dirstamp
.libs
*.pc
*.pyc
*.bz2
*.tar.gz
*.tgz
*.la
*.lo
*.o
*~
*.gcda
*.gcno
# Autobuild
aclocal.m4
autoconf
autoheader
autom4te.cache/
automake
build.counter
/confdefs.h
config.log
config.status
configure
/conftest*
include/stamp-*
libtool
libtool.m4
ltdl.m4
libltdl
/m4/argz.m4
/m4/ltargz.m4
/m4/ltoptions.m4
/m4/ltsugar.m4
/m4/ltversion.m4
/m4/lt~obsolete.m4
ylwrap
# Configure targets
/cts/CTS.py
/cts/CTSlab.py
/cts/CTSvars.py
/cts/LSBDummy
/cts/OCFIPraTest.py
/cts/benchmark/clubench
/cts/cluster_test
/cts/cts
/cts/cts-cli
/cts/cts-coverage
/cts/cts-exec
/cts/cts-fencing
/cts/cts-log-watcher
/cts/cts-regression
/cts/cts-scheduler
/cts/cts-support
/cts/fence_dummy
/cts/lxc_autogen.sh
/cts/pacemaker-cts-dummyd
/cts/pacemaker-cts-dummyd@.service
/daemons/execd/pacemaker_remote
/daemons/execd/pacemaker_remote.service
/daemons/fenced/fence_legacy
/daemons/pacemakerd/pacemaker
/daemons/pacemakerd/pacemaker.combined.upstart
/daemons/pacemakerd/pacemaker.service
/daemons/pacemakerd/pacemaker.upstart
/doc/Doxyfile
/extra/logrotate/pacemaker
/extra/resources/ClusterMon
/extra/resources/HealthSMART
/extra/resources/SysInfo
/extra/resources/ifspeed
/extra/resources/o2cb
include/config.h
include/config.h.in
include/crm_config.h
/tools/cibsecret
/tools/crm_error
/tools/crm_failcount
/tools/crm_master
/tools/crm_mon.service
/tools/crm_mon.upstart
/tools/crm_report
/tools/crm_rule
/tools/crm_standby
/tools/pcmk_simtimes
/tools/report.collector
/tools/report.common
# Build targets
*.7
*.7.xml
*.7.html
*.8
*.8.xml
*.8.html
/daemons/attrd/pacemaker-attrd
/daemons/based/pacemaker-based
/daemons/controld/pacemaker-controld
/daemons/execd/cts-exec-helper
/daemons/execd/pacemaker-execd
/daemons/execd/pacemaker-remoted
/daemons/fenced/cts-fence-helper
/daemons/fenced/pacemaker-fenced
/daemons/fenced/pacemaker-fenced.xml
/daemons/pacemakerd/pacemakerd
/daemons/schedulerd/pacemaker-schedulerd
/daemons/schedulerd/pacemaker-schedulerd.xml
/doc/.ABI-build
/doc/HTML
/doc/abi_dumps
/doc/abi-check
/doc/api/*
/doc/compat_reports
/doc/crm_fencing.html
/doc/sphinx/*/_build
/doc/sphinx/*/conf.py
/doc/sphinx/shared/images/*.png
/lib/common/md5.c
/maint/testcc_helper.cc
/maint/testcc_*_h
/maint/mocked/based
scratch
/tools/attrd_updater
/tools/cibadmin
/tools/crmadmin
/tools/crm_attribute
/tools/crm_diff
/tools/crm_mon
/tools/crm_node
/tools/crm_resource
/tools/crm_shadow
/tools/crm_simulate
/tools/crm_ticket
/tools/crm_verify
/tools/iso8601
/tools/stonith_admin
xml/crm.dtd
+xml/crm_mon.rng
xml/pacemaker*.rng
xml/versions.rng
xml/api/api-result*.rng
lib/gnu/libgnu.a
lib/gnu/stdalign.h
*.coverity
# Packager artifacts
*.rpm
/mock
/pacemaker.spec
/rpm/[A-Z]*
# make dist/export working directory
pacemaker-[a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9][a-f0-9]
# Test detritus
/cts/.regression.failed.diff
/cts/scheduler/*.ref
/cts/scheduler/*.up
/cts/scheduler/*.up.err
/cts/scheduler/bug-rh-1097457.log
/cts/scheduler/bug-rh-1097457.trs
/cts/scheduler/shadow.*
/cts/test-suite.log
/lib/*/tests/*/*.log
/lib/*/tests/*/*_test
/lib/*/tests/*/*.trs
/xml/test-*/*.up
/xml/test-*/*.up.err
/xml/assets/*.rng
/xml/assets/diffview.js
/xml/assets/xmlcatalog
# Release maintenance detritus
/maint/gnulib
# Formerly built files (helps when jumping back and forth in checkout)
/.ABI-build
/Doxyfile
/HTML
/abi_dumps
/abi-check
/compat_reports
/compile
/attrd
/cib
/config.guess
/config.sub
/coverage.sh
/crmd
/cts/HBDummy
/daemons/based/cibmon
/depcomp
/doc/*.build
/doc/*/en-US/Ap-*.xml
/doc/*/en-US/Ch-*.xml
/doc/*/publican.cfg
/doc/*/publish
/doc/*/tmp/**
/doc/Clusters_from_Scratch.txt
/doc/Pacemaker_Explained.txt
/doc/acls.html
/doc/publican-catalog*
/doc/shared/en-US/*.xml
/doc/shared/en-US/images/pcmk-*.png
/doc/shared/en-US/images/Policy-Engine-*.png
/fencing
/install-sh
/lib/common/tests/flags/pcmk__clear_flags_as
/lib/common/tests/flags/pcmk__set_flags_as
/lib/common/tests/flags/pcmk_all_flags_set
/lib/common/tests/flags/pcmk_any_flags_set
/lib/common/tests/operations/parse_op_key
/lib/common/tests/strings/pcmk__btoa
/lib/common/tests/strings/pcmk__parse_ll_range
/lib/common/tests/strings/pcmk__scan_double
/lib/common/tests/strings/pcmk__str_any_of
/lib/common/tests/strings/pcmk__strcmp
/lib/common/tests/strings/pcmk__char_in_any_str
/lib/common/tests/utils/pcmk_str_is_infinity
/lib/common/tests/utils/pcmk_str_is_minus_infinity
/lib/pengine/tests/rules/pe_cron_range_satisfied
/lrmd
/ltmain.sh
/mcp
/missing
/pacemaker-*.spec
/pengine
/py-compile
/test-driver
#Other
coverity-*
logs
*.patch
*.diff
*.sed
*.orig
*.rej
*.swp
diff --git a/xml/Makefile.am b/xml/Makefile.am
index cb6cfa0dde..c52b968a8f 100644
--- a/xml/Makefile.am
+++ b/xml/Makefile.am
@@ -1,274 +1,292 @@
#
# Copyright 2004-2021 the Pacemaker project contributors
#
# The version control history for this file may have further details.
#
# This source code is licensed under the GNU General Public License version 2
# or later (GPLv2+) WITHOUT ANY WARRANTY.
#
include $(top_srcdir)/mk/common.mk
noarch_pkgconfig_DATA = $(builddir)/pacemaker-schemas.pc
# Pacemaker has 3 schemas: the CIB schema, the API schema (for command-line
# tool XML output), and a legacy schema for crm_mon --as-xml.
#
# See README.md for details on updating CIB schema files (API is similar)
# The CIB and crm_mon schemas are installed directly in CRM_SCHEMA_DIRECTORY
# for historical reasons, while the API schema is installed in a subdirectory.
APIdir = $(CRM_SCHEMA_DIRECTORY)/api
CIBdir = $(CRM_SCHEMA_DIRECTORY)
MONdir = $(CRM_SCHEMA_DIRECTORY)
# Extract a sorted list of available numeric schema versions
# from filenames like NAME-MAJOR[.MINOR][.MINOR-MINOR].rng
numeric_versions = $(shell ls -1 $(1) \
| sed -n -e 's/^.*-\([0-9][0-9.]*\).rng$$/\1/p' \
| sort -u -t. -k 1,1n -k 2,2n -k 3,3n)
version_pairs = $(join \
$(1),$(addprefix \
-,$(wordlist \
2,$(words $(1)),$(1) \
) next \
) \
)
version_pairs_last = $(wordlist \
$(words \
$(wordlist \
2,$(1),$(2) \
) \
),$(1),$(2) \
)
# NOTE: All files in API_request_base, CIB_cfg_base, API_base, and CIB_base
# need to start with a unique prefix. These variables all get iterated over
# and globbed, and two files starting with the same prefix will cause
# problems.
# Names of API schemas that form the choices for pacemaker-result content
API_request_base = command-output \
crm_mon \
crm_resource \
crmadmin \
digests \
stonith_admin \
version
# Names of CIB schemas that form the choices for cib/configuration content
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 generic-list item resources status
CIB_base = cib $(CIB_cfg_base) status score rule nvset
# Static schema files and transforms (only CIB has transforms)
#
# This is more complicated than it should be due to the need to support
# VPATH builds and "make distcheck". We need the absolute paths for reliable
# substitution back and forth, and relative paths for distributed files.
API_abs_files = $(foreach base,$(API_base),$(wildcard $(abs_srcdir)/api/$(base)*.rng))
CIB_abs_files = $(foreach base,$(CIB_base),$(wildcard $(abs_srcdir)/$(base).rng $(abs_srcdir)/$(base)-*.rng))
CIB_abs_xsl = $(abs_srcdir)/upgrade-1.3.xsl \
$(abs_srcdir)/upgrade-2.10.xsl \
$(wildcard $(abs_srcdir)/upgrade-*enter.xsl) \
$(wildcard $(abs_srcdir)/upgrade-*leave.xsl)
-MON_abs_files = $(abs_srcdir)/crm_mon.rng
+MON_abs_files = $(abs_srcdir)/crm_mon.rng
API_files = $(foreach base,$(API_base),$(wildcard $(srcdir)/api/$(base)*.rng))
CIB_files = $(foreach base,$(CIB_base),$(wildcard $(srcdir)/$(base).rng $(srcdir)/$(base)-*.rng))
CIB_xsl = $(srcdir)/upgrade-1.3.xsl \
$(srcdir)/upgrade-2.10.xsl \
$(wildcard $(srcdir)/upgrade-*enter.xsl) \
$(wildcard $(srcdir)/upgrade-*leave.xsl)
-MON_files = $(srcdir)/crm_mon.rng
+MON_files = $(srcdir)/crm_mon.rng
# Sorted lists of all numeric schema versions
API_numeric_versions = $(call numeric_versions,${API_files})
CIB_numeric_versions = $(call numeric_versions,${CIB_files})
+MON_numeric_versions = $(call numeric_versions,$(wildcard $(srcdir)/api/crm_mon*.rng))
# The highest numeric schema version
API_max ?= $(lastword $(API_numeric_versions))
CIB_max ?= $(lastword $(CIB_numeric_versions))
+MON_max ?= $(lastword $(MON_numeric_versions))
# Sorted lists of all schema versions (including "next")
API_versions = next $(API_numeric_versions)
CIB_versions = next $(CIB_numeric_versions)
# Build tree locations of static schema files and transforms (for VPATH builds)
API_build_copies = $(foreach f,$(API_abs_files),$(subst $(abs_srcdir),$(abs_builddir),$(f)))
CIB_build_copies = $(foreach f,$(CIB_abs_files) $(CIB_abs_xsl),$(subst $(abs_srcdir),$(abs_builddir),$(f)))
-MON_build_copies = $(foreach f,$(MON_abs_files),$(subst $(abs_srcdir),$(abs_builddir),$(f)))
+MON_build_copies = $(foreach f,$(MON_abs_files),$(subst $(abs_srcdir),$(abs_builddir),$(f)))
# Dynamically generated schema files
API_generated = api/api-result.rng $(foreach base,$(API_versions),api/api-result-$(base).rng)
CIB_generated = pacemaker.rng $(foreach base,$(CIB_versions),pacemaker-$(base).rng) versions.rng
+MON_generated = crm_mon.rng
CIB_version_pairs = $(call version_pairs,${CIB_numeric_versions})
CIB_version_pairs_cnt = $(words ${CIB_version_pairs})
CIB_version_pairs_last = $(call version_pairs_last,${CIB_version_pairs_cnt},${CIB_version_pairs})
dist_API_DATA = $(API_files)
dist_CIB_DATA = $(CIB_files) $(CIB_xsl)
-dist_MON_DATA = $(MON_files)
nodist_API_DATA = $(API_generated)
nodist_CIB_DATA = $(CIB_generated)
+nodist_MON_DATA = $(MON_generated)
EXTRA_DIST = README.md \
best-match.sh \
cibtr-2.rng \
context-of.xsl \
ocf-meta2man.xsl \
regression.sh \
upgrade-2.10-roundtrip.xsl \
upgrade-detail.xsl \
xslt_cibtr-2.rng \
assets \
test-2 \
test-2-enter \
test-2-leave \
test-2-roundtrip
cib-versions:
@echo "Max: $(CIB_max)"
@echo "Available: $(CIB_versions)"
api-versions:
@echo "Max: $(API_max)"
@echo "Available: $(API_versions)"
# Dynamically generated top-level API schema
api/api-result.rng: api/api-result-$(API_max).rng
$(AM_V_at)$(MKDIR_P) api # might not exist in VPATH build
$(AM_V_SCHEMA)cp $(top_builddir)/xml/$< $@
api/api-result-%.rng: $(API_build_copies) best-match.sh Makefile.am
$(AM_V_at)echo '<?xml version="1.0" encoding="UTF-8"?>' > $@
$(AM_V_at)echo '<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">' >> $@
$(AM_V_at)echo ' <start>' >> $@
$(AM_V_at)echo ' <element name="pacemaker-result">' >> $@
$(AM_V_at)echo ' <attribute name="api-version"> <text /> </attribute>' >> $@
$(AM_V_at)echo ' <attribute name="request"> <text /> </attribute>' >> $@
$(AM_V_at)echo ' <optional>' >> $@
$(AM_V_at)echo ' <choice>' >> $@
$(AM_V_at)for rng in $(API_request_base); do $(srcdir)/best-match.sh api/$$rng $(*) $(@) " " || :; done
$(AM_V_at)echo ' </choice>' >> $@
$(AM_V_at)echo ' </optional>' >> $@
$(AM_V_at)$(srcdir)/best-match.sh api/status $(*) $(@) " " || :
$(AM_V_at)echo ' </element>' >> $@
$(AM_V_at)echo ' </start>' >> $@
$(AM_V_SCHEMA)echo '</grammar>' >> $@
+crm_mon.rng: api/crm_mon-$(MON_max).rng
+ $(AM_V_at)echo '<?xml version="1.0" encoding="UTF-8"?>' > $@
+ $(AM_V_at)echo '<grammar xmlns="http://relaxng.org/ns/structure/1.0"' >> $@
+ $(AM_V_at)echo ' datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">' >> $@
+ $(AM_V_at)echo ' <start>' >> $@
+ $(AM_V_at)echo ' <ref name="element-crm_mon-old"/>' >> $@
+ $(AM_V_at)echo ' </start>' >> $@
+ $(AM_V_at)echo ' <define name="element-crm_mon-old">' >> $@
+ $(AM_V_at)echo ' <element name="crm_mon">' >> $@
+ $(AM_V_at)echo ' <attribute name="version"> <text/> </attribute>' >> $@
+ $(AM_V_at)echo ' <externalRef href="$(<)" />' >> $@
+ $(AM_V_at)echo ' </element>' >> $@
+ $(AM_V_at)echo ' </define>' >> $@
+ $(AM_V_SCHEMA)echo '</grammar>' >> $@
+
# Dynamically generated top-level CIB schema
pacemaker.rng: pacemaker-$(CIB_max).rng
$(AM_V_SCHEMA)cp $(top_builddir)/xml/$< $@
pacemaker-%.rng: $(CIB_build_copies) best-match.sh Makefile.am
$(AM_V_at)echo '<?xml version="1.0" encoding="UTF-8"?>' > $@
$(AM_V_at)echo '<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">' >> $@
$(AM_V_at)echo ' <start>' >> $@
$(AM_V_at)echo ' <element name="cib">' >> $@
$(AM_V_at)$(srcdir)/best-match.sh cib $(*) $(@) " "
$(AM_V_at)echo ' <element name="configuration">' >> $@
$(AM_V_at)echo ' <interleave>' >> $@
$(AM_V_at)for rng in $(CIB_cfg_base); do $(srcdir)/best-match.sh $$rng $(*) $(@) " " || :; done
$(AM_V_at)echo ' </interleave>' >> $@
$(AM_V_at)echo ' </element>' >> $@
$(AM_V_at)echo ' <optional>' >> $@
$(AM_V_at)echo ' <element name="status">' >> $@
$(AM_V_at)$(srcdir)/best-match.sh status $(*) $(@) " "
$(AM_V_at)echo ' </element>' >> $@
$(AM_V_at)echo ' </optional>' >> $@
$(AM_V_at)echo ' </element>' >> $@
$(AM_V_at)echo ' </start>' >> $@
$(AM_V_SCHEMA)echo '</grammar>' >> $@
# Dynamically generated CIB schema listing all pacemaker versions
versions.rng: Makefile.am
$(AM_V_at)echo '<?xml version="1.0" encoding="UTF-8"?>' > $@
$(AM_V_at)echo '<grammar xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">' >> $@
$(AM_V_at)echo ' <start>' >> $@
$(AM_V_at)echo ' <interleave>' >> $@
$(AM_V_at)echo ' <optional>' >> $@
$(AM_V_at)echo ' <attribute name="validate-with">' >> $@
$(AM_V_at)echo ' <choice>' >> $@
$(AM_V_at)echo ' <value>none</value>' >> $@
$(AM_V_at)echo ' <value>pacemaker-0.6</value>' >> $@
$(AM_V_at)echo ' <value>transitional-0.6</value>' >> $@
$(AM_V_at)echo ' <value>pacemaker-0.7</value>' >> $@
$(AM_V_at)echo ' <value>pacemaker-1.1</value>' >> $@
$(AM_V_at)for rng in $(CIB_versions); do echo " <value>pacemaker-$$rng</value>" >> $@; done
$(AM_V_at)echo ' </choice>' >> $@
$(AM_V_at)echo ' </attribute>' >> $@
$(AM_V_at)echo ' </optional>' >> $@
$(AM_V_at)echo ' <attribute name="admin_epoch"><data type="nonNegativeInteger"/></attribute>' >> $@
$(AM_V_at)echo ' <attribute name="epoch"><data type="nonNegativeInteger"/></attribute>' >> $@
$(AM_V_at)echo ' <attribute name="num_updates"><data type="nonNegativeInteger"/></attribute>' >> $@
$(AM_V_at)echo ' </interleave>' >> $@
$(AM_V_at)echo ' </start>' >> $@
$(AM_V_SCHEMA)echo '</grammar>' >> $@
# diff fails with ec=2 if no predecessor is found;
# this uses '=' GNU extension to sed, if that's not available,
# one can use: hline=`echo "$${p}" | grep -Fn "$${hunk}" | cut -d: -f1`;
# XXX: use line information from hunk to avoid "not detected" for ambiguity
version_diff = \
@for p in $(1); do \
set `echo "$${p}" | tr '-' ' '`; \
echo "\#\#\# *-$$2.rng vs. predecessor"; \
for v in *-$$2.rng; do \
echo "\#\#\#\# $${v} vs. predecessor"; b=`echo "$${v}" | cut -d- -f1`; \
old=`./best-match.sh $${b} $$1`; \
p=`diff -u "$${old}" "$${v}" 2>/dev/null`; \
case $$? in \
1) echo "$${p}" | sed -n -e '/^@@ /!d;=;p' \
-e ':l;n;/^\([- ]\|+.*<[^ />]\+\([^/>]\+="ID\|>$$\)\)/bl;s/^[+ ]\(.*\)/\1/p' \
| while read hline; do \
read h && read i || break; \
iline=`grep -Fn "$${i}" "$${v}" | cut -d: -f1`; \
ctxt="(not detected)"; \
if test `echo "$${iline}" | wc -l` -eq 1; then \
ctxt=`{ sed -n -e "1,$$(($${iline}-1))p" "$${v}"; \
echo "<inject id=\"GOAL\"/>$${i}"; \
sed -n -e "$$(($${iline}+1)),$$ p" "$${v}"; \
} | $(XSLTPROC) --param skip 1 context-of.xsl -`; \
fi; \
echo "$${p}" | sed -n -e "$$(($${hline}-2)),$${hline}!d" \
-e '/^\(+++\|---\)/p'; \
echo "$${h} context: $${ctxt}"; \
echo "$${p}" | sed -n -e "1,$${hline}d" \
-e '/^\(---\|@@ \)/be;p;d;:e;n;be'; \
done; \
;; \
2) echo "\#\#\#\#\# $${v} has no predecessor";; \
esac; \
done; \
done
diff: best-match.sh
@echo "# Comparing changes in + since $(CIB_max)"
$(call version_diff,${CIB_version_pairs_last})
fulldiff: best-match.sh
@echo "# Comparing all changes across all the subsequent increments"
$(call version_diff,${CIB_version_pairs})
-CLEANFILES = $(API_generated) $(CIB_generated)
+CLEANFILES = $(API_generated) $(CIB_generated) $(MON_generated)
clean-local:
if [ "x$(srcdir)" != "x$(builddir)" ]; then \
rm -f $(API_build_copies) $(CIB_build_copies) $(MON_build_copies); \
fi
# Enable ability to use $@ in prerequisite
.SECONDEXPANSION:
# For VPATH builds, copy the static schema files into the build tree
$(API_build_copies) $(CIB_build_copies) $(MON_build_copies): $$(subst $(abs_builddir),$(srcdir),$$(@))
$(AM_V_GEN)if [ "x$(srcdir)" != "x$(builddir)" ]; then \
$(MKDIR_P) "$(dir $(@))"; \
cp "$(<)" "$(@)"; \
fi
diff --git a/xml/api/crm_mon-2.7.rng b/xml/api/crm_mon-2.7.rng
new file mode 100644
index 0000000000..8e6792b63b
--- /dev/null
+++ b/xml/api/crm_mon-2.7.rng
@@ -0,0 +1,311 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<grammar xmlns="http://relaxng.org/ns/structure/1.0"
+ datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
+
+ <start>
+ <ref name="element-crm-mon"/>
+ </start>
+
+ <define name="element-crm-mon">
+ <optional>
+ <ref name="element-summary" />
+ </optional>
+ <optional>
+ <ref name="nodes-list" />
+ </optional>
+ <optional>
+ <ref name="resources-list" />
+ </optional>
+ <optional>
+ <ref name="node-attributes-list" />
+ </optional>
+ <optional>
+ <ref name="node-history-list" />
+ </optional>
+ <optional>
+ <ref name="failures-list" />
+ </optional>
+ <optional>
+ <ref name="fence-event-list" />
+ </optional>
+ <optional>
+ <ref name="tickets-list" />
+ </optional>
+ <optional>
+ <ref name="bans-list" />
+ </optional>
+ </define>
+
+ <define name="element-summary">
+ <element name="summary">
+ <optional>
+ <element name="stack">
+ <attribute name="type"> <text /> </attribute>
+ </element>
+ </optional>
+ <optional>
+ <element name="current_dc">
+ <attribute name="present"> <data type="boolean" /> </attribute>
+ <optional>
+ <group>
+ <attribute name="version"> <text /> </attribute>
+ <attribute name="name"> <text /> </attribute>
+ <attribute name="id"> <text /> </attribute>
+ <attribute name="with_quorum"> <data type="boolean" /> </attribute>
+ </group>
+ </optional>
+ </element>
+ </optional>
+ <optional>
+ <element name="last_update">
+ <attribute name="time"> <text /> </attribute>
+ </element>
+ <element name="last_change">
+ <attribute name="time"> <text /> </attribute>
+ <attribute name="user"> <text /> </attribute>
+ <attribute name="client"> <text /> </attribute>
+ <attribute name="origin"> <text /> </attribute>
+ </element>
+ </optional>
+ <optional>
+ <element name="nodes_configured">
+ <attribute name="number"> <data type="nonNegativeInteger" /> </attribute>
+ </element>
+ <element name="resources_configured">
+ <attribute name="number"> <data type="nonNegativeInteger" /> </attribute>
+ <attribute name="disabled"> <data type="nonNegativeInteger" /> </attribute>
+ <attribute name="blocked"> <data type="nonNegativeInteger" /> </attribute>
+ </element>
+ </optional>
+ <optional>
+ <element name="cluster_options">
+ <attribute name="stonith-enabled"> <data type="boolean" /> </attribute>
+ <attribute name="symmetric-cluster"> <data type="boolean" /> </attribute>
+ <attribute name="no-quorum-policy"> <text /> </attribute>
+ <attribute name="maintenance-mode"> <data type="boolean" /> </attribute>
+ <attribute name="stop-all-resources"> <data type="boolean" /> </attribute>
+ </element>
+ </optional>
+ </element>
+ </define>
+
+ <define name="resources-list">
+ <element name="resources">
+ <zeroOrMore>
+ <externalRef href="resources-2.4.rng" />
+ </zeroOrMore>
+ </element>
+ </define>
+
+ <define name="nodes-list">
+ <element name="nodes">
+ <zeroOrMore>
+ <ref name="element-full-node" />
+ </zeroOrMore>
+ </element>
+ </define>
+
+ <define name="node-attributes-list">
+ <element name="node_attributes">
+ <zeroOrMore>
+ <ref name="element-node-with-attributes" />
+ </zeroOrMore>
+ </element>
+ </define>
+
+ <define name="node-history-list">
+ <element name="node_history">
+ <zeroOrMore>
+ <ref name="element-node-history" />
+ </zeroOrMore>
+ </element>
+ </define>
+
+ <define name="failures-list">
+ <element name="failures">
+ <zeroOrMore>
+ <ref name="element-failure" />
+ </zeroOrMore>
+ </element>
+ </define>
+
+ <define name="fence-event-list">
+ <element name="fence_history">
+ <optional>
+ <attribute name="status"> <data type="integer" /> </attribute>
+ </optional>
+ <zeroOrMore>
+ <externalRef href="fence-event-2.0.rng" />
+ </zeroOrMore>
+ </element>
+ </define>
+
+ <define name="tickets-list">
+ <element name="tickets">
+ <zeroOrMore>
+ <ref name="element-ticket" />
+ </zeroOrMore>
+ </element>
+ </define>
+
+ <define name="bans-list">
+ <element name="bans">
+ <zeroOrMore>
+ <ref name="element-ban" />
+ </zeroOrMore>
+ </element>
+ </define>
+
+ <define name="element-full-node">
+ <element name="node">
+ <attribute name="name"> <text/> </attribute>
+ <attribute name="id"> <text/> </attribute>
+ <attribute name="online"> <data type="boolean" /> </attribute>
+ <attribute name="standby"> <data type="boolean" /> </attribute>
+ <attribute name="standby_onfail"> <data type="boolean" /> </attribute>
+ <attribute name="maintenance"> <data type="boolean" /> </attribute>
+ <attribute name="pending"> <data type="boolean" /> </attribute>
+ <attribute name="unclean"> <data type="boolean" /> </attribute>
+ <attribute name="shutdown"> <data type="boolean" /> </attribute>
+ <attribute name="expected_up"> <data type="boolean" /> </attribute>
+ <attribute name="is_dc"> <data type="boolean" /> </attribute>
+ <attribute name="resources_running"> <data type="nonNegativeInteger" /> </attribute>
+ <attribute name="type">
+ <choice>
+ <value>unknown</value>
+ <value>member</value>
+ <value>remote</value>
+ <value>ping</value>
+ </choice>
+ </attribute>
+ <optional>
+ <!-- for virtualized pacemaker_remote nodes, crm_mon 1.1.13 uses
+ "container_id" while later versions use "id_as_resource" -->
+ <choice>
+ <attribute name="container_id"> <text/> </attribute>
+ <attribute name="id_as_resource"> <text/> </attribute>
+ </choice>
+ </optional>
+ <externalRef href="resources-2.4.rng" />
+ </element>
+ </define>
+
+ <define name="element-node-with-attributes">
+ <element name="node">
+ <attribute name="name"> <text /> </attribute>
+ <zeroOrMore>
+ <element name="attribute">
+ <attribute name="name"> <text /> </attribute>
+ <attribute name="value"> <text /> </attribute>
+ <optional>
+ <attribute name="expected"> <data type="integer" /> </attribute>
+ </optional>
+ </element>
+ </zeroOrMore>
+ </element>
+ </define>
+
+ <define name="element-node-history">
+ <element name="node">
+ <attribute name="name"> <text /> </attribute>
+ <zeroOrMore>
+ <ref name="element-resource-history" />
+ </zeroOrMore>
+ </element>
+ </define>
+
+ <define name="element-resource-history">
+ <element name="resource_history">
+ <attribute name="id"> <text /> </attribute>
+ <attribute name="orphan"> <data type="boolean" /> </attribute>
+ <optional>
+ <group>
+ <attribute name="migration-threshold"> <data type="nonNegativeInteger" /> </attribute>
+ <optional>
+ <attribute name="fail-count"> <text /> </attribute>
+ </optional>
+ <optional>
+ <attribute name="last-failure"> <text /> </attribute>
+ </optional>
+ </group>
+ </optional>
+ <zeroOrMore>
+ <ref name="element-operation-history" />
+ </zeroOrMore>
+ </element>
+ </define>
+
+ <define name="element-operation-history">
+ <element name="operation_history">
+ <attribute name="call"> <text /> </attribute>
+ <attribute name="task"> <text /> </attribute>
+ <optional>
+ <attribute name="interval"> <text /> </attribute>
+ </optional>
+ <optional>
+ <attribute name="last-rc-change"> <text /> </attribute>
+ </optional>
+ <optional>
+ <attribute name="last-run"> <text /> </attribute>
+ </optional>
+ <optional>
+ <attribute name="exec-time"> <text /> </attribute>
+ </optional>
+ <optional>
+ <attribute name="queue-time"> <text /> </attribute>
+ </optional>
+ <attribute name="rc"> <data type="integer" /> </attribute>
+ <attribute name="rc_text"> <text /> </attribute>
+ </element>
+ </define>
+
+ <define name="element-failure">
+ <element name="failure">
+ <choice>
+ <attribute name="op_key"> <text/> </attribute>
+ <attribute name="id"> <text/> </attribute>
+ </choice>
+ <attribute name="node"> <text /> </attribute>
+ <attribute name="exitstatus"> <text /> </attribute>
+ <attribute name="exitreason"> <text /> </attribute>
+ <attribute name="exitcode"> <data type="nonNegativeInteger" /> </attribute>
+ <attribute name="call"> <data type="integer" /> </attribute>
+ <attribute name="status"> <text /> </attribute>
+ <optional>
+ <group>
+ <attribute name="last-rc-change"> <text /> </attribute>
+ <attribute name="queued"> <data type="nonNegativeInteger" /> </attribute>
+ <attribute name="exec"> <data type="nonNegativeInteger" /> </attribute>
+ <attribute name="interval"> <data type="nonNegativeInteger" /> </attribute>
+ <attribute name="task"> <text /> </attribute>
+ </group>
+ </optional>
+ </element>
+ </define>
+
+ <define name="element-ticket">
+ <element name="ticket">
+ <attribute name="id"> <text /> </attribute>
+ <attribute name="status">
+ <choice>
+ <value>granted</value>
+ <value>revoked</value>
+ </choice>
+ </attribute>
+ <attribute name="standby"> <data type="boolean" /> </attribute>
+ <optional>
+ <attribute name="last-granted"> <text /> </attribute>
+ </optional>
+ </element>
+ </define>
+
+ <define name="element-ban">
+ <element name="ban">
+ <attribute name="id"> <text /> </attribute>
+ <attribute name="resource"> <text /> </attribute>
+ <attribute name="node"> <text /> </attribute>
+ <attribute name="weight"> <data type="integer" /> </attribute>
+ <attribute name="master_only"> <data type="boolean" /> </attribute>
+ </element>
+ </define>
+</grammar>
diff --git a/xml/api/crm_resource-2.7.rng b/xml/api/crm_resource-2.7.rng
new file mode 100644
index 0000000000..8e386db025
--- /dev/null
+++ b/xml/api/crm_resource-2.7.rng
@@ -0,0 +1,238 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<grammar xmlns="http://relaxng.org/ns/structure/1.0"
+ datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
+
+ <start>
+ <ref name="element-crm-resource"/>
+ </start>
+
+ <define name="element-crm-resource">
+ <choice>
+ <ref name="agents-list" />
+ <ref name="alternatives-list" />
+ <ref name="constraints-list" />
+ <externalRef href="generic-list-2.4.rng"/>
+ <element name="metadata"> <text/> </element>
+ <ref name="locate-list" />
+ <ref name="operations-list" />
+ <ref name="providers-list" />
+ <ref name="reasons-list" />
+ <ref name="resource-check" />
+ <ref name="resource-config" />
+ <ref name="resources-list" />
+ </choice>
+ </define>
+
+ <define name="agents-list">
+ <element name="agents">
+ <attribute name="standard"> <text/> </attribute>
+ <optional>
+ <attribute name="provider"> <text/> </attribute>
+ </optional>
+ <zeroOrMore>
+ <element name="agent"> <text/> </element>
+ </zeroOrMore>
+ </element>
+ </define>
+
+ <define name="alternatives-list">
+ <element name="providers">
+ <attribute name="for"> <text/> </attribute>
+ <zeroOrMore>
+ <element name="provider"> <text/> </element>
+ </zeroOrMore>
+ </element>
+ </define>
+
+ <define name="constraints-list">
+ <element name="constraints">
+ <interleave>
+ <zeroOrMore>
+ <ref name="rsc-location" />
+ </zeroOrMore>
+ <zeroOrMore>
+ <ref name="rsc-colocation" />
+ </zeroOrMore>
+ </interleave>
+ </element>
+ </define>
+
+ <define name="locate-list">
+ <element name="nodes">
+ <attribute name="resource"> <text/> </attribute>
+ <zeroOrMore>
+ <element name="node">
+ <optional>
+ <attribute name="state"><value>promoted</value></attribute>
+ </optional>
+ <text/>
+ </element>
+ </zeroOrMore>
+ </element>
+ </define>
+
+ <define name="rsc-location">
+ <element name="rsc_location">
+ <attribute name="node"> <text/> </attribute>
+ <attribute name="rsc"> <text/> </attribute>
+ <attribute name="id"> <text/> </attribute>
+ <externalRef href="../score.rng"/>
+ </element>
+ </define>
+
+ <define name="operations-list">
+ <element name="operations">
+ <oneOrMore>
+ <ref name="element-operation-list" />
+ </oneOrMore>
+ </element>
+ </define>
+
+ <define name="providers-list">
+ <element name="providers">
+ <attribute name="standard"> <value>ocf</value> </attribute>
+ <optional>
+ <attribute name="agent"> <text/> </attribute>
+ </optional>
+ <zeroOrMore>
+ <element name="provider"> <text/> </element>
+ </zeroOrMore>
+ </element>
+ </define>
+
+ <define name="reasons-list">
+ <choice>
+ <ref name="no-resource-or-uname"/>
+ <ref name="resource-and-uname"/>
+ <ref name="no-resource-but-uname"/>
+ <ref name="resource-but-no-uname"/>
+ </choice>
+ </define>
+
+ <define name="no-resource-or-uname">
+ <element name="reason">
+ <element name="resources">
+ <zeroOrMore>
+ <element name="resource">
+ <attribute name="id"> <text/> </attribute>
+ <attribute name="running"> <data type="boolean"/> </attribute>
+ <ref name="resource-check"/>
+ </element>
+ </zeroOrMore>
+ </element>
+ </element>
+ </define>
+
+ <define name="resource-and-uname">
+ <element name="reason">
+ <attribute name="running_on"> <text/> </attribute>
+ <ref name="resource-check"/>
+ </element>
+ </define>
+
+ <define name="no-resource-but-uname">
+ <element name="reason">
+ <element name="resources">
+ <zeroOrMore>
+ <element name="resource">
+ <attribute name="id"> <text/> </attribute>
+ <attribute name="running"> <data type="boolean"/> </attribute>
+ <attribute name="host"> <text/> </attribute>
+ <ref name="resource-check"/>
+ </element>
+ </zeroOrMore>
+ </element>
+ </element>
+ </define>
+
+ <define name="resource-but-no-uname">
+ <element name="reason">
+ <attribute name="running"> <data type="boolean"/> </attribute>
+ <ref name="resource-check"/>
+ </element>
+ </define>
+
+ <define name="resource-config">
+ <element name="resource_config">
+ <externalRef href="resources-2.4.rng" />
+ <element name="xml"> <text/> </element>
+ </element>
+ </define>
+
+ <define name="resource-check">
+ <element name="check">
+ <attribute name="id"> <text/> </attribute>
+ <optional>
+ <choice>
+ <attribute name="remain_stopped"><value>true</value></attribute>
+ <attribute name="promotable"><value>false</value></attribute>
+ </choice>
+ </optional>
+ <optional>
+ <attribute name="unmanaged"><value>true</value></attribute>
+ </optional>
+ <optional>
+ <attribute name="locked-to"> <text/> </attribute>
+ </optional>
+ </element>
+ </define>
+
+ <define name="resources-list">
+ <element name="resources">
+ <zeroOrMore>
+ <externalRef href="resources-2.4.rng" />
+ </zeroOrMore>
+ </element>
+ </define>
+
+ <define name="rsc-colocation">
+ <element name="rsc_colocation">
+ <attribute name="id"> <text/> </attribute>
+ <attribute name="rsc"> <text/> </attribute>
+ <attribute name="with-rsc"> <text/> </attribute>
+ <externalRef href="../score.rng"/>
+ <optional>
+ <attribute name="node-attribute"> <text/> </attribute>
+ </optional>
+ <optional>
+ <attribute name="rsc-role">
+ <ref name="attribute-roles"/>
+ </attribute>
+ </optional>
+ <optional>
+ <attribute name="with-rsc-role">
+ <ref name="attribute-roles"/>
+ </attribute>
+ </optional>
+ </element>
+ </define>
+
+ <define name="element-operation-list">
+ <element name="operation">
+ <optional>
+ <group>
+ <attribute name="rsc"> <text/> </attribute>
+ <attribute name="agent"> <text/> </attribute>
+ </group>
+ </optional>
+ <attribute name="op"> <text/> </attribute>
+ <attribute name="node"> <text/> </attribute>
+ <attribute name="call"> <data type="integer" /> </attribute>
+ <attribute name="rc"> <data type="nonNegativeInteger" /> </attribute>
+ <optional>
+ <attribute name="last-rc-change"> <text/> </attribute>
+ <attribute name="exec-time"> <data type="nonNegativeInteger" /> </attribute>
+ </optional>
+ <attribute name="status"> <text/> </attribute>
+ </element>
+ </define>
+
+ <define name="attribute-roles">
+ <choice>
+ <value>Stopped</value>
+ <value>Started</value>
+ <value>Master</value>
+ <value>Slave</value>
+ </choice>
+ </define>
+</grammar>
diff --git a/xml/crm_mon.rng b/xml/crm_mon.rng
deleted file mode 100644
index be87fbac84..0000000000
--- a/xml/crm_mon.rng
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<grammar xmlns="http://relaxng.org/ns/structure/1.0"
- datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
-
- <start>
- <ref name="element-crm_mon-old"/>
- </start>
-
- <define name="element-crm_mon-old">
- <element name="crm_mon">
- <attribute name="version"> <text/> </attribute>
- <externalRef href="api/crm_mon-2.3.rng" />
- </element>
- </define>
-
-</grammar>

File Metadata

Mime Type
text/x-diff
Expires
Sat, Nov 23, 4:34 PM (14 h, 8 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1018922
Default Alt Text
(38 KB)

Event Timeline