File: //lib/python3/dist-packages/sos/report/plugins/__pycache__/corosync.cpython-310.pyc
o
i��db � @ sZ d dl mZmZmZmZ d dlZG dd� de�ZG dd� dee�ZG dd� deee�ZdS ) � )�Plugin�RedHatPlugin�DebianPlugin�UbuntuPluginNc @ s, e Zd ZdZdZdZdZdd� Zdd� Zd S )
�CorosynczCorosync cluster engine�corosync)�cluster)r c
C s� | � g d�� | �g d�� | jddd� | �d� d}| �|�s#d S d}z4t| �d�d ��!}|D ]}t�||�rE| � t�||�� d
�� q1W d � W d S 1 sRw Y W d S t
yu } z| �d||f � W Y d }~d S d }~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�setup s, �
��&� ��zCorosync.setupc C s | � ddd� d S )Nzcorosync-objctlz(.*fence.*\.passwd=)(.*)z\1******)�do_cmd_output_sub�r r r r �postproc: s
�zCorosync.postprocN) �__name__�
__module__�__qualname__�
short_desc�plugin_name�profiles�packagesr! r$ r r r r r
s %r c s e Zd Z� fdd�Z� ZS )�RedHatCorosyncc � t t| ��� d S �N)�superr, r! r# �� __class__r r r! D � zRedHatCorosync.setup)r% r&