⚝
One Hat Cyber Team
⚝
Your IP:
216.73.217.4
Server IP:
41.128.143.86
Server:
Linux host.raqmix.cloud 6.8.0-1025-azure #30~22.04.1-Ubuntu SMP Wed Mar 12 15:28:20 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.3.23
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
lib
/
python3
/
dist-packages
/
uaclient
/
__pycache__
/
View File Name :
upgrade_lts_contract.cpython-310.pyc
o (f) @ s d Z ddlZddlZddlZddlmZmZmZmZm Z ddl mZ ddlm Z ddlmZ ddd d ddd Zee eZde ddfddZdd ZdS )a This function is called from lib/upgrade_lts_contract.py and from lib/reboot_cmds.py This function should be used after running do-release-upgrade in a machine. It will detect any contract deltas between the release before do-release-upgrade and the current release. If we find any differences in the uaclient contract between those releases, we will apply that difference in the upgraded release. For example, suppose we are on Trusty and we are upgrading to Xenial. We found that the apt url for esm services on trusty: https://esm.ubuntu.com/ubuntu While on Xenial, the apt url is: https://esm.ubuntu.com/infra/ubuntu This script will detect differences like that and update the Xenial system to reflect them. N)contractdefaultsmessagessystemutil)_is_attached)UAConfig) machine_tokentrustyxenialbionicfocallunarjammy)r r r r manticnoblecfgreturnc C s@ t d t| jst d d S t d tjddgddgd\}}|r*ttj t j }t| }t |}|d u rRttjj|d t d |t td |j|d}| }d}|r}t d td tjddgddgd\}}|d7 }|s`t d|| ttj tj| ||ddd t d| ttj d S )Nz%Check whether to upgrade-lts-contractz4Skipping upgrade-lts-contract. Machine is unattachedzStarting upgrade-lts-contract.lsofz/var/lib/apt/lists/lockr )rcs)releasez?Could not find past release for %s. Current known releases: %r.)seriesz4Detected that apt lock is held. Sleeping 10 seconds. z9upgrade-lts-contract processing contract deltas: %s -> %sTF)r past_entitlementsnew_entitlementsallow_enableseries_overridesz/upgrade-lts-contract succeeded after %s retries)LOGdebugr is_attachedr subpprintr 'RELEASE_UPGRADE_APT_LOCK_HELD_WILL_WAITget_release_infor r get_machine_token_file!current_codename_to_past_codenamegetRELEASE_UPGRADE_NO_PAST_RELEASEformatwarningsysexitentitlementstimesleepRELEASE_UPGRADE_STARTINGr process_entitlements_deltaRELEASE_UPGRADE_SUCCESS) r out_errcurrent_releasemachine_token_filepast_releaser r retry_count r9 ?/usr/lib/python3/dist-packages/uaclient/upgrade_lts_contract.py%process_contract_delta_after_apt_lock4 sb r; c C s t tj d S )N)r ensure_folder_absentr ESM_APT_ROOTDIRr9 r9 r9 r: remove_private_esm_apt_cachen s r> )__doc__loggingr+ r. uaclientr r r r r (uaclient.api.u.pro.status.is_attached.v1r uaclient.configr uaclient.filesr r&