%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/sos/collector/clusters/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/sos/collector/clusters/__pycache__/openstack.cpython-312.pyc

�

i��d��2�ddlZddlmZdZGd�de�Zy)�N)�Clusterz9/var/lib/mistral/overcloud/tripleo-ansible-inventory.yamlc�(�eZdZdZdZgd�Zd�Zd�Zy)�rhospa�
    This cluster profile is for use with Red Hat OpenStack Platform
    environments.

    Different types of nodes may be enumerated by toggling the various profile
    options such as Controllers and Compute nodes. By default, only Controller
    nodes are enumerated.

    Node enumeration is done by inspecting the ansible inventory file used for
    deployment of the environment. This is canonically located at
    /var/lib/mistral/overcloud/tripleo-ansible-inventory.yaml. Similarly, the
    presence of this file on the primary node is what triggers the automatic
    enablement of this profile.

    Special consideration should be taken for where `sos collect` is being run
    from, in that the hostnames of the enumerated nodes must be resolveable
    from that system - not just from the primary node from which those nodes
    are discovered. If this is not possible, consider enabling the `use-ip`
    cluster option to instead have this profile source the IP addresses of the
    nodes in question.
    zRed Hat OpenStack Platform))�use-ipFz0use IP addresses instead of hostnames to connect)�
controllerTz%collect reports from controller nodes)�computeFz"collect reports from compute nodesc�D�|jjtd��S)NT)�	need_root)�primary�file_exists�	INVENTORY)�selfs �B/usr/lib/python3/dist-packages/sos/collector/clusters/openstack.py�
check_enabledzrhosp.check_enabled0s���|�|�'�'�	�T�'�B�B�c��g}|jd�rdnd}	tj|jj	t
��}	dD]Z}|j|j��s�#||dj�D]}|j||d||��!�\	|S#t$r$}|jd|z�t
d��d}~wwxYw#t$r"}|jd�d	|���Yd}~|Sd}~wwxYw)
Nr�external_ip�ctlplane_hostnamezError parsing yaml: %sz'Could not parse yaml for node addresses)�
Controller�Compute�hostszError getting z host addresses: )�
get_option�yaml�	safe_loadr�	read_filer
�	Exception�log_info�lower�keys�append�	log_error)r�_nodes�_addr_field�_inv�err�_t�hosts       r�	get_nodeszrhosp.get_nodes3s����(,����(A�}�*�	�	G��>�>�$�,�,�"8�"8��"C�D�D�	N�/�
L���?�?�2�8�8�:�.� $�R��� 1� 6� 6� 8�L���
�
�d�2�h�w�&7��&=�k�&J�K�L�
L��
���	G��M�M�2�S�8�9��E�F�F��	G���	N��N�N�B��L�M�M��
��	N�s5�2B.�$C�1:C�.	C�7C�C�	D	�'D�D	N)�__name__�
__module__�__qualname__�__doc__�cluster_name�option_listrr(�rrrrs ���,0�L��K�C�rr)r�sos.collector.clustersrr
rr/rr�<module>r1s���*�G�	�2�G�2r

Zerion Mini Shell 1.0