📂 FileMgr
📍
/
usr
/
lib
/
python3
/
dist-packages
/
sos
/
report
/
plugins
/
__pycache__
✏️ /usr/lib/python3/dist-packages/sos/report/plugins/__pycache__/lxd.cpython-312.pyc
✕ Tutup
� G%@i: � �8 � d dl Z d dlmZmZmZ G d� dee� Zy)� N)�Plugin�UbuntuPlugin�SoSPredicatec �0 � e Zd ZdZdZdZdZdZdZd� Z d� Z y ) �LXDzLXD container hypervisor�lxd)� container)r )�lxcr )�snap.lxd.daemonzsnap.lxd.activatec � � | j �r%t | dgddi�� }| j d|d�� | j g d�� | j d � s| j d dg� n| j dg� d }| j d|� d�� d}| j |d�� dddd�dddd�dddd�dddd�dddd�g}|D ]i }|j d d� }t j |j d!� � }|j d"� }| j d#|� d$|� �d%|� d&|� �|�'� �k y t | d(gddi�� }| j d)d*g� | j g d+�|�,� | j d-gd.�� y )/Nr �services�all)r �required�lxd.buginfoT)�pred�snap_cmd)z/var/snap/lxd/common/configz /var/snap/lxd/common/global-confz#/var/snap/lxd/common/lxc/local.confz&/var/snap/lxd/common/lxd/logs/*/*.conf�all_logsz#/var/snap/lxd/common/lxd/logs/*.logz%/var/snap/lxd/common/lxd/logs/*/*.logz /var/snap/lxd/common/lxd/logs/**z$/var/snap/lxd/common/lxd/cluster.crtzopenssl x509 -in z -noout -datesz(/var/snap/lxd/common/lxd/database/global�ls_lxd_dqlite_dir)�suggest_filenamez/SELECT * FROM sqlite_master WHERE type="table";�schema�local)�query�suggested_file_suffix�dbzgSELECT * FROM config WHERE NOT ( key LIKE "%keyring%" OR key LIKE "%ca_cert%" OR key LIKE "%ca_key%" );�configzSELECT * FROM raft_nodes;� raft_nodeszSELECT * FROM nodes;�nodes�globalzSELECT * FROM nodes_roles;�nodes_rolesr r r zlxd sql � �lxd_sql_�_)r r r z/etc/default/lxd-bridgez/var/log/lxd/*)zlxc image listzlxc listzlxc network listzlxc profile listzlxc storage list)r z)find /var/lib/lxd -maxdepth 2 -type d -lszvar-lxd-dirs.txt) �is_snapr �add_cmd_output� add_copy_spec� get_option�add_dir_listing�get�json�dumps) �self�lxd_pred� dqlite_crt�db_path�queries�query_entryr r �file_suffixs �8/usr/lib/python3/dist-packages/sos/report/plugins/lxd.py�setupz LXD.setup s � ��<�<�#�D�4E�3F�.8�%�-@�B�H� ��� �H�t��L���� � � �?�?�:�.��"�"�9�;�$� � �"�"�6�$� � @�J����#�J�<�~�>� � A�G�� � ��!4� !� � L�-5�!��3� .6�!� � 9�-9�!�� 4�-4�"�� :�-:�"��9!�G�F '� �� �_�_�T�7�3��� � �;�?�?�7�#;�<��)�o�o�.E�F���#�#��r�d�!�E�7�+�'/��t�1�[�M�%B�!� $� � � $�D�E�7�.8�%�-@�B�H����)� � � � ��� !� � � � ���;�!� 2� � 4� c �&