%PDF- %PDF-
Direktori : /lib/python3/dist-packages/sos/collector/clusters/__pycache__/ |
Current File : //lib/python3/dist-packages/sos/collector/clusters/__pycache__/openstack.cpython-312.pyc |
� i��d � �2 � d dl Z d dlmZ dZ G d� de� Zy)� N)�Clusterz9/var/lib/mistral/overcloud/tripleo-ansible-inventory.yamlc �( � e Zd ZdZdZg d�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 � | j j t d�� S )NT)� need_root)�primary�file_exists� INVENTORY)�selfs �B/usr/lib/python3/dist-packages/sos/collector/clusters/openstack.py� check_enabledzrhosp.check_enabled0 s � ��|�|�'�'� �T�'�B�B� c � � g }| j d� rdnd} t j | j j t � � } dD ]Z }| j |j � � s�#|| d j � D ] }|j || d | | � �! �\ |S # t $ r$}| j d|z � t d� �d }~ww xY w# t $ r"}| j d�d |��� Y d }~|S d }~ww xY w) 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_nodes3 s � ���(,����(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_listr r( � r r r r s � ��, 0�L��K�C�r r )r �sos.collector.clustersr r r r/ r r �<module>r1 s �� � *�G� �2�G� 2r