MOON
Server: Apache
System: Linux vps.erhabenn.com.br 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64
User: sonne (1011)
PHP: 8.2.31
Disabled: NONE
Upload Files
File: //lib/python2.7/site-packages/azurelinuxagent/daemon/main.pyc
�
d�bc@s|ddlZddlZddlZddljjZddljjZddljj	j
Z
ddlmZm
Z
mZddlmZddlmZddlmZddlmZddlmZddlmZmZmZmZmZmZm Z m!Z!dd	l"m#Z#dd
l$m%Z%ddl&m'Z'ddl(m)Z)dd
l*m+Z+dZ,d�Z-de.fd��YZ/dS(i����N(t	add_eventtWALAEventOperationt0initialize_event_logger_vminfo_common_parameters(tustr(t
get_osutil(tget_protocol_util(tsetup_rdma_device(ttextutil(t
AGENT_NAMEtAGENT_LONG_NAMEt
AGENT_VERSIONtDISTRO_NAMEtDISTRO_VERSIONtPY_VERSION_MAJORtPY_VERSION_MINORtPY_VERSION_MICRO(tget_resourcedisk_handler(tget_scvmm_handler(tget_update_handler(tget_provision_handler(tget_rdma_handlertOPENSSL_FIPScCst�S(N(t
DaemonHandler(((s?/usr/lib/python2.7/site-packages/azurelinuxagent/daemon/main.pytget_daemon_handler/sRcBsSeZdZd�Zdd�Zd�Zd�Zd�Zd�Z	dd�Z
RS(	sO
    Main thread of daemon. It will invoke other threads to do actual work
    cCst|_t�|_dS(N(tTruetrunningRtosutil(tself((s?/usr/lib/python2.7/site-packages/azurelinuxagent/daemon/main.pyt__init__8s	c	Cs�tjdtt�tjdtt�tjdttt�|j	�|j
�tj�rldt
jt<nx�|jr�y|j|�Wqotk
r�}tj|�}tdtdtdt|�dtj�tjd	�tjd
�qoXqoWdS(Ns{0} Version:{1}sOS: {0} {1}sPython: {0}.{1}.{2}t1tnamet
is_successtmessagetopsBDaemon ended with exception -- Sleep 15 seconds and restart daemoni(tloggertinfoR	R
RRR
RRt	check_pidtinitialize_environmenttconftget_fips_enabledtostenvirontOPENSSL_FIPS_ENVIRONMENTRtdaemont	ExceptionRtformat_exceptionRRtFalseRRtUnhandledErrortwarnttimetsleep(Rt
child_argsteterr_msg((s?/usr/lib/python2.7/site-packages/azurelinuxagent/daemon/main.pytrun<s 



cCs�d}tj�}tjj|�r6tj|�}n|jj	|�rht
jd|�tj
d�ntj|ttj���dS(s'Check whether daemon is already runningsDaemon is already running: {0}iN(tNoneR&tget_agent_pid_file_pathR(tpathtisfiletfileutilt	read_fileRtcheck_pid_aliveR"R#tsystexitt
write_fileRtgetpid(Rtpidtpid_file((s?/usr/lib/python2.7/site-packages/azurelinuxagent/daemon/main.pyR$ZscCsftj�}tjj|�rbddl}tjdj|��t	|_
|j�}|j�ndS(Ni����sSDisabling the guest agent by sleeping forever; to re-enable, remove {0} and restart(
R&tget_disable_agent_file_pathR(R9texistst	threadingR"R0tformatR.RtEventtwait(Rtagent_disabled_file_pathRFt
disable_event((s?/usr/lib/python2.7/site-packages/azurelinuxagent/daemon/main.pytsleep_if_disabledgs
	cCsKtjjtj��sGtjtj�dd�tjtj��ndS(Ntmodei�(R(R9tisdirR&tget_lib_dirR;tmkdirtchdir(R((s?/usr/lib/python2.7/site-packages/azurelinuxagent/daemon/main.pyR%rscCs|jj�}t|�dS(N(t
protocol_utiltget_protocolR(Rtprotocol((s?/usr/lib/python2.7/site-packages/azurelinuxagent/daemon/main.pyt_initialize_telemetryxscCs�tjd�t�|_t�|_t�|_t�|_	t
�|_t�|_
tj�rq|jj�ntj�r�|jj�n|jj�|jj�|j�tj�rL|j	j�}|j	j�tjd�y<|jj�}|jjdt�t||jj��WqYtk
rH}tjd|�qYXn
tjd�|j�tj �r�tjd�tj!�nx |j"r�|j
j#d|�q�WdS(Ns
Run daemons.RDMA capabilities are enabled in configurationtforce_updates Error setting up rdma device: %ss+RDMA capabilities are not enabled, skippingsbEnd of log to /dev/console. The agent will now check for updates and then will process extensions.R3($R"R#RRRRt
scvmm_handlerRtresourcedisk_handlerRtrdma_handlerRtprovision_handlerRtupdate_handlerR&tget_detect_scvmm_envR6tget_resourcedisk_formattclear_protocolRUtenable_rdmatget_rdma_versiontinstall_driver_if_neededRStclienttupdate_goal_stateRRtget_shared_confR,terrorRLtconsole_output_enabledtdisable_console_outputRt
run_latest(RR3t
nd_versionRTR4((s?/usr/lib/python2.7/site-packages/azurelinuxagent/daemon/main.pyR+|s>









N(t__name__t
__module__t__doc__RR7R6R$RLR%RUR+(((s?/usr/lib/python2.7/site-packages/azurelinuxagent/daemon/main.pyR3s		
			(0R(R>R1tazurelinuxagent.common.conftcommonR&tazurelinuxagent.common.loggerR"t%azurelinuxagent.common.utils.fileutiltutilsR;tazurelinuxagent.common.eventRRRtazurelinuxagent.common.futureRtazurelinuxagent.common.osutilRt$azurelinuxagent.common.protocol.utilRtazurelinuxagent.common.rdmaRtazurelinuxagent.common.utilsRtazurelinuxagent.common.versionRR	R
RRR
RRt#azurelinuxagent.daemon.resourcediskRtazurelinuxagent.daemon.scvmmRtazurelinuxagent.ga.updateRtazurelinuxagent.pa.provisionRtazurelinuxagent.pa.rdmaRR*RtobjectR(((s?/usr/lib/python2.7/site-packages/azurelinuxagent/daemon/main.pyt<module>s(: