/usr/lib/python3/dist-packages/sos/collector/clusters/__pycache__
NameSizeModeActions
ceph.cpython-310.pyc23710644editdlrm
jbon.cpython-310.pyc10400644editdlrm
juju.cpython-310.pyc72680644editdlrm
kubernetes.cpython-310.pyc17110644editdlrm
ocp.cpython-310.pyc119650644editdlrm
openstack.cpython-310.pyc26140644editdlrm
ovirt.cpython-310.pyc77720644editdlrm
pacemaker.cpython-310.pyc33030644editdlrm
saltstack.cpython-310.pyc27210644editdlrm
satellite.cpython-310.pyc17420644editdlrm
__init__.cpython-310.pyc153440644editdlrm
Edit: /usr/lib/python3/dist-packages/sos/collector/clusters/__pycache__/ovirt.cpython-310.pyc (7772B)
o G%@i@sXddlZddlmZddlmZdZGdddeZGdddeZGd d d eZdS) N)quote)Clusterz(/etc/pki/ovirt-engine/keys/engine_id_rsac@sleZdZdZdZdZdZgdZddZdd Z d d Z d d Z ddZ ddZ ddZddZddZdS)ovirta This cluster profile is for the oVirt/RHV project which provides for a virtualization cluster built ontop of KVM. Nodes enumerated will be hypervisors within the envrionment, not virtual machines running on those hypervisors. By default, ALL hypervisors within the environment are returned. This may be influenced by the 'cluster' and 'datacenter' cluster options, which will limit enumeration to hypervisors within the specific cluster and/or datacenter. The spm-only cluster option may also be used to only collect from hypervisors currently holding the SPM role. Optionally, to only collect an archive from manager and the postgresql database, use the no-hypervisors cluster option. By default, a second archive from the manager will be collected that is just the postgresql plugin configured in such a way that a dump of the manager's database that can be explored and restored to other systems will be collected. The ovirt profile focuses on the upstream, community ovirt project. The rhv profile is for Red Hat customers running RHV (formerly RHEV). The rhhi_virt profile is for Red Hat customers running RHV in a hyper-converged setup and enables gluster collections. zCommunity oVirt)z ovirt-enginez3/usr/share/ovirt-engine/dbscripts/engine-psql.sh -c)) no-databaseFzDo not collect a database dump)clusterz'Only collect from hosts in this cluster) datacenterrz*Only collect from hosts in this datacenter)no-hypervisorsFzDo not collect from hypervisors)spm-onlyFzOnly collect from SPM host(s)cCs"|jdt|}|j|ddS)z Wrapper for running DB queries on the manager. Any scrubbing of the query should be done _before_ passing the query to this method.  T need_root)db_execrexec_primary_cmd)selfquerycmdr>/usr/lib/python3/dist-packages/sos/collector/clusters/ovirt.py _run_db_query<szovirt._run_db_querycs@|sdSgdtfdd|Dr|d|ddS|S)z Manually sanitize SQL queries since we can't leave this up to the driver since we do not have an actual DB connection %)\  "'c3s|]}|vVqdS)Nr).0x invalid_charsrr Msz#ovirt._sql_scrub..zWARNING: Cluster option 'z2' contains invalid characters. Using '%%' instead.)anylog_warn)rvalrr r _sql_scrubDszovirt._sql_scrubcCsR|jjr#t|jj|jj|jjgs%|jtr'| t| ddSdSdSdS)a Checks for the presence of the VDSM ssh keys the manager uses for communication with hypervisors. This only runs if we're locally on the RHV-M, *and* if no ssh-keys are called out on the command line, *and* no --password option is given. z]Found engine SSH key. User command line does not specify a key or password, using engine key.N) primarylocalr#optsssh_keypasswordpassword_per_node file_exists ENGINE_KEYadd_default_ssh_key log_debugrrrr_check_for_engine_keysTs  zovirt._check_for_engine_keyscCs.d|_|ds ||_||dS)NFr)pg_pass get_option parse_db_confconf format_db_cmdr2r1rrrsetupes    z ovirt.setupcCsb||d}||d}d|d|d|_|dr&|jd7_|d|jdS) Nrrz_SELECT host_name from vds where cluster_id in (select cluster_id FROM cluster WHERE name like 'zG' and storage_pool_id in (SELECT id FROM storage_pool WHERE name like 'z'))r z AND spm_status = 2z#Query command for ovirt DB set to: )r&r4dbqueryr0)rrrrrrr7ls zovirt.format_db_cmdcCsZ|drgS||j}|ddkr$|ddd}dd|DStd |d) Nr statusroutputcSsg|] }|ddqS)(r)splitstrip)rnrrr sz#ovirt.get_nodes..z$database query failed, return code: )r4rr9 splitlines Exception)rresnodesrrr get_nodes{s   zovirt.get_nodescCs|ds |jr |SdS)NrF)r4r6collect_databaser1rrr run_extra_cmdszovirt.run_extra_cmdc Csi}d}|jd|dd}|ddkrF|d}|D]'}zt|dd}t|dd d d }|||<WqtyCYqw|Sd S) Nz6/etc/ovirt-engine/engine.conf.d/10-setup-database.confzcat Tr r:rr;=rrF)rrCstrr?replace IndexError)rr6engconfrEconfiglinekvrrrr5s    zovirt.parse_db_confcCsd}d|d|jdd|d|jdd|d|jd d|d |jd }d |jd d|}|j|dd}|dD]}t|dr]|}|jjd|dd|Sq@| ddS)N postgresqlz-k z.dbname=ENGINE_DB_DATABASEz -k z.dbhost=ENGINE_DB_HOSTz.dbport=ENGINE_DB_PORTz.dbuser=ENGINE_DB_USERz PGPASSWORD=ENGINE_DB_PASSWORDz> /usr/sbin/sos report --name=postgresql --batch -o postgresql Tr r;z*sosreport-*tar*postgresql_dump/r=zFailed to gather database dumpF) r6rrCfnmatchr@r'manifest add_fieldr? log_error)rpluginsos_optrdb_sosrQ_pg_dumprrrrHs<    zovirt.collect_databaseN)__name__ __module__ __qualname____doc__ cluster_namepackagesr option_listrr&r2r8r7rGrIr5rHrrrrrs  rc@s eZdZdZdZdZddZdS)rhvzRed Hat Virtualization)rhevmrhvmcCs$|j|jjkr dS|drdSdS)Nmanagerzovirt-node-ng-nodectlrhvhrhelh)addressr' is_installed)rnoderrrset_node_labels  zrhv.set_node_labelN)rdrerfrhri sos_presetrtrrrrrks  rkc@s0eZdZdZdZddiZdZddZdd Zd S) rhhi_virtz6Red Hat Hyperconverged Infrastructure - Virtualization)glusterz gluster.dumponrkcCs|jdo |S)Nrm)r'rr_check_for_rhhivr1rrr check_enabledszrhhi_virt.check_enabledcCs2|d}|ddkr|dddkSdS)Nz+SELECT count(server_id) FROM gluster_serverr:rr;r<0F)rrCr@)rretrrrrys  zrhhi_virt._check_for_rhhivN) rdrerfrh sos_pluginssos_plugin_optionsrurzryrrrrrvs rv) r\shlexrsos.collector.clustersrr.rrkrvrrrrs