+
    Û1j>  ã                   óH   € ^ RI t ^ RIHt ^ RIHt ^ RIHt  ! R R]4      tR# )é    N)ÚElementTree)ÚCluster)Úsos_parse_versionc                   óR   a € ] tR t^t o RtR .tR	tRt. R
OtR t	R t
R tR tRtV tR# )Ú	pacemakerz+Pacemaker High Availability Cluster ManagerTc                ó  € . V n          V P                  R 4      '       g    V P                  4        V P                   '       g   V P                  4        T P                    Uu. uF  pRT9  g   K  TNK  	  ppT'       d%   T P	                  RRP                  T4       R24       T P                   #   \         d   pT P	                  RT 24        Rp?L¢Rp?ii ; i  \         d   pT P                  RT 24        Rp?L¬Rp?ii ; iu upi )úonly-corosynczHFalling back to sourcing corosync.conf. Could not parse crm_mon output: Nz(Could not determine nodes from cluster: Ú.zWARNING: 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_optionÚget_nodes_from_crmÚ	ExceptionÚlog_warnÚget_nodes_from_corosyncÚ	log_errorÚjoin)ÚselfÚerrÚnÚ_shortss   &   ÚB/usr/lib/python3/dist-packages/sos/collector/clusters/pacemaker.pyÚ	get_nodesÚpacemaker.get_nodes   s  € ØˆŒ
ð	MØ—?‘? ?×3Ò3ðLØ×+Ñ+Ô-ð —:—:�:ð ×,Ñ,Ô.ð #ŸjšjÓ9™j˜¨C°q©L—1�1™jˆÐ9ßØ�M‰MØ+¨C¯H©H°WÓ,=Ð+>ð ?*ð *ôð �z‰zÐøô% !ô LØ—M‘Mð #EØEHÀEð#K÷ Lñ LûðLûô ô 	MØ�N‰NÐEÀcÀUÐK×LÑLûð	Müò :sQ   ‰C ¡B/ ±C ÁC Á!	DÁ/DÂ/CÂ:CÃC ÃCÃC ÃDÃ&C?Ã?Dc                óh  € RpV P                  R4      pVR,          ^ 8X  dQ   VR,          P                  4       ^,          P                  R4      ^ ,          p\        V4      \        R4      8:  d   RpMR# V P                  R	V 2R
R7      pVR,          ^ 8X  d   V P                  VR,          4       R# R# )z7
Try to parse crm_mon output for node list and status.
z--output-as=xmlzcrm_mon --versionÚstatusÚoutputÚ-z2.0.3z--as-xmlNzcrm_mon --one-shot --inactive T)Ú	need_root)Úexec_primary_cmdÚsplitr   Úparse_crm_xml)r   ÚxmloptÚ_verÚcverÚ_outs   &    r   r   Úpacemaker.get_nodes_from_crm9   s°   € ð #ˆà×$Ñ$Ð%8Ó9ˆØ��>˜QÔØ˜•>×'Ñ'Ó)¨!Õ,×2Ñ2°3Ó7¸Õ:ˆDÜ  Ó&Ô*;¸GÓ*DÔDØ#�øáØ×$Ñ$Ø,¨V¨HÐ5Øð %ó 
ˆð ��>˜QÔØ×Ñ˜t H�~Ö.ñ ó    c                ó¦  € \         P                  ! V4      pVP                  R4      pV F£  pVP                  pV P	                  R4      '       d3   VR,          R8X  d%   V P
                  P                  VR,          4       KX  V P	                  R4      '       g   Kq  VR,          R8X  g   K�  V P
                  P                  VR,          4       K¥  	  R# )z1
Parse the xml output string provided by crm_mon
r   ÚonlineÚtrueÚnameÚofflineÚfalseN)r   Ú
fromstringÚfindÚattribr   r   Úappend)r   Ú	xmlstringÚ_xmlr   ÚnodeÚ_nodes   &&    r   r"   Úpacemaker.parse_crm_xmlM   s•   € ô ×%Ò% iÓ0ˆØ—	‘	˜'Ó"ˆÛˆDØ—K‘KˆEØ�‰˜x×(Ò(¨U°8­_ÀÔ-FØ—
‘
×!Ñ! %¨¥-Ö0Ø—‘ ×+Ô+°°hµÀ7Ö0JØ—
‘
×!Ñ! %¨¥-Ö0ó r(   c                óþ   € V P                  R4       V P                  P                  R4      p\        P                  ! RV4      pV F3  pV P
                  P                  VR,          P                  4       4       K5  	  R# )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éÿÿÿÿ)r   ÚprimaryÚ	read_fileÚreÚfindallr   r2   Ústrip)r   Úccr   r5   s   &   r   r   Ú!pacemaker.get_nodes_from_corosyncZ   sd   € ð
 	�‰ð Gô 	Hà�\‰\×#Ñ#Ð$AÓBˆÜ—
’
Ð3°RÓ8ˆÛˆDØ�J‰J×Ñ˜d 2�hŸn™nÓ.Ö/ó r(   )r   N)r   ))r*   TzCollect nodes listed as online)r-   TzCollect nodes listed as offline)r	   Fz)Only use corosync.conf to enumerate nodes)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Úcluster_nameÚsos_pluginsÚpackagesÚstrict_node_listÚoption_listr   r   r"   r   Ú__static_attributes__Ú__classdictcell__)Ú__classdict__s   @r   r   r      s<   ø‡ € à@€LØ�-€KØ€HØÐò€Kòò6/ò(1÷
0ð 
0r(   r   )r<   Ú	xml.etreer   Úsos.collector.clustersr   Úsos.utilitiesr   r   © r(   r   Ú<module>rQ      s!   ðó 
å !Ý *Ý +ôR0�ö R0r(   