
    ([Qh	                     l    d dl Z d dlmZmZmZmZ  G d de      Z G d dee      Z G d deee      Zy)	    N)PluginRedHatPluginDebianPluginUbuntuPluginc                   (    e Zd ZdZdZdZdZd Zd Zy)CorosynczCorosync cluster enginecorosync)cluster)r	   c                 .   | j                  g d       | j                  g d       | j                  dd       | j                  d       d}| j                  |      sy d}	 | j	                  d      }t        |d	d
      5 }|D ]M  }t        j                  ||      s| j                  t        j                  ||      j                  d             O 	 d d d        y # 1 sw Y   y xY w# t        $ r!}| j                  d| d|        Y d }~y d }~ww xY w)N)z/etc/corosyncz/var/lib/corosync/fdataz/var/log/cluster/corosync.log*)zcorosync-quorumtool -lzcorosync-quorumtool -szcorosync-cpgtoolzcorosync-cfgtool -szcorosync-blackboxzcorosync-objctl -azcorosync-cmapctl -m statszcorosync-cmapctlcorosync_cmapctl)tagszkillall -USR2 corosyncz/etc/corosync/corosync.confz ^\s*(logging.)?logfile:\s*(\S+)$rzUTF-8)encoding   zcould not read from z: )add_copy_specadd_cmd_outputexec_cmdpath_exists	path_joinopenrematchsearchgroupIOError	_log_warn)selfcorosync_confpatterncconffilelineerrs          =/usr/lib/python3/dist-packages/sos/report/plugins/corosync.pysetupzCorosync.setup   s    
 	
 	 
 	 	.!3 	 	5./5. 6	JNN#@AEeS73 Nt  NDxx.**299Wd+C+I+I!+LMNN N N  	JNN1-3%HII	Js<   "C* C6CC* C'#C* 'C* *	D3DDc                 *    | j                  ddd       y )Nzcorosync-objctlz(.*fence.*\.passwd=)(.*)z\1******)do_cmd_output_sub)r   s    r$   postproczCorosync.postproc;   s    '	
    N)	__name__
__module____qualname__
short_descplugin_nameprofilespackagesr%   r(    r)   r$   r   r      s"    *JKHH$JL
r)   r   c                       e Zd ZdZy)RedHatCorosync0 Parent class Corosync's setup() will be called N)r*   r+   r,   __doc__r1   r)   r$   r3   r3   C   s    :r)   r3   c                       e Zd ZdZdZy)DebianCorosyncr4   )z/usr/sbin/corosyncN)r*   r+   r,   r5   filesr1   r)   r$   r7   r7   G   s
    :#Er)   r7   )	r   sos.report.pluginsr   r   r   r   r   r3   r7   r1   r)   r$   <module>r:      s;    
 O O3
v 3
l;X| ;$X|\ $r)   