
    ~ gX                     @    S SK r S SKrS SKJrJrJr   " S S\\5      rg)    N)PluginRedHatPlugin	PluginOptc                   J    \ rS rSrSrSrSrSrSrSr	\
" SS	S
S9/rS rS rSrg)Gluster   zGlusterFS storagegluster)storagevirtz/run/gluster)	glusterfszglusterfs-core)z/etc/glusterdz/var/lib/glusterddumpFzenable glusterdump support)defaultdescc                    U R                  S5      (       a  U R                  U R                  5      (       d  g  [        R                  " U R                  S-   5      nUR	                  [        R                  " U R                  S-   5      5        U H  n[
        R                  " U5        M     g g ! [         a  nU R                  SU 35         S nAg S nAff = f)Nr   z/*.dump.[0-9]*z/glusterd_state_[0-9]*_[0-9]*z"Could not remove statedump files: )	
get_optionpath_existsstatedump_dirglobextendosremoveOSError
_log_error)selfremove_filesnameerrs       </usr/lib/python3/dist-packages/sos/report/plugins/gluster.pypostprocGluster.postproc   s    ??6""##D$6$677L#yy););>N)NO##DIId.@.@$C/D %E F(DIIdO ) #  L"DSE JKKLs   A4B/ /
C9CCc                 4   U R                  S5        U R                  S5        U R                  SSS9  U R                  S5        U R                  SSS9  U R                  / S	Q[        R                  " S
5      -   5        U R	                  S5      (       d  U R                  / SQ5        OU R                  S5        U R	                  S5      (       a  U R                  U R                  5      (       a2  U R                  S5      (       a  U R                  U R                  5        O&U R                  R                  SU R                  5        U R                  S5      nUS   S:X  a'  US   R                  5       S   nU R                  U5        U R                  SSS9nUS   S:X  ax  US   R                  5        H`  nUR                  S5      (       d  M  USS  nU R                  SU S3SU S3SU S3SU S 3S!U S"3S#U 3S$U S%3S&U S3S'U 3S(U 3/
5        Mb     g g ))Nz,/var/lib/glusterd/geo-replication/secret.pemz6/var/lib/glusterd/glusterfind/glusterfind_*_secret.pemzgluster peer statusgluster_peer_status)tagszgluster pool listzgluster volume statusgluster_v_status)z/etc/redhat-storage-releasez/etc/swift/z/etc/glusterd.rpmsavez/etc/glusterfsz/var/lib/glusterd/z(/run/gluster/shared_storage/nfs-ganesha/z$/var/lib/glusterd/glusterfind/.keys/z/run/gluster/*tier-dht/*all_logs)z/var/log/glusterfs/*logz/var/log/glusterfs/*/*logz)/var/log/glusterfs/geo-replication/*/*logz/var/log/glusterfsr   zgluster(fs|fsd|d)z4Unable to generate statedumps, no such directory: %szgluster get-statestatusr   outputzgluster volume infogluster_v_infozVolume Name:   zgluster volume get z allzgluster volume geo-replication z statuszgluster volume heal z infoz info split-brainzgluster volume status z clientszgluster snapshot list zgluster volume quota z listzgluster volume rebalance zgluster snapshot info zgluster snapshot status )add_forbidden_pathadd_cmd_outputadd_copy_specr   r   r   r   signal_process_usr1soslogwarningexec_cmdsplitcollect_cmd_output
splitlines
startswith)r   state
state_file
volume_cmdlinevolnames         r   setupGluster.setup*   sV    NOD	
 	18MN/03!3 	 	5 	 
 II012 	3 z**    34??6"" 2 233++,@AA&&t'9'9:## %4595G5GIMM"56EX!#"8_224R8
"":.,,-B2B - D
h1$"8,779~66rs)##)'$75gYgF*7)59*7)3DE,WIX>,WI6+G9E:/y@,WI6.wi8% 	 : %     N)__name__
__module____qualname____firstlineno__
short_descplugin_nameprofilesr   packagesfilesr   option_listr   r;   __static_attributes__r>   r=   r   r   r      sB    $JK"H"M.H2E 	&%.JKKLAr=   r   )r   r   sos.report.pluginsr   r   r   r   r>   r=   r   <module>rK      s#     	 > >]fl ]r=   