+
    ˜qgj€*  ã                   óp  a € R% t+0 t R t^ RIt^ RIt^ RIt^ RIt^ RIt^ RIHt ^ RI	H
t
HtHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt R	tR
RR].R]R. /t] ^ k ]P2                  ! ]4      tR tR tR tR tR t R t!R t"R t#R]3R]3R]3R]3R] 3R]!3R]"3.t$R]#/t%R R lt&R  t'R! t(R" R# lt)R$ t*R# )&z:Resizefs: cloud-config module which resizes the filesystemN)ÚOptional)Ú	lifecycleÚsubpÚutil)ÚCloud)ÚConfig)Ú
MetaSchema)ÚALL_DISTROS)Ú
PER_ALWAYSÚnoblockÚidÚcc_resizefsÚdistrosÚ	frequencyÚactivate_by_schema_keysc                 ód  € \         P                  ! V 4      '       g<   \        P                  P	                  R V ,          4      '       d   RRRRR V ,          .pMRRRRV .p\
        P                  P                  R4      p\
        P                  P                  \        P                  ! RR.4      P                  P                  R4      ^ ,          P                  R4      R
,          P                  4       4      pWC8¼  d+   VP                  R4      pVP                  V^,           R	4       \        V4      # )z%s/.snapshotsÚbtrfsÚ
filesystemÚresizeÚmaxz5.10z	--versionÚ
Úvz	--enqueueéÿÿÿÿ)r   Úmount_is_read_writeÚosÚpathÚisdirr   ÚVersionÚfrom_strr   ÚstdoutÚsplitÚstripÚindexÚinsertÚtuple)Úmount_pointÚdevpthÚcmdÚbtrfs_with_queueÚsystem_btrfs_verÚidxs   &&    Ú>/usr/lib/python3/dist-packages/cloudinit/config/cc_resizefs.pyÚ_resize_btrfsr,   %   s   € ô ×#Ò# K×0Ò0´R·W±W·]±]Ø˜+Õ%÷6ò 6ð ØØØØ˜kÕ)ð
‰ð ˜ h°°{ÐCˆô
 !×(Ñ(×1Ñ1°&Ó9ÐÜ ×(Ñ(×1Ñ1Ü�	Š	�7˜KÐ(Ó)ß	‰—‘�d“˜Aõ	ç	‰ˆs‹�Bõ	÷ 
‰‹ó	Ðð Ô+Ø�i‰i˜Ó!ˆØ�
‰
�3˜•7˜KÔ(ä�‹:Ðó    c                 ó
   € R V3# )Ú	resize2fs© ©r%   r&   s   &&r+   Ú_resize_extr2   I   s   € Ø˜Ð Ð r-   c                 ó
   € R V 3# )Ú
xfs_growfsr0   r1   s   &&r+   Ú_resize_xfsr5   M   s   € Ø˜+Ð&Ð&r-   c                 ó   € R RV 3# )Úgrowfsz-yr0   r1   s   &&r+   Ú_resize_ufsr8   Q   s   € Ø�d˜KÐ(Ð(r-   c                 ó   € R RRW3# )ÚzpoolÚonlinez-er0   r1   s   &&r+   Ú_resize_zfsr<   U   s   € Ø�X˜t [Ð9Ð9r-   c                 ó   € R RV 3# )Úhammer2r7   r0   r1   s   &&r+   Ú_resize_hammer2r?   Y   s   € Ø�x Ð-Ð-r-   c                ó   € RRRV3# )zSingle device resizeÚbcachefsÚdevicer   r0   r1   s   &&r+   Ú_resize_bcachefsrC   ]   s   € à˜ (¨FÐ3Ð3r-   c                 óî   € R pRp \         P                   ! RRV.4       R#   \         P                   d?   pTP                  P                  T4      '       d   Y4P                  9   d    Rp?R# ThRp?ii ; i)zgrowfs: requested sizez.is not larger than the current filesystem sizer7   z-NNTF)r   ÚProcessExecutionErrorÚstderrÚ
startswith)r%   r&   Ú
skip_startÚskip_containÚes   &&   r+   Ú_can_skip_resize_ufsrK   b   si   € ð *€JØC€LðÜ�	Š	�8˜T 6Ð*Ô+ñ øô ×%Ñ%ô Ø�8‰8×Ñ˜z×*Ò*¨|¿x¹xÔ/GåàˆGûðús   †! ¡A4¶1A/Á-A/Á/A4r   ÚextÚxfsÚufsÚzfsr>   rA   c                ó:   € V ^8„  d   QhR\         \        ,          /# )é   Úreturn)r   Ústr)Úformats   "r+   Ú__annotate__rU   …   s   € ÷ ñ ¬´#­ñ r-   c                 óÌ  € \         P                  ! 4       '       d   \        P                  M\        P                  p\
        P                  P                  R 4      '       g   \        P                  R4       R#  \        P                  ! RRV .4      w  r#V'       d   \        P                  RVV 4       R#  RpTP                  R4       Fa  p\        P                  ! YE4      '       g   K!  Y9  g   K)  R	T9  g   K2  TP                  4       ^ ,          p\        P                  R
Y4       Tu # 	  T! RYT4       R#   \        P                   d   pT! RY4        Rp?R# Rp?ii ; i)z/dev/zfsz"Cannot get zpool info, no /dev/zfsNr:   Ústatusz0zpool status returned error: [%s] for zpool [%s]z$Unable to get zpool status of %s: %sz.*(ONLINE).*r   Ústatezfound zpool "%s" on disk %sz'No zpool found: [%s]: out: [%s] err: %s)r   Úis_containerÚLOGÚdebugÚwarningr   r   Úexistsr   ÚinforE   r    ÚreÚsearch)r:   Úlog_warnÚzpoolstatusÚerrÚrÚlineÚdisks   &      r+   Úget_device_info_from_zpoolrg   …   s  € ä ×-Ò-×/Ò/Œs�yŠy´S·[±[€HÜ�7‰7�>‰>˜*×%Ò%Ü�	‰	Ð6Ô7ÙðÜŸ9š9 g¨x¸Ð%?Ó@ÑˆßÜ�H‰HØBØØôñ
 ð ð 	€AØ×!Ñ! $Ö'ˆÜ�9Š9�Q×Ô %Ö"3¸ÀtÖ8KØ—:‘:“< •?ˆDÜ�I‰IÐ3°UÔAØŠKñ	 (ñ
 Ø1°5Àsôñ øô ×%Ñ%ô ÙÐ7¸ÔDÝûðús   Á9:D: Ä:E#Å	EÅE#c                 ó¢   € V P                  4       p\        P                  4        F&  w  rEVP                  V4      '       g   K  V! W4      u # 	  R # )F)ÚlowerÚRESIZE_FS_PRECHECK_CMDSÚitemsrG   )Úfs_typeÚresize_whatr&   Ú	fstype_lcÚiÚfuncs   &&&   r+   Úcan_skip_resizerq   £   sC   € Ø—‘“€IÜ*×0Ñ0Ö2‰ˆØ×Ñ ×"Ô"Ù˜Ó,Ò,ñ 3ñ r-   c                ó  € \         P                  ! 4       pV R8X  dˆ   \        P                  P	                  V 4      '       gc   V'       g[   \         P
                  ! \         P                  ! 4       4      p V f   \        P                  R4       R# \        P                  RV 4       V R8X  d   \        P                  RW4       R# V P                  R4      '       d   \        P                  R4       V # V P                  R	4      '       gW   \        P                  P	                  V 4      '       g2   R	V P                  R
4      ,           p\        P                  RV V4       Tp  \        P                  ! V 4      p\        P                   ! TP"                  4      '       ga   \        P$                  ! TP"                  4      '       g;   T'       d   \        P                  RT T4       R# \        P                  RT T4       R# T #   \         dƒ   pT'       d8   TP                  \        P                  8X  d   \        P                  RT T4       M8TP                  \        P                  8X  d   \        P                  RY4       MTh Rp?R# Rp?ii ; i)a”  Return updated devpath if the devpath is a writable block device.

@param devpath: Requested path to the root device we want to resize.
@param info: String representing information about the requested device.
@param log: Logger to which logs will be added upon error.

@returns devpath or updated devpath per kernel command line if the device
    path is a writable block device, returns None otherwise.
z	/dev/rootNz!Unable to find device '/dev/root'z.Converted /dev/root to '%s' per kernel cmdlineÚoverlayrootz)Not attempting to resize devpath '%s': %szgpt/z#We have a gpt label - just go aheadz/dev/Ú/z:'%s' doesn't appear to be a valid device path. Trying '%s'z9Device '%s' did not exist in container. cannot resize: %sz,Device '%s' did not exist. cannot resize: %sz>device '%s' not a block device in container. cannot resize: %sz1device '%s' not a block device. cannot resize: %s)r   rY   r   r   r]   Úrootdev_from_cmdlineÚget_cmdlinerZ   r\   r[   rG   ÚlstripÚstatÚOSErrorÚerrnoÚENOENTÚS_ISBLKÚst_modeÚS_ISCHR)Údevpathr^   Ú	containerÚfulldevpathÚstatretÚexcs   &&    r+   Úmaybe_get_writable_device_pathr„   «   sâ  € ô ×!Ò!Ó#€Ið 	�;ÔÜ—‘—‘˜w×'Ò'ßä×+Ò+¬D×,<Ò,<Ó,>Ó?ˆØŠ?Ü�K‰KÐ;Ô<ÙÜ�	‰	ÐBÀGÔLà�-ÔÜ�	‰	Ð=¸wÔMÙð
 ×Ñ˜&×!Ò!Ü�	‰	Ð7Ô8Øˆð ×Ñ˜g×&Ò&¬r¯w©w¯~©~¸g×/FÒ/FØ §¡¨sÓ 3Õ3ˆÜ�	‰	ØHØØô	
ð
 ˆðÜ—'’'˜'Ó"ˆô  �<Š<˜Ÿ™×(Ò(´·²¸g¿o¹o×1NÒ1NßÜ�I‰Ið%àØô	ñ ô �K‰KØCØØôñ
 Ø€Nøô= ô ß˜Ÿ™¤e§l¡lÔ2Ü�I‰IØKØØõð
 �Y‰Yœ%Ÿ,™,Ô&Ü�K‰KØ>Àõð ˆIÝûðús   ÅG= Ç=J
ÈA7JÊJ
c          
      óL   € V ^8„  d   QhR\         R\        R\        R\        RR/# )rQ   ÚnameÚcfgÚcloudÚargsrR   N)rS   r   r   Úlist)rT   s   "r+   rU   rU   û   s6   € ÷ Mñ M”ð Mœ6ð M¬%ð M´tð MÀñ Mr-   c                 óL  € V'       d   V^ ,          pM\         P                  ! VRR4      p\         P                  ! V\        .R7      '       g   \        P                  RV 4       R# Rp\         P                  ! V\        4      pV'       g   \        P                  RV4       R# Vw  rxp	VR8X  d0   VP                  R4      ^ ,          p
\        V
4      pV'       g   R# T
pR	V: R
V	: RV: 2p\        P                  RV4       \        W{4      pV'       g   R# Rp\        W…V4      '       d   \        P                  RW…4       R# VP                  4       p\         F   w  rïVP                  V4      '       g   K  Tp M	  V'       g   \        P                  RVV4       R# V! WW4      p\        P                  RWXRP                  V4      4       V\        8X  d   \         P                   ! \"        V4       M\#        V4       RpV\        8X  d   Rp\        P                  RVW„4       R# )é    Úresize_rootfsT)Úaddonsz+Skipping module named %s, resizing disabledNrt   z)Could not determine filesystem type of %srO   zdev=z mnt_point=z path=zresize_info: %sz%Skip resize filesystem type %s for %sz.Not resizing unknown filesystem type %s for %szResizing %s (%s) using %sÚ ÚResizedzResizing (via forking)z$%s root filesystem (type=%s, val=%s))r   Úget_cfg_option_strÚtranslate_boolÚNOBLOCKrZ   r[   Úget_mount_infor\   r    rg   r„   rq   ri   ÚRESIZE_FS_PREFIXES_CMDSrG   ÚjoinÚfork_cbÚ	do_resize)r†   r‡   rˆ   r‰   Úresize_rootrm   Úresultr&   rl   r%   r:   r^   Úresizerrn   ÚpfixÚroot_cmdÚ
resize_cmdÚactions   &&&&              r+   Úhandler    û   sÉ  € ßØ˜1•g‰ä×-Ò-¨c°?ÀDÓIˆÜ×Ò˜{´G°9×=Ó=Ü�	‰	Ð?ÀÔFÙð €KÜ× Ò  ¬cÓ2€FßÜ�‰Ð?ÀÔMÙà%+Ñ"€V�kð �%ÔØ—‘˜SÓ! !Õ$ˆÜ+¨EÓ2ˆßÙØˆøã,2³KÂÐM€DÜ‡I�IÐ Ô&ä+¨FÓ9€FßÙà€GÜ�w¨V×4Ò4Ü�	‰	Ø3°Wô	
ñ 	à—‘“€Iß1‰ˆØ×Ñ ×%Ô%ØˆGÙñ 2÷
 Ü�‰Ø<ØØô	
ñ
 	á˜Ó-€JÜ‡I�IØ# [¸3¿8¹8ÀJÓ;Oôð ”gÔô 	�ŠÜØõ	
ô
 	�*ÔØ€FØ”gÔØ)ˆÜ‡I�IØ.°¸ör-   c                 ó    €  \         P                   ! V 4       R#   \         P                   d    \        P                  ! \        R T 4       h i ; i)z$Failed to resize filesystem (cmd=%s)N)r   rE   r   ÚlogexcrZ   )rž   s   &r+   r˜   r˜   K  s<   € ðÜ�	Š	�*ÖøÜ×%Ñ%ô Ü�Š”CÐ?ÀÔLØðús	   ‚ š3Ac                ó@   € V ^8„  d   Qh/ ^ \         9   d
   \        ;R&   # )rQ   Úmeta)Ú__conditional_annotations__r   )rT   s   "r+   rU   rU   	   s   € × @Ñ @÷$ò „jñ ò% Ar-   ),r¥   Ú__doc__rz   Úloggingr   r_   rx   Útypingr   Ú	cloudinitr   r   r   Úcloudinit.cloudr   Úcloudinit.configr   Úcloudinit.config.schemar   Úcloudinit.distrosr	   Úcloudinit.settingsr
   r“   r¤   Ú	getLoggerÚ__name__rZ   r,   r2   r5   r8   r<   r?   rC   rK   r•   rj   rg   rq   r„   r    r˜   rU   )r¥   s   @r+   Ú<module>r±      s  øðö Aã Û Û 	Û 	Û Ý ç +Ñ +Ý !Ý #Ý .Ý )Ý )à
€ð 	ˆ-Ø�ˆ}Ø�Ø˜rð	€ó ð ×Ò˜Ó!€ò!òH!ò'ò)ò:ò.ò4ò
ð. ˆmÐØ
ˆKÐØ
ˆKÐØ
ˆKÐØ
ˆKÐØ�Ð ØÐ!Ð"ðÐ ð !Ð"6Ð7Ð õò<òMõ`Mô`r-   