Server IP : 15.235.198.142 / Your IP : 216.73.216.190 Web Server : Apache/2.4.58 (Ubuntu) System : Linux ballsack 6.8.0-45-generic #45-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 30 12:02:04 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /lib/python3/dist-packages/sos/report/plugins/__pycache__/ |
Upload File : |
� i��d� � �8 � d dl mZmZmZ d dlZ G d� dee� Zy)� )�Plugin�RedHatPlugin� PluginOptNc � � e Zd ZdZd ZdZdZdZedddfZefZ dZ ed e ed �� edd ed�� edd ed�� gZ d� Zd� Zd� Zd� Zd� Zy)� Microshifta: This is the plugin for MicroShift 4.X. Even though it shares some of the OpenShift components, its IoT/Edge target makes the product nimble and light, thus requiring different a approach when operating it. When enabled, this plugin will collect cluster information (such as systemd service logs, configuration, versions, etc.)and also inspect API resources in certain namespaces. The namespaces to scan are kube.* and openshift.*. Other namespaces may be collected by making use of the ``only-namespaces`` or ``add-namespaces`` options. � microshifti� )r zmicroshift-selinuxzmicroshift-networkingzmicroshift-greenbootzgreenboot-healthcheckzgreenboot-task-runnerzredboot-task-runnerz2/var/lib/microshift/resources/kubeadmin/kubeconfig� kubeconfigz+Path to a locally available kubeconfig file)�default�val_type�desc�only-namespaces� z2colon-delimited list of namespaces to collect from�add-namespaceszHcolon-delimited list of namespaces to add to the default collection listc �* � | j d� r.| j d� j d� D �cg c] }|�� c}S ddg}| j d� r9| j d� j d� D ] }|j d|z � � |S c c}w )z�Combine a set of regexes for collection with any namespaces passed to sos via the -k openshift.add-namespaces option. Note that this does allow for end users to specify namespace regexes of their own. r �:z^openshift\-.+$z ^kube\-.+$r z^%s$)� get_option�split�append)�self�n�collect_regexes�nsps �?/usr/lib/python3/dist-packages/sos/report/plugins/microshift.py�_setup_namespace_regexesz#Microshift._setup_namespace_regexes. s� � � �?�?�,�-�#���/@�A�G�G��L�M�!�A�M�M� �� �� �?�?�+�,����'7�8�>�>�s�C� 6���&�&�w��}�5� 6� ��� Ns � Bc � � � � fd�}� j � � _ t t |D �cg c] } ||� s�|�� c}� � S c c}w )a Reduce the namespace listing returned to just the ones we want to collect from. By default, as requested by OCP support personnel, this must include all 'openshift' prefixed namespaces :param nsps list: Namespace names from oc output c �X �� �j D ] }t j || � s� y y)z�Match a particular namespace for inclusion (or not) in the collection phases :param namespace str: The name of a namespace TF)r �re�match)� namespace�regexr s �r �_match_namespacez;Microshift._reduce_namespace_list.<locals>._match_namespaceI s0 �� � �-�-� ���8�8�E�9�-�� � � )r r �list�set)r �nspsr! r s ` r �_reduce_namespace_listz!Microshift._reduce_namespace_listA sA �� � � $�<�<�>����C�D�@�q�,<�Q�,?��@�A�B�B��@s � A�Ac � � | j d| j d� z � }|d dk( r#| j |d j d� � S g S )NzToc get namespaces -o custom-columns=NAME:.metadata.name --no-headers --kubeconfig=%sr �statusr �output� )�exec_cmdr r&