/usr/lib/python3/dist-packages/sos/collector/clusters/__pycache__
NameSizeModeActions
ceph.cpython-310.pyc23710644editdlrm
jbon.cpython-310.pyc10400644editdlrm
juju.cpython-310.pyc72680644editdlrm
kubernetes.cpython-310.pyc17110644editdlrm
ocp.cpython-310.pyc119650644editdlrm
openstack.cpython-310.pyc26140644editdlrm
ovirt.cpython-310.pyc77720644editdlrm
pacemaker.cpython-310.pyc33030644editdlrm
saltstack.cpython-310.pyc27210644editdlrm
satellite.cpython-310.pyc17420644editdlrm
__init__.cpython-310.pyc153440644editdlrm
Edit: /usr/lib/python3/dist-packages/sos/collector/clusters/__pycache__/pacemaker.cpython-310.pyc (3303B)
o G%@i>@s@ddlZddlmZddlmZddlmZGdddeZdS)N) ElementTree)Cluster)sos_parse_versionc@sFeZdZdZdgZdZdZgdZddZddZ d d Z d d Z d S) pacemakerz+Pacemaker High Availability Cluster Manager)rT))onlineTzCollect nodes listed as online)offlineTzCollect nodes listed as offline) only-corosyncFz)Only use corosync.conf to enumerate nodesc Csg|_z/|ds*z|Wnty)}z|d|WYd}~nd}~ww|js1|WntyL}z|d|WYd}~nd}~wwdd|jD}|rc|dd|d|jS) NrzHFalling back to sourcing corosync.conf. Could not parse crm_mon output: z(Could not determine nodes from cluster: cSsg|]}d|vr|qS).).0nr r B/usr/lib/python3/dist-packages/sos/collector/clusters/pacemaker.py /sz'pacemaker.get_nodes..zWARNING: Node addresses ',z' may not resolve locally if you are not running on a node in the cluster. Try using option '-c pacemaker.only-corosync' if these connections fail.)nodes get_optionget_nodes_from_crm Exceptionlog_warnget_nodes_from_corosync log_errorjoin)selferr_shortsr r r get_nodess0  zpacemaker.get_nodescCsd}|d}|ddkr%|dddd}t|tdkr$d }nd S|jd |d d }|ddkr@||dd Sd S)zG Try to parse crm_mon output for node list and status. z--output-as=xmlzcrm_mon --versionstatusroutput-z2.0.3z--as-xmlNzcrm_mon --one-shot --inactive T) need_root)exec_primary_cmdsplitr parse_crm_xml)rxmlopt_vercver_outr r r r9s   zpacemaker.get_nodes_from_crmcCsvt|}|d}|D],}|j}|dr%|ddkr%|j|dq |dr8|ddkr8|j|dq dS)zA Parse the xml output string provided by crm_mon rrtruenamerfalseN)r fromstringfindattribrrappend)r xmlstring_xmlrnode_noder r r r#Ms  zpacemaker.parse_crm_xmlcCsD|d|jd}td|}|D] }|j|dqdS)z As a fallback measure, read corosync.conf to get the node list. Note that this prevents us from separating online nodes from offline nodes. z_WARNING: unable to distinguish online nodes from offline nodes when sourcing from corosync.confz/etc/corosync/corosync.confz((\sring0_addr:)(.*))N)rprimary read_filerefindallrr.strip)rccrr1r r r rZs   z!pacemaker.get_nodes_from_corosyncN) __name__ __module__ __qualname__ cluster_name sos_pluginspackagesstrict_node_list option_listrrr#rr r r r rs r)r6 xml.etreersos.collector.clustersr sos.utilitiesrrr r r r s