%PDF- %PDF-
Direktori : /lib/python3/dist-packages/sos/report/plugins/__pycache__/ |
Current File : //lib/python3/dist-packages/sos/report/plugins/__pycache__/ceph_osd.cpython-312.pyc |
� i��d� � �: � d dl Z d dlmZmZmZ G d� deee� Zy)� N)�Plugin�RedHatPlugin�UbuntuPluginc �0 � e Zd ZdZdZdZdZdZdZd� Z d� Z y ) �CephOSDa� This plugin is for capturing information from Ceph OSD nodes. While the majority of this plugin should be version agnotics, 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. zCEPH osd�ceph_osd)�storage�virt� container�ceph)zceph-(.*-)?osd.*)z/var/lib/ceph/osd/*z/var/lib/ceph/*/osd*�%/var/snap/microceph/common/data/osd/*c �� � | j j j d� }|s�| j ddi� | j g d�� | j g d�� | j ddg� g d�}| j | j � D ��cg c] }|D ] }d |� d |� ��� � c}}� y | j g d�� | j dd g� y c c}}w )N� microcephz(/var/log/ceph/(.*/)?ceph-(.*-)?osd.*.log�ceph_osd_log)z/etc/ceph/*keyring*z/var/lib/ceph/**/*keyring*z/var/lib/ceph/**/tmp/*mnt*z/etc/ceph/*bindpass*)z/run/ceph/**/ceph-osd*z/var/lib/ceph/**/kv_backendz/var/log/ceph/**/ceph-osd*.logz!/var/log/ceph/**/ceph-volume*.logzceph-disk listzceph-volume lvm list)zbluestore bluefs availablezconfig diffzconfig show�dump_blacklist�dump_blocked_ops�dump_historic_ops_by_duration�dump_historic_slow_ops� dump_mempools�dump_ops_in_flight�dump_op_pq_state�dump_osd_network�dump_reservations� dump_watcherszlog dumpz perf dumpzperf histogram dump�objecter_requests�ops�status�versionzceph daemon � )z'/var/snap/microceph/common/**/*keyring*z(/var/snap/microceph/current/**/*keyring*z"/var/snap/microceph/common/state/*r z./var/snap/microceph/common/logs/*ceph-osd*.log)�policy�package_manager�pkg_by_name� add_file_tags�add_forbidden_path� add_copy_spec�add_cmd_output� get_socks)�self� microceph_pkg�cmds�i�cs �=/usr/lib/python3/dist-packages/sos/report/plugins/ceph_osd.py�setupz CephOSD.setup% s� � ����3�3�?�?��L� �����:�N� � � �#�#� %� � ��� � � ��� �&�!� � �D�. ���/3�~�~�/?�N�!��N�A��a�S��!��%�N�%�N� � �#�#� %� � ���7�@� � �� Os �C c � � g }t j d� D ]@ \ }}}|D ]5 }|j d� s�|j | j ||� � �7 �B |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/z.asok)�os�walk�endswith�append� path_join)r( �ceph_sockets�rdir�dirs�files�files r- r'