uec@sddlmZmZmZmZddlmZmZddlZddlZ defdYZ de eefdYZ de efd YZ dS( i(tPlugint RedHatPlugint DebianPlugint UbuntuPlugin(tdatetimet timedeltaNt PacemakercBszeZdZdZdZdZdZdd d defgZdZ d Z d Z d Z dZ dZdZRS(s9Pacemaker high-availability cluster resource manager t pacemakers1.0tclusterspacemaker-remotetcrm_froms%specify the start time for crm_reporttfasttt crm_scrubs(enable password scrubbing for crm_reportcCs|jddS(Nscrm_mon -1 -A -n -r -t(tadd_cmd_output(tself((s9/usr/lib/python2.7/site-packages/sos/plugins/pacemaker.pyt setup_crm_mon"scCs|jddgdS(Ns crm statusscrm configure show(R (R((s9/usr/lib/python2.7/site-packages/sos/plugins/pacemaker.pytsetup_crm_shell%scCs3|jd|jdddddddgdS( Ns/var/log/pcsd/pcsd.logs pcs configspcs status --fullspcs stonith sbd status --fullspcs stonith sbd watchdog listspcs stonith history showspcs quorum statusspcs property list --all(t add_copy_specR (R((s9/usr/lib/python2.7/site-packages/sos/plugins/pacemaker.pyt setup_pcs+s cCs|jddddS(Nscrm configure showspassw([^\s=]*)=\S+spassw\1=********(tdo_cmd_output_sub(R((s9/usr/lib/python2.7/site-packages/sos/plugins/pacemaker.pytpostproc_crm_shell7scCs|jddddS(Ns pcs configspassw([^\s=]*)=\S+spassw\1=********(R(R((s9/usr/lib/python2.7/site-packages/sos/plugins/pacemaker.pyt postproc_pcs>sc Cs|jddddddg|jtjtddjd}|jd rtjd t |jd r|jd }q|j d |jd n|j d d dt }|jdrd}n d}|j d|j d|jd|||fd|jd}tjj|jr|j|jt|j}x}|D]u}tj||rdtj||jd}x/ddddgD]}tj|d|}qW|j|qdqdWWdQXndS(Ns /var/log/pacemaker/pacemaker.logs/var/log/pacemaker/bundles/*/s/var/log/pacemaker.logs/var/log/cluster/pacemaker.logs/var/log/cluster/bundles/*/thoursiHs%Y-%m-%d %H:%m:%SR s#\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}s:crm_from parameter '%s' is not a valid date: using defaulttnamet crm_reporttmakeR s -p "passw.*"R s-scrubbing of crm passwords has been disabled:s:data collected by crm_report may contain sensitive values.s5crm_report --sos-mode %s -S -d --dest %s --from "%s"tchroots0^\s*PCMK_logfile=[\'\"]?(\S+)[\'\"]?\s*(\s#.*)?$is^"s"$s^\'s\'$(RRRttodayRtstrftimet get_optiontretmatchtstrt _log_errortget_cmd_output_pathtFalset _log_warnR ttmp_in_sysroottostpathtisfiletenvfiletopentsearchtgrouptsub( RR tcrm_destR tpatterntftlinetlogfiletregexp((s9/usr/lib/python2.7/site-packages/sos/plugins/pacemaker.pytsetupEsH          (R(Rspacemaker-remote(scrm_froms%specify the start time for crm_reportR R (t__name__t __module__t__doc__t plugin_nametversiontprofilestpackagestTruet option_listR)RRRRRR4(((s9/usr/lib/python2.7/site-packages/sos/plugins/pacemaker.pyRs    tDebianPacemakercBseZdZdZRS(cCs4d|_|j|jtt|jdS(Ns/etc/default/pacemaker(R)RRtsuperR>R4(R((s9/usr/lib/python2.7/site-packages/sos/plugins/pacemaker.pyR4s   cCs|j|jdS(N(RR(R((s9/usr/lib/python2.7/site-packages/sos/plugins/pacemaker.pytpostprocs (R5R6R4R@(((s9/usr/lib/python2.7/site-packages/sos/plugins/pacemaker.pyR>s tRedHatPacemakercBseZdZdZRS(cCs7d|_|j|jdtt|jdS(Ns/etc/sysconfig/pacemakers/etc/sysconfig/sbd(R)RRR?RAR4(R((s9/usr/lib/python2.7/site-packages/sos/plugins/pacemaker.pyR4s   cCs|jdS(N(R(R((s9/usr/lib/python2.7/site-packages/sos/plugins/pacemaker.pyR@s(R5R6R4R@(((s9/usr/lib/python2.7/site-packages/sos/plugins/pacemaker.pyRAs ( t sos.pluginsRRRRRRRtos.pathR&RR>RA(((s9/usr/lib/python2.7/site-packages/sos/plugins/pacemaker.pyt s "  r