文件操作 - ceph.cpython-310.pyc
返回文件管理
返回主菜单
删除本文件
文件: /usr/lib/python3/dist-packages/sos/collector/clusters/__pycache__/ceph.cpython-310.pyc
编辑文件内容
o i��db � @ s( d dl Z d dlmZ G dd� de�ZdS )� N)�Clusterc @ s4 e Zd ZdZdZdgZddiZdZdgZdd � Z d S )�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 s� g | _ | jddd�}|d dks| �d|d � �� | j S t�|d �� d �}d d � | �d��d�D �}|D ] � |rOt� fd d�|D ��sO| � � � d�� q7| j � � d � q7| j S )Nz0cephadm shell -- ceph orch host ls --format jsonT)� need_root�statusr z'Could not enumerate nodes via cephadm: �output���c S s g | ]}|r|�qS � r )�.0�labr r �=/usr/lib/python3/dist-packages/sos/collector/clusters/ceph.py� <listcomp>: s z"ceph.get_nodes.<locals>.<listcomp>r �:c 3 s � | ] }|� d v V qdS )r Nr )r �_l��noder r � <genexpr><