Spamworldpro Mini Shell
Spamworldpro


Server : Apache/2.4.52 (Ubuntu)
System : Linux webserver 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 6 17:42:15 UTC 2 x86_64
User : www-data ( 33)
PHP Version : 8.1.2-1ubuntu2.21
Disable Function : NONE
Directory :  /lib/python3/dist-packages/sos/report/plugins/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/sos/report/plugins/__pycache__/pacemaker.cpython-310.pyc
o

i��d*�@snddlmZmZmZmZmZddlmZmZddlZGdd�de�Z	Gdd�de	ee�Z
Gdd	�d	e	e�ZdS)
�)�Plugin�RedHatPlugin�DebianPlugin�UbuntuPlugin�	PluginOpt)�datetime�	timedeltaNc@sneZdZdZdZdZdZeddedd�ed	d
dd�gZ	dZ
d
d�Zdd�Zdd�Z
dd�Zdd�Zdd�ZdS)�	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)rrcCs|�d�dS)Nzcrm_mon -1 -A -n -r -t��add_cmd_output��self�r�>/usr/lib/python3/dist-packages/sos/report/plugins/pacemaker.py�
setup_crm_mon#szPacemaker.setup_crm_moncCs|�ddg�dS)Nz
crm status�crm configure showrrrrr�setup_crm_shell&s
�zPacemaker.setup_crm_shellcCsF|�d�|�gd��|jddd�|jddd�|jdd	d�dS)
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_specrrrrr�	setup_pcs,s

zPacemaker.setup_pcscC�|�ddd�dS)Nr�passw([^\s=]*)=\S+�passw\1=********��do_cmd_output_subrrrr�postproc_crm_shell8�
�zPacemaker.postproc_crm_shellcCr")Nrr#r$r%rrrr�postproc_pcs?r(zPacemaker.postproc_pcsc	CsZ|�gd��|��t��tdd��d�}|�d�r7t�dt	|�d���r-|�d�}n
|�
d|�d��|jdd	d
�}|�d�rFd}nd
}|�d�|�d�|j
d|||f|��d�d}|�|j�r�|�|j�t|j��.}|D]"}t�||�r�t�||��d�}dD]	}t�|d
|�}q�|�|�qvWd�dS1s�wYdSdS)N)z!/var/log/pacemaker/pacemaker.log*�/var/log/pacemaker/bundles/*/z/var/log/pacemaker/pengine*z/var/log/pacemaker.logr*z/var/log/cluster/pacemaker.log*z/var/log/cluster/bundles/*/�H)�hoursz%Y-%m-%d %H:%m:%Srz#\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.*"r
z-scrubbing of crm passwords has been disabled:z:data collected by crm_report may contain sensitive values.z5crm_report --sos-mode %s -S -d  --dest %s --from "%s")�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�regexprrr�setupFsT��
���


��
��"��zPacemaker.setupN)�__name__�
__module__�__qualname__�
short_desc�plugin_name�profiles�packagesrr7�option_listr=rrr!r'r)rHrrrrr	s&���r	c�$eZdZ�fdd�Zdd�Z�ZS)�DebianPacemakercs.|�d�|_|��|��tt|���dS)Nz/etc/default/pacemaker)�	path_joinr=rr!�superrRrHr��	__class__rrrH�szDebianPacemaker.setupcCs|��|��dS�N)r'r)rrrr�postproc�szDebianPacemaker.postproc�rIrJrKrHrX�
__classcell__rrrUrrR��rRcrQ)�RedHatPacemakercs0|�d�|_|��|�d�tt|���dS)Nz/etc/sysconfig/pacemakerz/etc/sysconfig/sbd)rSr=r!r rTr\rHrrUrrrH�s
zRedHatPacemaker.setupcCs|��dSrW)r)rrrrrX�szRedHatPacemaker.postprocrYrrrUrr\�r[r\)�sos.report.pluginsrrrrrrrr5r	rRr\rrrr�<module>st

Spamworldpro Mini