3 ܓi @sZddlZddlmZmZmZmZGdddeZGdddeeZGdddeeeZdS) N)Plugin RedHatPlugin DebianPlugin UbuntuPluginc@s,eZdZdZdZd Zd ZddZddZdS) CorosynczCorosync cluster enginecorosyncclustercCs|jdddg|jdddddd d g|jd d d |jdd}|j|sRdSd}yZ|jd}t|ddd8}x0|D](}tj||rx|jtj||j dqxWWdQRXWn8t k r}z|j d|d|WYdd}~XnXdS)Nz /etc/corosyncz/var/lib/corosync/fdataz/var/log/cluster/corosync.log*zcorosync-quorumtool -lzcorosync-quorumtool -szcorosync-cpgtoolzcorosync-cfgtool -szcorosync-blackboxzcorosync-objctl -azcorosync-cmapctl -m statszcorosync-cmapctlZcorosync_cmapctl)Ztagszkillall -USR2 corosyncz/etc/corosync/corosync.confz ^\s*(logging.)?logfile:\s*(\S+)$rzUTF-8)encodingzcould not read from z: ) Z add_copy_specZadd_cmd_outputZexec_cmdZ path_existsZ path_joinopenrematchsearchgroupIOErrorZ _log_warn)selfZ corosync_confpatternZcconffilelineerrr/usr/lib/python3.6/corosync.pysetups6     *zCorosync.setupcCs|jddddS)Nzcorosync-objctlz(.*fence.*\.passwd=)(.*)z\1******)Zdo_cmd_output_sub)rrrrpostproc;szCorosync.postprocN)r)r) __name__ __module__ __qualname__Z short_descZ plugin_nameZprofilesZpackagesrrrrrrr s &rc@seZdZdZdS)RedHatCorosyncz0 Parent class Corosync's setup() will be called N)rrr__doc__rrrrrCsrc@seZdZdZdZdS)DebianCorosyncz0 Parent class Corosync's setup() will be called /usr/sbin/corosyncN)r!)rrrrfilesrrrrr Gsr ) r Zsos.report.pluginsrrrrrrr rrrr s6