PNG  IHDR;IDATxܻn0K )(pA 7LeG{ §㻢|ذaÆ 6lذaÆ 6lذaÆ 6lom$^yذag5bÆ 6lذaÆ 6lذa{ 6lذaÆ `}HFkm,mӪôô! x|'ܢ˟;E:9&ᶒ}{v]n&6 h_tڠ͵-ҫZ;Z$.Pkž)!o>}leQfJTu іچ\X=8Rن4`Vwl>nG^is"ms$ui?wbs[m6K4O.4%/bC%t Mז -lG6mrz2s%9s@-k9=)kB5\+͂Zsٲ Rn~GRC wIcIn7jJhۛNCS|j08yiHKֶۛkɈ+;SzL/F*\Ԕ#"5m2[S=gnaPeғL lذaÆ 6l^ḵaÆ 6lذaÆ 6lذa; _ذaÆ 6lذaÆ 6lذaÆ RIENDB`  oB]c@sdZddlZddlZddlZddlZddlZddlZddlmZddl m Z m Z ddl m Z ddlmZdZe ZdgZi d d 6d d 6d d6edd6ed6dgd6e d6dd6iieeegd6edd6d6d6Ze eZdZdZdZdZdZd Zd!Zd"Zd#efd$efd%efd&efd'efgZied&6Zd(Z d)Z!d*Z"d+Z#dS(,s:Resizefs: cloud-config module which resizes the filesystemiN(tdedent(tget_schema_doctvalidate_cloudconfig_schema(t PER_ALWAYS(tutiltnoblocktallt cc_resizefstidtResizefstnamesResize filesystemttitles Resize a filesystem to use all avaliable space on partition. This module is useful along with ``cc_growpart`` and will ensure that if the root partition has been resized the root filesystem will be resized along with it. By default, ``cc_resizefs`` will resize the root partition and will block the boot process while the resize command is running. Optionally, the resize operation can be performed in the background while cloud-init continues running modules. This can be enabled by setting ``resize_rootfs`` to ``true``. This module can be disabled altogether by setting ``resize_rootfs`` to ``false``.t descriptiontdistross@resize_rootfs: false # disable root filesystem resize operationtexamplest frequencytobjectttypetenumsE Whether to resize the root partition. Default: 'true't resize_rootfst propertiescCsTtj| r=tjjd|r=ddddd|fSdddd|fSdS(Ns %s/.snapshotstbtrfst filesystemtresizetmax(Rtmount_is_read_writetostpathtisdir(t mount_pointtdevpth((s@/usr/lib/python2.7/site-packages/cloudinit/config/cc_resizefs.pyt _resize_btrfs<s   cCs d|fS(Nt resize2fs((RR((s@/usr/lib/python2.7/site-packages/cloudinit/config/cc_resizefs.pyt _resize_extJscCs d|fS(Nt xfs_growfs((RR((s@/usr/lib/python2.7/site-packages/cloudinit/config/cc_resizefs.pyt _resize_xfsNscCs dd|fS(Ntgrowfss-y((RR((s@/usr/lib/python2.7/site-packages/cloudinit/config/cc_resizefs.pyt _resize_ufsRscCsddd||fS(Ntzpooltonlines-e((RR((s@/usr/lib/python2.7/site-packages/cloudinit/config/cc_resizefs.pyt _resize_zfsVscCstjdd|gdS(Ntdumpfss-mi(Rtsubp(R((s@/usr/lib/python2.7/site-packages/cloudinit/config/cc_resizefs.pyt_get_dumpfs_outputZscCstjdd|gdS(Ntgparttshowi(RR*(tpart((s@/usr/lib/python2.7/site-packages/cloudinit/config/cc_resizefs.pyt_get_gpart_output^scCs^d }d }t|}x|jD]}|jds%tj|}d}tj|d|\}} xM|D]B\} } | dkrt| }n| dkrrt| }qrqrWq%q%Wd } tj d|} t | j d}xE|jD]7}tj d|r|j}t|d} qqW| | |d}||krVt St Sd S( s # dumpfs -m / # newfs command for / (/dev/label/rootfs) newfs -L rootf -O 2 -U -a 4 -b 32768 -d 32768 -e 4096 -f 4096 -g 16384 -h 64 -i 8192 -j -k 6408 -m 8 -o time -s 58719232 /dev/label/rootf t#sO:Ua:s:b:d:e:f:g:h:i:jk:m:o:L:is-ss-fs^(/dev/.+)p([0-9])$s freebsd-ufsiN(tNoneR+t splitlinest startswithtshlextsplittgetopttinttretsearchR/tgrouptTruetFalse(RRt cur_fs_sztfrag_szt dumpfs_restlinet newfs_cmdt opt_valuetoptlistt_argstotat expect_sztmt gpart_restfieldstnormal_expect_sz((s@/usr/lib/python2.7/site-packages/cloudinit/config/cc_resizefs.pyt_can_skip_resize_ufsbs0      RtexttxfstufstzfscCsI|j}x6tjD](\}}|j|r|||SqWtS(N(tlowertRESIZE_FS_PRECHECK_CMDStitemsR3R<(tfs_typet resize_whatRt fstype_lctitfunc((s@/usr/lib/python2.7/site-packages/cloudinit/config/cc_resizefs.pytcan_skip_resizes  c Cstj}|dkrwtjj| rw| rwtjtj}|dkrd|jddS|j d|n|dkr|j d||dS|j dr|j d|S|j d r tjj| r d|j d }|j d |||}nytj |}Wnpt k r}|r_|jtjkr_|j d ||n.|jtjkr|jd ||n|dSXt j|j rt j|j r|r|j d ||fn|jd||fdS|S(sReturn 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 commandline if the device path is a writable block device, returns None otherwise. s /dev/roots!Unable to find device '/dev/root's.Converted /dev/root to '%s' per kernel cmdlinet overlayroots)Not attempting to resize devpath '%s': %ssgpt/s#We have a gpt label - just go aheads/dev/t/s:'%s' doesn't appear to be a valid device path. Trying '%s's9Device '%s' did not exist in container. cannot resize: %ss,Device '%s' did not exist. cannot resize: %ss>device '%s' not a block device in container. cannot resize: %ss1device '%s' not a block device. cannot resize: %sN(Rt is_containerRRtexiststrootdev_from_cmdlinet get_cmdlineR1twarningtdebugR3tlstriptstattOSErrorterrnotENOENTtS_ISBLKtst_modetS_ISCHR(tdevpathtinfotlogt containert fulldevpathtstatrettexc((s@/usr/lib/python2.7/site-packages/cloudinit/config/cc_resizefs.pytmaybe_get_writable_device_pathsL     #       &  c Cst|dkr|d}ntj|dt}t|ttj|dtgsm|jd|dSd}tj ||}|s|j d|dS|\}} } | dkr|j dd} tj | }|sdS| }nd|| |f} |jd | t || |}|s/dSd} t| ||r^|jd | |dS| j}x-tD]%\}}|j|rq|} PqqqqW| s|j d | |dS| ||}|jd || d j||tkr%tjtjd|jdddtd||fn+tjd|jdddtd||fd}|tkrkd}n|jd|| |dS(NiRtaddonss+Skipping module named %s, resizing disabledR[s)Could not determine filesystem type of %sRPsdev=%s mnt_point=%s path=%ssresize_info: %ss%Skip resize filesystem type %s for %ss.Not resizing unknown filesystem type %s for %ssResizing %s (%s) using %st tlogfunctmsgsbackgrounded ResizingRXtargstResizingtResizedsResizing (via forking)s$%s root filesystem (type=%s, val=%s)(tlenRtget_cfg_option_strR;Rtschemattranslate_booltNOBLOCKRatget_mount_infoR`R5tget_device_info_from_zpoolRqR1RYRQtRESIZE_FS_PREFIXES_CMDSR3tjointfork_cbtlog_timet do_resize(R tcfgt_cloudRlRvt resize_rootRUtresultRRTRR&RktresizerRVtpfixtroot_cmdt resize_cmdtaction((s@/usr/lib/python2.7/site-packages/cloudinit/config/cc_resizefs.pythandlesh            cCsBytj|Wn*tjk r=tj|d|nXdS(Ns$Failed to resize filesystem (cmd=%s)(RR*tProcessExecutionErrortlogexc(RRl((s@/usr/lib/python2.7/site-packages/cloudinit/config/cc_resizefs.pyR3s ($t__doc__ReR6RR8R4RcttextwrapRtcloudinit.config.schemaRRtcloudinit.settingsRt cloudinitRR}RR R;R<R{RR!R#R%R(R+R/RLRRRRYRqRR(((s@/usr/lib/python2.7/site-packages/cloudinit/config/cc_resizefs.pyt s`                  2       ? L