id:ddlZddlmZmZmZGddeeeZy)N)Plugin RedHatPlugin UbuntuPluginc0eZdZdZdZdZdZdZdZdZ dZ 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 osdceph_osd)storagevirt containerceph)zceph-(.*-)?osd.*)z/var/lib/ceph/osd/*z/var/lib/ceph/*/osd*%/var/snap/microceph/common/data/osd/*c |jjjd}|s|jddi|j gd|j gd|j ddggd}|j |jDcgc]}|D] }d |d | c}}y|j gd |j d d gycc}}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 availablez config diffz config showdump_blacklistdump_blocked_opsdump_historic_ops_by_durationdump_historic_slow_ops dump_mempoolsdump_ops_in_flightdump_op_pq_statedump_osd_networkdump_reservations dump_watcherszlog dumpz perf dumpzperf histogram dumpobjecter_requestsopsstatusversionz ceph 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)policypackage_manager pkg_by_name add_file_tagsadd_forbidden_path add_copy_specadd_cmd_output get_socks)self microceph_pkgcmdsics =/usr/lib/python3/dist-packages/sos/report/plugins/ceph_osd.pysetupz CephOSD.setup%s 33?? L    :N    # #%          &!  D.   /3~~/?N!NAaS!%N%N   # #%    7@  OsC cg}tjdD]@\}}}|D]5}|jds|j|j ||7B|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)oswalkendswithappend path_join)r( ceph_socketsrdirdirsfilesfiles r-r'zCephOSD.get_socksjsi  !#)9!: D D$ D==) ''tT(BC D DN) __name__ __module__ __qualname____doc__ short_desc plugin_nameprofiles containersr8r.r'r:r-rrs0 JK7H&J 6ECJ r:r)r0sos.report.pluginsrrrrrCr:r-rEs" AAfflLfr: