File: //lib/python3/dist-packages/sos/report/plugins/__pycache__/corosync.cpython-310.pyc
o
([Qh� � @ 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)�cluster)r c
C s� | � g d�� | �g d�� | jddd� | �d� d}| �|�s#d S d}z8| �d�}t|d d
d��!}|D ]}t�||�rI| � t�||�� d�� q5W d � W d S 1 sVw Y W d S t
y{ } z| �d
|� d|� �� 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+)$�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�err� 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"