%PDF- %PDF-
Direktori : /lib/python2.7/site-packages/salt/states/ |
Current File : //lib/python2.7/site-packages/salt/states/glusterfs.pyo |
� ���^c @@ s� d Z d d l m Z m Z m Z m Z d d l Z d d l j j Z d d l Z d d l m Z e j e � Z d d d d d d d d d d d d g Z d � Z d � Z e e e d e e e d � Z d � Z d � Z d � Z d � Z d S( u Manage GlusterFS pool. i ( t absolute_importt unicode_literalst print_functiont generatorsN( t SaltCloudExceptionu Peer {0} added successfully.u Probe on localhost not neededu% Host {0} is already in the peer groupu+ Host {0} is already part of another clusteru- Volume on {0} conflicts with existing volumesu% UUID of {0} is the same as local uuiduZ {0} responded with "unknown peer". This could happen if {0} doesn't have localhost definedu- Failed to add peer. Information on {0}'s logsu9 Cluster quorum is not met. Changing peers is not allowed.u2 Failed to update list of missed snapshots from {0}u- Conflict comparing list of snapshots from {0}u, Peer is already being detached from cluster.c C@ s d t k r d St S( u= Only load this module if the gluster command exists u glusterfs.list_volumesu glusterfs( t __salt__t False( ( ( s9 /usr/lib/python2.7/site-packages/salt/states/glusterfs.pyt __virtual__! s c @ s� i � d 6i d 6d d 6t d 6} y t j � d � Wn t k rT d | d <| SXt j j j � � } | d k r� t t j j j � � } | j t j j j � � | j | � r� t | d <d | d <| Sn t d � } | r't � f d � | j � D� � r't | d <d j � � | d <| St d rRd j � � | d <d | d <| St d � � syd j � � | d <| St d � } | r�t � f d � | j � D� � r�t | d <d j � � | d <i | d 6| d 6| d <n d j � � | d <| S( uY Check if node is peered. name The remote host with which to peer. .. code-block:: yaml peer-cluster: glusterfs.peered: - name: two peer-clusters: glusterfs.peered: - names: - one - two - three - four u nameu changesu u commentu resultu a-zA-Z0-9._-u Invalid characters in peer name.u$ Peering with localhost is not neededu glusterfs.peer_statusc 3@ s | ] } � | d k Vq d S( u hostnamesN( ( t .0t v( t name( s9 /usr/lib/python2.7/site-packages/salt/states/glusterfs.pys <genexpr>V s u Host {0} already peeredu testu Peer {0} will be added.u glusterfs.peeru5 Failed to peer with {0}, please check logs for errorsc 3@ s | ] } � | d k Vq d S( u hostnamesN( ( R R ( R ( s9 /usr/lib/python2.7/site-packages/salt/states/glusterfs.pys <genexpr>f s u Host {0} successfully peeredu newu olduH Host {0} was successfully peered but did not appear in the list of peersN( R t suct check_nameR t saltt utilst networkt host_to_ipst Nonet sett ip_addrst updatet ip_addrs6t intersectiont TrueR t anyt valuest formatt __opts__( R t rett name_ipst this_ipst peerst newpeers( ( R s9 /usr/lib/python2.7/site-packages/salt/states/glusterfs.pyt peered( sH ( ( u tcpc C@ sO i | d 6i d 6d d 6t d 6} t j | d � rB d | d <| St d � } | | k r4t d r� d j | � } | r� | d 7} n | | d <d | d <| St d | | | | | | | | | � } | s� d j | � | d <| S| } t d � } | | k rGi | d 6| d 6| d <d j | � | d <qGn d j | � | d <| r*t d rw| d d | d <d | d <| St t d � | d � d k r�t | d <| d d | d <q*t d | � } | rt | d <| d d | d <| d s'i d d 6d d 6| d <q'q*| d d | d <| Sn t d rAd | d <n t | d <| S( uQ Ensure that the volume exists name name of the volume bricks list of brick paths replica replica count for volume arbiter use every third brick as arbiter (metadata only) .. versionadded:: 2019.2.0 start ensure that the volume is also started .. code-block:: yaml myvolume: glusterfs.volume_present: - bricks: - host1:/srv/gluster/drive1 - host2:/srv/gluster/drive2 Replicated Volume: glusterfs.volume_present: - name: volume2 - bricks: - host1:/srv/gluster/drive2 - host2:/srv/gluster/drive3 - replica: 2 - start: True Replicated Volume with arbiter brick: glusterfs.volume_present: - name: volume3 - bricks: - host1:/srv/gluster/drive2 - host2:/srv/gluster/drive3 - host3:/srv/gluster/drive4 - replica: 3 - arbiter: True - start: True u nameu changesu u commentu resultu a-zA-Z0-9._-u"