shaman: Failed to read XML model: syntax error
Modified on: Sat, 18 Nov 2023 5:35 AM2020-01-22
Symptoms
shaman stat
command prints a warning:
shaman: Failed to read XML model: syntax error
What does it mean and how to fix this kind of error?
Cause
The error is not harmful and appears when there are "Unknown" resources:
~# shaman -c pcs stat
Failed to read XML model: syntax error
Cluster 'pcs'
Nodes: 3
Resources: 5
NODE_IP STATUS RESOURCES
* 10.1.1.10 Active 2 CT, 0 Unknown
M 10.1.1.11 Active 1 CT, 0 Unknown
10.1.1.12 Inactive 1 CT, 0 Unknown
CT ID PWRR STATUS OWNER_IP PRIORITY
101 on Active 10.1.1.11 0
102 on Active 10.1.1.13 0
103 on Active 10.1.1.12 0
104 on Active 10.1.1.11 0
Unknown STATUS OWNER_IP PRIORITY
Broken Unknown 0
Resolution
Clean up "Unknown" and "Broken" resources:
# shaman cleanup-broken
This command attempts to relocate all broken resources to a local node without starting them. After relocation these resources can be manually migrated to desired nodes. Files of broken resources, which cannot be relocated, are deleted.
For other cases, to get rid of the error in shaman stat
, the resources should be placed under appropriate node in shaman records.
-
Get "Node ID” (or host_id) value for each PCS host in cluster by running "shaman stat" with verbose output ("-v" option"):
# shaman -v -c pcs stat Failed to read XML model: syntax error Cluster 'pcs' Nodes: 3 Resources: 4 NODE_IP STATUS NODE_ID RESOURCES *M 10.1.1.37 Active 34705c9745f742a1 1 CT, 1 VM, 0 Unknown 10.1.1.38 Active da6fd9b1b4c34fb6 0 CT, 0 VM, 0 Unknown 10.1.1.39 Inactive 42064ead9c244d74 1 CT, 0 VM, 1 Unknown
Unknown STATUS OWNER_IP OWNER_ID PRIORITY Active 10.1.1.39 42064ead9c244d74 0CT ID PWRR STATUS OWNER_IP OWNER_ID PRIORITY 101 on Active 10.1.1.39 42064ead9c244d74 0 999 on Active 10.1.1.37 34705c9745f742a1 0 VM NAME PWRR STATUS OWNER_IP OWNER_ID PRIORITY vm-test off Active 10.1.1.37 34705c9745f742a1 0
-
The list of
shaman
resources is located under the/pstorage/$CLUSTER_NAME/.shaman/md.$NODE_ID/resources
directory.Since the directory is under Pstorage mount, it can be accessed from any node of the cluster. Replace
$CLUSTER_NAME
and$NODE_ID
in the example above with appropriate values. -
For existing virtual machines, their resource files should be moved under appropriate PCS node:
~# mv /pstorage/$CLUSTER_NAME/.shaman/md.$HOST_ID_1/resources/vm-NAME /pstorage/$CLUSTER_NAME/.shaman/md.$HOST_ID_2/resources/vm-NAME
Where
md.$HOST_ID_1
is the host improperly owning this VM andmd.$HOST_ID_2
is the proper host running this particular VM.Note: Do not change the name for the resource file, it is always written in
vm-NAME
orct-CTID
format.