HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/sos/report/plugins/__pycache__/corosync.cpython-310.pyc
o

i��db	�@sZddlmZmZmZmZddlZGdd�de�ZGdd�dee�ZGdd�deee�ZdS)	�)�Plugin�RedHatPlugin�DebianPlugin�UbuntuPluginNc@s,eZdZdZdZdZdZdd�Zdd�Zd	S)
�CorosynczCorosync cluster engine�corosync)�cluster)rc
Cs�|�gd��|�gd��|jddd�|�d�d}|�|�s#dSd}z4t|�d�d	��!}|D]}t�||�rE|�t�||��	d
��q1Wd�WdS1sRwYWdSt
yu}z|�d||f�WYd}~dSd}~ww)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+)$�r�zcould not read from %s: %s)�
add_copy_spec�add_cmd_output�exec_cmd�path_exists�open�	path_join�re�match�search�group�IOError�	_log_warn)�self�
corosync_conf�pattern�f�line�e�r�=/usr/lib/python3/dist-packages/sos/report/plugins/corosync.py�setups,	�

��&� ��zCorosync.setupcCs|�ddd�dS)Nzcorosync-objctlz(.*fence.*\.passwd=)(.*)z\1******)�do_cmd_output_sub�rrrr �postproc:s
�zCorosync.postprocN)	�__name__�
__module__�__qualname__�
short_desc�plugin_name�profiles�packagesr!r$rrrr r
s%rcseZdZ�fdd�Z�ZS)�RedHatCorosyncc�tt|���dS�N)�superr,r!r#��	__class__rr r!D�zRedHatCorosync.setup)r%r&r'r!�
__classcell__rrr0r r,Bsr,cs eZdZ�fdd�ZdZ�ZS)�DebianCorosynccr-r.)r/r4r!r#r0rr r!Jr2zDebianCorosync.setup)z/usr/sbin/corosync)r%r&r'r!�filesr3rrr0r r4Hsr4)	�sos.report.pluginsrrrrrrr,r4rrrr �<module>s
5