Current File : //usr/lib/python3/dist-packages/sos/collector/__pycache__/__init__.cpython-312.pyc |
�
-�_g�� � � � d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl Z d dl
m
Z
d dlmZ d dl
m
Z
d dlmZ d dlmZ d dlmZ d dlmZ d d lmZ d d
lmZmZ d dlmZ d dlmZ d d
lm Z dZ! G d� de� Z"y)� N)�datetime)�ThreadPoolExecutor)�getpass)�Path)�quote)�fill)�
SoSCleaner)�SosNode)�
ClusterOption�str_to_bool)�SoSComponent)�bold)�__version__z/etc/sos/groups.dc � � � e Zd ZdZdZi dd�dd�dd�dd�dd�d d
�dd�dg �d
d�dd
�dg �dg �dg �dd�dd�dd�dd�i dd�dd�dg �dd�dd�d g �d!d�d"d�d#d�d$d�d%d�d&d�d'd(�d)d�d*d�d+d�d,g ��i d-d�d.d�d/d�d0d�d1d�d2g �d3d�d4d�d5g �d6d�d7d�d8d�d9d�d:d�d;d�d<d�d=d��i d>g �d?g �d@g �dAd�dBdC�dDdE�dFdG�dHd
�dId�dJg �dKd�dLd�dMd�dNd�dOd�dPd
�dQd��d
dddddddR��Z� fdS�ZdT� ZedU� � Z edV� � Z
edW� � ZdX� ZedY� � Z
edZ� � Zd|d[�Zd\� Zd]� Zd^� Zd_� Zd`� Zda� Zdb� Zdc� Zdd� Zde� Zdf� Zdg� Zdh� Zdi� Zdj� Zdk� Zdl� Z dm� Z!dn� Z"do� Z#dp� Z$dq� Z%dr� Z&ds� Z'dt� Z(du� Z)dv� Z*dw� Z+dx� Z,dy� Z-dz� Z.d{� Z/� xZ0S )}�SoSCollectora�
sos collect, or SoS Collector, is the formerly standalone sos-collector
project, brought into sos natively in 4.0 and later.
It is meant to collect sos reports from an arbitrary number of remote
nodes, as well as the localhost, at the same time. These nodes may be
either user defined, defined by some clustering software, or both.
For cluster defined lists of nodes, cluster profiles exist that not only
define how these node lists are generated but may also influence the
sos report command run on nodes depending upon their role within the
cluster.
Nodes are connected to via a 'transport' which defaults to the use of
OpenSSH's Control Persist feature. Other transport types are available, and
may be specifically linked to use with a certain cluster profile (or, at
minimum, a node within a certain cluster type even if that profile is not
used).
sos collect may be run from either a node within the cluster that is
capable of enumerating/discovering the other cluster nodes, or may be run
from a user's workstation and instructed to first connect to such a node
via the --primary option. If run in the latter manner, users will likely
want to use the --no-local option, as by default sos collect will also
collect an sos report locally.
Users should expect this command to result in a tarball containing one or
more sos report archives on the system that sos collect was executed on.
z8Collect an sos report from multiple nodes simultaneously�all_logsF�
alloptions�allow_system_changes�become_root�case_id�chroot�auto�clean�cluster_options�cluster_typeN�container_runtime�domains�disable_parsers�enable_plugins�encrypt_key� �encrypt_pass�group�image�inherit_config_file�force_pull_imageT�skip_cleaning_files�jobs� �journal_sizer �keywords�keyword_file�keep_binary_files�label�list_options�log_size�low_priority�map_file� /etc/sos/cleaner/default_mapping�primary�
namespaces�node_config_file�nodes�no_env_vars�no_local�
nopasswd_sudo�no_pkg_check� no_update�only_plugins�password�password_per_node�plugopts�plugin_timeout�cmd_timeout�preset�
registry_user�registry_password�registry_authfile�
save_group�since�
skip_commands�
skip_files�skip_plugins�ssh_key�ssh_port� �ssh_user�root�timeoutiX � transport�verify� usernames�upload�
upload_url�upload_directory�upload_user�upload_pass�
upload_method�upload_no_ssl_verify)�upload_protocol�upload_s3_endpoint�upload_s3_region�upload_s3_bucket�upload_s3_access_key�upload_s3_secret_key�upload_s3_object_prefixc �� �� t �| � |||� t j d� g | _ g | _ d | _ d| _ d | _ d | _ | j j j d� | j j j | _ | j j dd� | j j! d� t# | j$ dd� t'