HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //lib/python3.6/site-packages/sos/report/plugins/__pycache__/aap_containerized.cpython-36.pyc
3

\��h_�@s2ddlZddlmZmZmZGdd�dee�ZdS)�N)�Plugin�RedHatPlugin�	PluginOptc@sXeZdZdZdZdZdZdZedde	d	d
�edde	dd
�gZ
d
d�Zdd�Zdd�Z
dS)�AAPContainerizedzPCollects details about AAP Containerized setup
    under a user's home directoryzAAP Containerized SetupZaap_containerized�sysmgmt�ansible�podman�username�z>Username that was used to setup AAP containerized installation)�defaultZval_typeZdesc�	directoryzhAbsolute path to AAP containers volume directory. Defaults to 'aap' under provided user's home directoryc	s��jd�}|s�jd�dS�jd�sFtjjd|���}�j|d��n
�jd���j��r���fdd�d/D�}�j|��j��n�jd��d��d|�d�dfd|�d�d fg}x|D]\}}�j	||d!�q�W�j
|�}xP|D]H}�j	d|�d"|�d#�|�d$�d%d&��j	d|�d'|�d#�|d(d&��q�Wd)|k�r�d)}d|�d*|�d+�d,fd|�d*|�d-�d.fg}x |D]\}}�j	||d!��qrWdS)0Nr	z=Username is mandatory to collect AAP containerized setup logsr�~Zaapcsg|]}�j�|��qS�)�	path_join)�.0�path)�aap_directory_name�selfr�'/usr/lib/python3.6/aap_containerized.py�
<listcomp>;sz*AAPContainerized.setup.<locals>.<listcomp>�
containers�tls�controller/etc/*.cert�controller/etc/*.key�eda/etc/*.cert�
eda/etc/*.key�gateway/etc/*.cert�gateway/etc/*.key�hub/etc/*.cert�
hub/etc/*.key�hub/etc/keys/*.pem�postgresql/*.crt�postgresql/*.key�receptor/etc/*.crt�receptor/etc/*.key�receptor/etc/*.pem�redis/*.crt�redis/*.keyz
Directory z1 does not exist or invalid absolute path providedzsu - z -c 'podman info --debug'Zpodman_infoz  -c 'podman ps -a --format json'Zpodman_ps_all_json)�suggest_filenamez -c 'podman logs �'z.logZaap_container_logs)r(Zsubdirz -c 'podman inspect Zpodman_inspect_logszautomation-controller-taskz -c 'podman exec -it z+ bash -c "awx-manage check_license --data"'zawx-manage_check_license_--dataz% bash -c "awx-manage list_instances"'zawx-manage_list_instances)rrrrrrrrrrr r!r"r#r$r%r&r')Z
get_option�
_log_error�osr�
expanduserrZpath_existsZadd_forbidden_pathZ
add_copy_specZadd_cmd_output�_get_aap_container_names)	rr	Zuser_home_directoryZforbidden_pathsZpodman_commandsZcommand�filenameZaap_containersZ	containerr)rrr�setup)sl









zAAPContainerized.setupcCs\y8d|�d�}|j|�}|ddkr6|dj�jd�SgStk
rV|jd�gSXdS)Nzsu - z& -c 'podman ps -a --format {{.Names}}'�statusr�output�
z"Error retrieving Podman containers)�exec_cmd�strip�split�	Exceptionr*)rr	�cmdZcmd_outrrrr-�s

z)AAPContainerized._get_aap_container_namescCsHddddddg}|jd�}|dd	krDx|D]}||d
kr,dSq,WdS)
Nzdumb-init -- /usr/bin/envoyz!dumb-init -- /usr/bin/supervisordz'dumb-init -- /usr/bin/launch_awx_web.shz(dumb-init -- /usr/bin/launch_awx_task.shz+pulpcore-content --name pulp-content --bindzdumb-init -- aap-eda-managezps --noheaders -eo argsr0rr1TF)r3)rZ
aap_processesZ	ps_outputZprocessrrr�
check_enabled�s

zAAPContainerized.check_enabledN)rr)r)�__name__�
__module__�__qualname__�__doc__Z
short_descZplugin_nameZprofilesZpackagesr�strZoption_listr/r-r8rrrrrs$
Wr)r+Zsos.report.pluginsrrrrrrrr�<module>s