Sindbad~EG File Manager

Current Path : /lib/python3.6/site-packages/sos/report/plugins/__pycache__/
Upload File :
Current File : //lib/python3.6/site-packages/sos/report/plugins/__pycache__/corosync.cpython-36.pyc

3

�f�	�@sZddlZddlmZmZmZmZGdd�de�ZGdd�dee�ZGdd�deee�ZdS)	�N)�Plugin�RedHatPlugin�DebianPlugin�UbuntuPluginc@s,eZdZdZdZd	Zd
Zdd�Zdd�ZdS)�CorosynczCorosync cluster engine�corosync�clustercCs�|jdddg�|jdddddd	d
g�|jddd
�|jd�d}|j|�sRdSd}yZ|jd�}t|ddd��8}x0|D](}tj||�rx|jtj||�j	d��qxWWdQRXWn4t
k
r�}z|jd||f�WYdd}~XnXdS)Nz
/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-cmapctlZcorosync_cmapctl)Ztagszkillall -USR2 corosyncz/etc/corosync/corosync.confz ^\s*(logging.)?logfile:\s*(\S+)$�rzUTF-8)�encoding�zcould not read from %s: %s)Z
add_copy_specZadd_cmd_outputZexec_cmdZpath_existsZ	path_join�open�re�match�search�group�IOErrorZ	_log_warn)�selfZ
corosync_conf�patternZcconf�file�line�err�r�/usr/lib/python3.6/corosync.py�setups6



*zCorosync.setupcCs|jddd�dS)Nzcorosync-objctlz(.*fence.*\.passwd=)(.*)z\1******)Zdo_cmd_output_sub)rrrr�postproc;szCorosync.postprocN)r)r)	�__name__�
__module__�__qualname__Z
short_descZplugin_nameZprofilesZpackagesrrrrrrr
s&rc@seZdZdZdS)�RedHatCorosyncz0 Parent class Corosync's setup() will be called N)rrr�__doc__rrrrrCsrc@seZdZdZdZdS)�DebianCorosyncz0 Parent class Corosync's setup() will be called �/usr/sbin/corosyncN)r!)rrrr�filesrrrrr Gsr )	r
Zsos.report.pluginsrrrrrrr rrrr�<module>	s6

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists