%PDF- %PDF-
| Direktori : /usr/lib/python3.9/site-packages/sos/report/plugins/__pycache__/ |
| Current File : //usr/lib/python3.9/site-packages/sos/report/plugins/__pycache__/corosync.cpython-39.pyc |
a
\��h� � @ sZ d dl Z d dlmZmZmZmZ G dd� de�ZG dd� dee�ZG dd� deee�ZdS ) � N)�Plugin�RedHatPlugin�DebianPlugin�UbuntuPluginc @ s, e Zd ZdZdZdZdZdd� Zdd� Zd S )
�CorosynczCorosync cluster engine�corosync)Zcluster)r c
C s� | � g d�� | �g d�� | jddd� | �d� d}| �|�sFd S d}zj| �d�}t|d d
d��>}|D ](}t�||�rj| � t�||�� d�� qjW d � n1 s�0 Y W n: t
y� } z"| �d
|� d|� �� W Y d }~n
d }~0 0 d S )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-cmapctlZcorosync_cmapctl)�tagszkillall -USR2 corosyncz/etc/corosync/corosync.confz ^\s*(logging.)?logfile:\s*(\S+)$�rzUTF-8)�encoding� zcould not read from z: )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.9/site-packages/sos/report/plugins/corosync.py�setup s$ �
<zCorosync.setupc C s | � ddd� d S )Nzcorosync-objctlz(.*fence.*\.passwd=)(.*)z\1******)Zdo_cmd_output_sub)r r r r �postproc; s
�zCorosync.postprocN) �__name__�
__module__�__qualname__Z
short_descZplugin_nameZprofilesZpackagesr r r r r r r
s &r c @ s e Zd ZdZdS )�RedHatCorosync�0 Parent class Corosync's setup() will be called N)r r r �__doc__r r r r r C s r c @ s e Zd ZdZdZdS )�DebianCorosyncr )z/usr/sbin/corosyncN)r r r r �filesr r r r r! G s r! ) r
Zsos.report.pluginsr r r r r r r! r r r r �<module> s 6