Current File : //usr/lib/python3/dist-packages/sos/report/plugins/__pycache__/corosync.cpython-312.pyc
�

-�_g�	��l�ddlZddlmZmZmZmZGd�de�ZGd�dee�ZGd�deee�Zy)	�N)�Plugin�RedHatPlugin�DebianPlugin�UbuntuPluginc�(�eZdZdZdZdZdZd�Zd�Zy)�CorosynczCorosync cluster engine�corosync)�cluster)r	c�.�|jgd��|jgd��|jdd��|jd�d}|j|�syd}	|j	d�}t|d	d
��5}|D]M}t
j||�s�|jt
j||�jd���O	ddd�y#1swYyxYw#t$r!}|jd
|�d|���Yd}~yd}~wwxYw)N)z
/etc/corosyncz/var/lib/corosync/fdataz/var/log/cluster/corosync.log*)zcorosync-quorumtool -lzcorosync-quorumtool -szcorosync-cpgtoolzcorosync-cfgtool -szcorosync-blackboxzcorosync-objctl -azcorosync-cmapctl -m statszcorosync-cmapctl�corosync_cmapctl)�tagszkillall -USR2 corosyncz/etc/corosync/corosync.confz ^\s*(logging.)?logfile:\s*(\S+)$�rzUTF-8)�encoding�zcould not read from z: )�
add_copy_spec�add_cmd_output�exec_cmd�path_exists�	path_join�open�re�match�search�group�IOError�	_log_warn)�self�
corosync_conf�pattern�cconf�file�line�errs       �=/usr/lib/python3/dist-packages/sos/report/plugins/corosync.py�setupzCorosync.setups�����
�	�
	
���
�	�	
���.�!3�	�	5��
�
�.�/�5�
����
�.��6��	J��N�N�#@�A�E��e�S�7�3�
N�t� �N�D��x�x���.��*�*�2�9�9�W�d�+C�+I�+I�!�+L�M�N�
N�
N�
N���	J��N�N�1�-���3�%�H�I�I��	J�s<�"C*�C�6C�C*�C'�#C*�'C*�*	D�3D�Dc�*�|jddd�y)Nzcorosync-objctlz(.*fence.*\.passwd=)(.*)z\1******)�do_cmd_output_sub)rs r$�postproczCorosync.postproc;s������'��	
�N)	�__name__�
__module__�__qualname__�
short_desc�plugin_name�profiles�packagesr%r(�r)r$rr
s"��*�J��K��H��H�$J�L
r)rc��eZdZdZy)�RedHatCorosync�0 Parent class Corosync's setup() will be called N)r*r+r,�__doc__r1r)r$r3r3Cs��:r)r3c��eZdZdZdZy)�DebianCorosyncr4)z/usr/sbin/corosyncN)r*r+r,r5�filesr1r)r$r7r7Gs
��:�#�Er)r7)	r�sos.report.pluginsrrrrrr3r7r1r)r$�<module>r:s;��
�O�O�3
�v�3
�l;�X�|�;�$�X�|�\�$r)