%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/sos/report/plugins/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/sos/report/plugins/__pycache__/pacemaker.cpython-312.pyc

�

i��d*���ddlmZmZmZmZmZddlmZmZddlZGd�de�Z	Gd�de	ee�Z
Gd�d	e	e�Zy)
�)�Plugin�RedHatPlugin�DebianPlugin�UbuntuPlugin�	PluginOpt)�datetime�	timedeltaNc�r�eZdZdZdZdZdZedded��ed	d
d��gZ	dZ
d
�Zd�Zd�Z
d�Zd�Zd�Zy)�	Pacemakerz4Pacemaker high-availability cluster resource manager�	pacemaker)�cluster)rzpacemaker-remote�crm_from�z%specfiy the start time for crm_report)�default�val_type�desc�	crm_scrubTz$enable crm_report password scrubbing)rrc�&�|jd�y)Nzcrm_mon -1 -A -n -r -t��add_cmd_output��selfs �>/usr/lib/python3/dist-packages/sos/report/plugins/pacemaker.py�
setup_crm_monzPacemaker.setup_crm_mon#s�����4�5�c�*�|jddg�y)Nz
crm status�crm configure showrrs r�setup_crm_shellzPacemaker.setup_crm_shell&s������ �
�	rc��|jd�|jgd��|jdd��|jdd��|jdd	��y)
Nz/var/log/pcsd/pcsd.log)zpcs stonith sbd status --fullzpcs stonith sbd watchdog listzpcs stonith history showzpcs property list --all�
pcs config�
pcs_config)�tagszpcs quorum status�pcs_quorum_statuszpcs status --full�
pcs_status)�
add_copy_specrrs r�	setup_pcszPacemaker.setup_pcs,sb�����3�4����
�	�	
���L�|��<����/�6I��J����/�l��Crc�*�|jddd�y)Nr�passw([^\s=]*)=\S+�passw\1=********��do_cmd_output_subrs r�postproc_crm_shellzPacemaker.postproc_crm_shell8s����� �!��	
rc�*�|jddd�y)Nr r(r)r*rs r�postproc_pcszPacemaker.postproc_pcs?s������!��	
rc	�*�|jgd��|j�tj�t	d��z
jd�}|j
d�rctjdt|j
d���r|j
d�}n#|jd|j
d�z�|jdd	�
�}|j
d�rd}n$d
}|jd�|jd�|jd|�d|�d|�d�|j���d}|j|j �r�|j|j �t#|j �5}|D]m}tj||�s�tj$||�j'd�}dD]}tj(|d
|�}�|j|��o	ddd�yy#1swYyxYw)N)z!/var/log/pacemaker/pacemaker.log*�/var/log/pacemaker/bundles/*/z/var/log/pacemaker/pengine*z/var/log/pacemaker.logr0z/var/log/cluster/pacemaker.log*z/var/log/cluster/bundles/*/�H)�hoursz%Y-%m-%d %H:%m:%Srz#\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}z:crm_from parameter '%s' is not a valid date: using default�
crm_reportF)�name�makerz-p "passw.*"rz-scrubbing of crm passwords has been disabled:z:data collected by crm_report may contain sensitive values.zcrm_report --sos-mode z -S -d  --dest z	 --from "�")�chrootz0^\s*PCMK_logfile=[\'\"]?(\S+)[\'\"]?\s*(\s#.*)?$�)z^"z"$z^\'z\'$)r%rr�todayr	�strftime�
get_option�re�match�str�
_log_error�get_cmd_output_path�	_log_warnr�tmp_in_sysroot�path_isfile�envfile�open�search�group�sub)	rr�crm_destr�pattern�f�line�logfile�regexps	         r�setupzPacemaker.setupFs������

�
	�	
�����N�N�$��B�'�(�)1��2E�)F�	��?�?�:�&��x�x�>��D�O�O�J�7�8�:��?�?�:�6������ $���
� ;�<�=��+�+��E�+�J���?�?�;�'�&�I��I��N�N�J�K��N�N�0�
1����&��(�<�$(�#6�#6�#8�	�	:�F�����D�L�L�)����t�|�|�,��d�l�l�#�
4�q��4�D��x�x���.�#%�)�)�G�T�":�"@�"@��"C��&D�B�F�&(�f�f�V�R��&A�G�B��*�*�7�3�4�
4�
4�*�
4�
4�s�H	�(AH	�	HN)�__name__�
__module__�__qualname__�
short_desc�plugin_name�profiles�packagesrr>�option_listrDrrr&r,r.rO�rrrrsh��G�J��K��H��H�	�*�b�3�>�	@��+�t�=�	?��K��G�6��
D�
�
�:4rrc�$��eZdZ�fd�Zd�Z�xZS)�DebianPacemakerc���|jd�|_|j�|j�tt
|��y)Nz/etc/default/pacemaker)�	path_joinrDrr&�superrZrO�r�	__class__s �rrOzDebianPacemaker.setup�s7����~�~�&>�?�����������
�o�t�*�,rc�D�|j�|j�y�N)r,r.rs r�postproczDebianPacemaker.postproc�s�����!����r�rPrQrRrOrb�
__classcell__�r_s@rrZrZ�s
���-�rrZc�$��eZdZ�fd�Zd�Z�xZS)�RedHatPacemakerc���|jd�|_|j�|jd�tt
|��y)Nz/etc/sysconfig/pacemakerz/etc/sysconfig/sbd)r\rDr&r%r]rgrOr^s �rrOzRedHatPacemaker.setup�s:����~�~�&@�A����������/�0�
�o�t�*�,rc�$�|j�yra)r.rs rrbzRedHatPacemaker.postproc�s�����rrcres@rrgrg�s
���-�rrg)�sos.report.pluginsrrrrrrr	r<rrZrgrXrr�<module>rksB��9�9�(�	�q4��q4�h	�i��|�	��i��r

Zerion Mini Shell 1.0