%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/sos/report/plugins/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/sos/report/plugins/__pycache__/ceph_mgr.cpython-312.pyc

�

i��d���:�ddlZddlmZmZmZGd�deee�Zy)�N)�Plugin�RedHatPlugin�UbuntuPluginc�0�eZdZdZdZdZdZdZdZd�Z	d�Z
y	)
�CephMGRa?
    This plugin is for capturing information from Ceph mgr nodes. While the
    majority of this plugin should be version-agnostic, several collections are
    dependent upon the version of Ceph installed. Versions that correlate to
    RHCS 4 or RHCS 5 are explicitly handled for differences such as those
    pertaining to log locations on the host filesystem.

    Note that while this plugin will activate based on the presence of Ceph
    containers, commands are run directly on the host as those containers are
    often not configured to successfully run the `ceph` commands collected by
    this plugin. These commands are majorily `ceph daemon` commands that will
    reference discovered admin sockets under /var/run/ceph.

    Users may expect to see several collections twice - once in standard output
    from the `ceph` command, and again in JSON format. The latter of which will
    be placed in the `json_output/` subdirectory within this plugin's directory
    in the report archive. These JSON formatted collections are intended to
    aid in automated analysis.
    zCEPH mgr�ceph_mgr)�storage�virt�	container�ceph)z/var/lib/ceph/mgr/*z/var/lib/ceph/*/mgr*)zceph-(.*-)?mgr.*c��|jddi�|jgd��|jgd��gd�}|j|D�cgc]}d|����	c}�|j|D�cgc]}d|�d���
c}d�	�gd
�}|j|j	�D��cgc]}|D]
}d|�d|�����c}}�ycc}wcc}wcc}}w)
Nz"/var/log/ceph/(.*/)?ceph-mgr.*.log�ceph_mgr_log)z/etc/ceph/*keyring*z/var/lib/ceph/**/*keyring*z/var/lib/ceph/**/osd*z/var/lib/ceph/**/mon*z/var/lib/ceph/**/tmp/*mnt*z/etc/ceph/*bindpass*)z/var/log/ceph/**/ceph-mgr*.logz/var/lib/ceph/**/mgr*z/var/lib/ceph/**/bootstrap-mgr/z/run/ceph/**/ceph-mgr*)	zbalancer statuszorch host lszorch device lszorch lszorch ls --exportzorch pszorch status --detailzorch upgrade statuszlog last cephadmzceph z --format json-pretty�json_output)�subdir)zconfig diffzconfig show�
dump_cache�
dump_mempools�dump_osd_network�mds_requests�mds_sessions�objecter_requestsrrz	perf dumpzperf histogram dumpzperf histogram schemazperf schema�status�versionzceph daemon � )�
add_file_tags�add_forbidden_path�
add_copy_spec�add_cmd_output�	get_socks)�self�
ceph_mgr_cmds�cmd�cmds�ms     �=/usr/lib/python3/dist-packages/sos/report/plugins/ceph_mgr.py�setupz
CephMGR.setup*s�����0�.�
�	�	
���	!
�		�	
���
�	�

�
�	
���&3�4�s�u�S�E�]�4�	6�	
���;H�I�C�u�S�E�.�
/�I� �	�	
�

��&	
���.2�n�n�.>�P�)*�$�P�CF�l�1�#�Q�s�e�$�P�$�P�	
��5
5��
J��.Ps�
C�/
C�'C
c���g}tjd�D]R\}}}|D]G}|jd�s�|jd�s�'|j	|j||���I�T|S)z�
        Find any available admin sockets under /var/run/ceph (or subdirs for
        later versions of Ceph) which can be used for ceph daemon commands
        z/var/run/ceph/zceph-mgrz.asok)�os�walk�
startswith�endswith�append�	path_join)r�ceph_sockets�rdir�dirs�files�files      r$rzCephMGR.get_socksnst��
��!#���)9�!:�	D��D�$���
D���?�?�:�.�4�=�=��3I� �'�'����t�T�(B�C�
D�	D���N)�__name__�
__module__�__qualname__�__doc__�
short_desc�plugin_name�profilesr0�
containersr%r�r2r$rrs.���(�J��K�7�H�;�E�&�J�B
�H
r2r)r'�sos.report.pluginsrrrrr;r2r$�<module>r=s"��
�A�A�j�f�l�L�jr2

Zerion Mini Shell 1.0