Ñò
K<Ì]c @ sc d d k Z d d k Z d d k Z d d k Z d d k l Z l Z d e e f d „ ƒ YZ d S( iÿÿÿÿN( t Plugint RedHatPlugint Glusterc B se e Z d Z d Z d Z d Z d d g Z d d g Z d „ Z d
„ Z d „ Z
d „ Z d
„ Z RS( s GlusterFS storaget glustert storaget virts /tmp/glusterfs-statedumpst glusterfss glusterfs-cores
/etc/glusterds /var/lib/glusterdc C sk g } t | d ƒ } xE | i ƒ D]7 } | i d ƒ p q" n | d d !} | i | ƒ q" W| i ƒ | S( s‰ Return a dictionary for which key are volume names according to the
output of gluster volume info stored in volume_file.
t rs Volume Name:i iÿÿÿÿ( t opent readlinest
startswitht appendt close( t selft volume_filet outt fpt linet volname( ( s7 /usr/lib/python2.6/site-packages/sos/plugins/gluster.pyt get_volume_names s
c C s` y t i | ƒ Wn n Xt d d ƒ } d | d } | i | ƒ | i d ƒ | i ƒ d S( Ns /tmp/glusterdump.optionst ws path=s
s all=yes( t ost mkdirR t writeR ( R
t name_dirR t data( ( s7 /usr/lib/python2.6/site-packages/sos/plugins/gluster.pyt make_preparations. s
c C sˆ d } t i | ƒ } xl | D]d } | d } d } d } xE | d j o7 t | d | d ƒ i ƒ d } t i | d ƒ } q; Wq Wd S( Ni i t tmpiÿÿÿÿt /R t
DUMP_END_TIME( R t listdirt fileR t stringt count( R
R t statedumps_presentt statedump_entriest statedump_filet last_linet ret( ( s7 /usr/lib/python2.6/site-packages/sos/plugins/gluster.pyt wait_for_statedump9 s
c C s† t i i | i ƒ p d Sy] x9 t i | i ƒ D]% } t i t i i | i | ƒ ƒ q1 Wt i | i ƒ t i d ƒ Wn n Xd S( Ns /tmp/glusterdump.options( R t patht existst
statedump_dirR t removet joint rmdirt unlink( R
t dirs( ( s7 /usr/lib/python2.6/site-packages/sos/plugins/gluster.pyt postprocE s #c C sý | i d ƒ | i d ƒ | i d d d d d d g ƒ | i | i ƒ | i d ƒ o> t i d
ƒ | i | i ƒ | i d ƒ | i | i ƒ n | i i
d ƒ | i d
ƒ } | o/ x, | i | ƒ D] } | i d | ƒ qÍ Wn | i d ƒ d S( Ns, /var/lib/glusterd/geo-replication/secret.pems gluster peer statuss /etc/redhat-storage-releases /etc/swift/s /etc/glusterd.rpmsaves /etc/glusterfss /var/lib/glusterd/s /var/log/glusterfss" killall -USR1 glusterfs glusterfsdi s /tmp/glusterdump.optionss- could not send SIGUSR1 to glusterfs processess gluster volume infos( gluster volume geo-replication %s statuss gluster volume status(
t add_forbidden_patht add_cmd_outputt
add_copy_specR R* t check_ext_progt timet sleepR' t soslogt infot get_cmd_output_nowR ( R
R R ( ( s7 /usr/lib/python2.6/site-packages/sos/plugins/gluster.pyt setupP s.
( R R (
t __name__t
__module__t __doc__t plugin_namet profilesR* t packagest filesR R R' R0 R: ( ( ( s7 /usr/lib/python2.6/site-packages/sos/plugins/gluster.pyR s ( R5 t os.pathR R t sos.pluginsR R R ( ( ( s7 /usr/lib/python2.6/site-packages/sos/plugins/gluster.pyt