%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/sos/collector/clusters/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/sos/collector/clusters/__pycache__/ceph.cpython-312.pyc

�

i��db	��.�ddlZddlmZGd�de�Zy)�N)�Clusterc�2�eZdZdZdZdgZddiZdZdgZd�Z	y	)
�cepha!
    This cluster profile is for Ceph Storage clusters, and is primarily
    built around Red Hat Ceph Storage 5. Nodes are enumerated via `cephadm`; if
    your Ceph deployment uses cephadm but is not RHCS 5, this profile may work
    as intended, but it is not currently guaranteed to do so. If you are using
    such an environment and this profile does not work for you, please file a
    bug report detailing what is failing.

    By default, all nodes in the cluster will be returned for collection. This
    may not be desirable, so users are encouraged to use the `labels` option
    to specify a colon-delimited set of ceph node labels to restrict the list
    of nodes to.

    For example, using `-c ceph.labels=osd:mgr` will return only nodes labeled
    with *either* `osd` or `mgr`.
    zCeph Storage Cluster�ceph_commonzlog-size�2)�cephadm)�labels�z3Colon delimited list of labels to select nodes withc���g|_|jdd��}|ddk(s#|jd|d���|jStj|dj�d�}|j
d	�jd
�D�cgc]}|s�|��	}}|D]K�|r)t�fd�|D��s|j��d���.|jj�d
��M|jScc}w)Nz0cephadm shell -- ceph orch host ls --format jsonT)�	need_root�statusrz'Could not enumerate nodes via cephadm: �output���r	�:c3�,�K�|]}|�dv���
y�w)r	N�)�.0�_l�nodes  ��=/usr/lib/python3/dist-packages/sos/collector/clusters/ceph.py�	<genexpr>z!ceph.get_nodes.<locals>.<genexpr><s�����"J�B�2��h��#7�"J�s�z! filtered from list due to labels�hostname)�nodes�exec_primary_cmd�	log_error�json�loads�
splitlines�
get_option�split�any�	log_debug�append)�self�ceph_outr�lab�_labelsrs     @r�	get_nodeszceph.get_nodes,s�����
��(�(�>��)�
��
��!�Q�&��N�N�9�(�8�:L�9M�N�
��:�:���
�
�8�H�-�8�8�:�2�>�?��"&�/�/�(�";�"A�"A�#�"F�N�3�#�3�N��N��	0�D��s�"J�'�"J�J����$��'H�I�J���J�J���d�:�.�/�		0��z�z���Os�C<�C<N)
�__name__�
__module__�__qualname__�__doc__�cluster_name�sos_plugins�sos_options�packages�option_listr(r�rrrs8���"*�L���K��r�"�K��H�M��K�r2r)r�sos.collector.clustersrrrr2r�<module>r4s���*�1�7�1r2

Zerion Mini Shell 1.0