403Webshell
Server IP : 77.50.203.18  /  Your IP : 192.168.0.10
Web Server : Apache/2.4.62 (CentOS Stream) OpenSSL/3.5.7 mpm-itk/2.4.7-04 PHP/8.4.23
System : Linux web2 5.14.0-722.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Mon Jul 6 09:07:51 UTC 2026 x86_64
User : warsnews.ru ( 1001)
PHP Version : 8.4.23
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3.9/site-packages/sos/report/plugins/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3.9/site-packages/sos/report/plugins/__pycache__/pacemaker.cpython-39.opt-1.pyc
a

ܓ�i��@szddlZddlmZmZddlmZmZmZmZmZddl	m
Z
Gdd�de�ZGdd�deee�ZGd	d
�d
ee�Z
dS)�N)�datetime�	timedelta)�Plugin�RedHatPlugin�DebianPlugin�UbuntuPlugin�	PluginOpt)�sos_parse_versionc@sneZdZdZdZdZdZeddedd�ed	d
dd�gZ	dZ
d
d�Zdd�Zdd�Z
dd�Zdd�Zdd�ZdS)�	Pacemakerz4Pacemaker high-availability cluster resource manager�	pacemaker)Zcluster)rzpacemaker-remote�crm-from�z%specfiy the start time for crm_report)�defaultZval_type�desc�	crm-scrubTz$enable crm_report password scrubbing)rrcCs|�d�dS)z Get cluster summary zcrm_mon -1 -A -n -r -tN��add_cmd_output��self�r�@/usr/lib/python3.9/site-packages/sos/report/plugins/pacemaker.py�
setup_crm_mon$szPacemaker.setup_crm_moncCs|�ddg�dS)z& Get cluster status and configuration z
crm status�crm configure showNrrrrr�setup_crm_shell(s�zPacemaker.setup_crm_shellcCs�|jj�d�}|durdS|�d�|�gd��d�|d�}t|�td�kr\|�d�n
|�d	�|jd
dd�|jd
dd�|jddd�dS)z& Get pacemaker/corosync configuration ZpcsNz/var/log/pcsd/pcsd.log)zpcs stonith sbd status --fullzpcs stonith sbd watchdog listzpcs stonith history show�.�versionz0.10.8zpcs property config --allzpcs property list --all�
pcs configZ
pcs_config)�tagszpcs quorum statusZpcs_quorum_statuszpcs status --fullZ
pcs_status)ZpolicyZpackage_managerZpkg_by_name�
add_copy_specr�joinr	)rZpcs_pkgZpcs_versionrrr�	setup_pcs/s

zPacemaker.setup_pcscCs |�ddd�|�ddd�dS)z Clear password and api keys r�passw([^\s=]*)=\S+�passw\1=********z(api[_]?key[^\s=]*)=\S+z\1=********N�Zdo_cmd_output_subrrrr�postproc_crm_shellFs��zPacemaker.postproc_crm_shellcCs|�ddd�dS)z Clear password rr!r"Nr#rrrr�postproc_pcsSs
�zPacemaker.postproc_pcsc	Csr|�gd��|��t��tdd��d�}|�d�rrt�dt	|�d���rZ|�d�}n|�
d|�d��d��|jd	d
d�}|�d�r�d
}nd}|�d�|�d�|j
d|�d|�d|�d�|��d�d}|�|j��rn|�|j�t|jddd��`}|D]J}t�||��rt�||��d�}dD]}t�|d|�}�q*|�|��qWd�n1�sd0YdS)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)Zhoursz%Y-%m-%d %H:%m:%Srz#\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}zcrm_from parameter 'z$' is not a valid date: using defaultZ
crm_reportF)�nameZmakerz-p "passw.*"r
z-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#.*)?$�rzUTF-8)�encoding�)z^"z"$z^\'z\'$)rrrZtodayr�strftimeZ
get_option�re�match�strZ
_log_errorZget_cmd_output_pathZ	_log_warnrZtmp_in_sysrootZpath_isfile�envfile�open�search�group�sub)	rZcrm_fromZcrm_destZ	crm_scrub�pattern�file�lineZlogfileZregexprrr�setup[sL��
��


���zPacemaker.setupN)�__name__�
__module__�__qualname__Z
short_descZplugin_nameZprofilesZpackagesrr1Zoption_listr2rrr r$r%r:rrrrr
s$���
r
cs$eZdZ�fdd�Zdd�Z�ZS)�DebianPacemakercs*|�d�|_|��|��t���dS)Nz/etc/default/pacemaker)�	path_joinr2rr �superr:r��	__class__rrr:�szDebianPacemaker.setupcCs|��|��dS�N)r$r%rrrr�postproc�szDebianPacemaker.postproc�r;r<r=r:rD�
__classcell__rrrArr>�sr>cs$eZdZ�fdd�Zdd�Z�ZS)�RedHatPacemakercs,|�d�|_|��|�d�t���dS)Nz/etc/sysconfig/pacemakerz/etc/sysconfig/sbd)r?r2r rr@r:rrArrr:�s
zRedHatPacemaker.setupcCs|��dSrC)r%rrrrrD�szRedHatPacemaker.postprocrErrrArrG�srG)r/rrZsos.report.pluginsrrrrrZ
sos.utilitiesr	r
r>rGrrrr�<module>	s

Youez - 2016 - github.com/yon3zu
LinuXploit