HEX
Server: Apache
System: Linux dinesh8189 5.15.98-grsec-sharedvalley-2.lc.el8.x86_64 #1 SMP Thu Mar 9 09:07:30 -03 2023 x86_64
User: cgmgerenciamento1 (814285)
PHP: 8.1.26
Disabled: apache_child_terminate,dl,escapeshellarg,escapeshellcmd,exec,link,mail,openlog,passthru,pcntl_alarm,pcntl_exec,pcntl_fork,pcntl_get_last_error,pcntl_getpriority,pcntl_setpriority,pcntl_signal,pcntl_signal_dispatch,pcntl_sigprocmask,pcntl_sigtimedwait,pcntl_sigwaitinfo,pcntl_strerror,pcntl_wait,pcntl_waitpid,pcntl_wexitstatus,pcntl_wifexited,pcntl_wifsignaled,pcntl_wifstopped,pcntl_wstopsig,pcntl_wtermsig,php_check_syntax,php_strip_whitespace,popen,proc_close,proc_open,shell_exec,symlink,system
Upload Files
File: //usr/lib/python3.6/site-packages/sos/report/plugins/__pycache__/pacemaker.cpython-36.pyc
3

3��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�pacemaker-remote�crm_from�z%specfiy the start time for crm_report)�defaultZval_type�desc�	crm_scrubTz$enable crm_report password scrubbing)rrcCs|jd�dS)Nzcrm_mon -1 -A -n -r -t)�add_cmd_output)�self�r�/usr/lib/python3.6/pacemaker.py�
setup_crm_mon#szPacemaker.setup_crm_moncCs|jddg�dS)Nz
crm statuszcrm configure show)r)rrrr�setup_crm_shell&szPacemaker.setup_crm_shellcCsJ|jd�|jddddg�|jddd�|jd	d
d�|jddd�dS)
Nz/var/log/pcsd/pcsd.logzpcs stonith sbd status --fullzpcs stonith sbd watchdog listzpcs stonith history showzpcs property list --allz
pcs configZ
pcs_config)Ztagszpcs quorum statusZpcs_quorum_statuszpcs status --fullZ
pcs_status)�
add_copy_specr)rrrr�	setup_pcs,s
zPacemaker.setup_pcscCs|jddd�dS)Nzcrm configure showzpassw([^\s=]*)=\S+zpassw\1=********)�do_cmd_output_sub)rrrr�postproc_crm_shell8szPacemaker.postproc_crm_shellcCs|jddd�dS)Nz
pcs configzpassw([^\s=]*)=\S+zpassw\1=********)r)rrrr�postproc_pcs?szPacemaker.postproc_pcsc	
CsV|jdddddddg�|j�tj�tdd�jd	�}|jd
�rxtjdt	|jd
���rd|jd
�}n|j
d|jd
��|jd
dd�}|jd�r�d}nd}|jd�|jd�|j
d|||f|j�d�d}|j|j��rR|j|j�t|j��Z}xR|D]J}tj||�r�tj||�jd�}xdD]}tj|d|�}�q"W|j|�q�WWdQRXdS)Nz!/var/log/pacemaker/pacemaker.log*z/var/log/pacemaker/bundles/*/z/var/log/pacemaker/pengine*z/var/log/pacemaker.logz/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}z:crm_from parameter '%s' is not a valid date: using defaultZ
crm_reportF)�nameZmakerz-p "passw.*"rz-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#.*)?$��^"�"$�^\'�\'$)r!r"r#r$)rrrZtodayrZstrftimeZ
get_option�re�match�strZ
_log_errorZget_cmd_output_pathZ	_log_warnrZtmp_in_sysrootZpath_isfile�envfile�open�search�group�sub)	rr
Zcrm_destr�pattern�f�lineZlogfileZregexprrr�setupFsJ






zPacemaker.setupN)r)r
r)�__name__�
__module__�__qualname__Z
short_descZplugin_nameZprofilesZpackagesrr'Zoption_listr(rrrrrr0rrrrr	s 
r	cs$eZdZ�fdd�Zdd�Z�ZS)�DebianPacemakercs.|jd�|_|j�|j�tt|�j�dS)Nz/etc/default/pacemaker)�	path_joinr(rr�superr4r0)r)�	__class__rrr0�szDebianPacemaker.setupcCs|j�|j�dS)N)rr)rrrr�postproc�szDebianPacemaker.postproc)r1r2r3r0r8�
__classcell__rr)r7rr4�sr4cs$eZdZ�fdd�Zdd�Z�ZS)�RedHatPacemakercs0|jd�|_|j�|jd�tt|�j�dS)Nz/etc/sysconfig/pacemakerz/etc/sysconfig/sbd)r5r(rrr6r:r0)r)r7rrr0�s
zRedHatPacemaker.setupcCs|j�dS)N)r)rrrrr8�szRedHatPacemaker.postproc)r1r2r3r0r8r9rr)r7rr:�sr:)Zsos.report.pluginsrrrrrrrr%r	r4r:rrrr�<module>	s
t