관리-도구
편집 파일: etcd.pyc
� u��ec @ sC d d l m Z m Z d d l m Z d e e f d � � YZ d S( i����( t Plugint RedHatPlugin( t patht etcdc B s8 e Z d Z d Z d Z d Z d Z d � Z d � Z RS( s etcd plugin R t containert systemt servicest clusters /etc/origin/node/pods/etcd.yamlc C s� t j d � r d } n d } | j � } | j d d g � | j d � d d d d g } | j g | D] } d | | f ^ qi � d d d g } | r� | j g | D] } d | | f ^ q� � n | j d � | j d d � d S( Ns /etc/origin/node/pods/etcd.yamls master-exec etcd etcd etcdctlt etcdctls /etc/etcd/cas /etc/etcd/*.keys /etc/etcds --versions member lists cluster-healths ls --recursives %s %ss /v2/stats/leaders /v2/stats/selfs /v2/stats/stores curl -s %s%ss ls -lR /var/lib/etcd/t unitsR ( R t existst get_etcd_urlt add_forbidden_patht add_copy_spect add_cmd_outputt add_journal( t selft etcd_cmdt etcd_urlt subcmdst subt urlst u( ( s4 /usr/lib/python2.7/site-packages/sos/plugins/etcd.pyt setup s( * - c C s� y_ t d d � �J } x@ | D]8 } | j d � r | j d � d j d d � j � Sq WWd QXWni t k r� d } y= | j j j � d } | d d } | d k r� d } n Wn t k r� n X| SXd S( Ns /etc/etcd/etcd.conft rt ETCD_LISTEN_CLIENT_URLSt =i t "t s http://localhost:2379R t versioni t 2s http://localhost:4001( t opent startswitht splitt replacet stript IOErrort policyt package_managert get_pkg_listt Exception( R t eft linet urlt ver( ( s4 /usr/lib/python2.7/site-packages/sos/plugins/etcd.pyR <