ó 'KXc@s½ddlZddlZddlZddlmZddlmZeZd„Zd„Z d„Z d„Z defd e fd e fd e fgZ d Z d „Zd„Zd„ZdS(iÿÿÿÿN(t PER_ALWAYS(tutilcCsdddd|fS(Ntbtrfst filesystemtresizetmax((t mount_pointtdevpth((sI/opt/freeware/lib/python2.7/site-packages/cloudinit/config/cc_resizefs.pyt _resize_btrfsscCs d|fS(Nt resize2fs((RR((sI/opt/freeware/lib/python2.7/site-packages/cloudinit/config/cc_resizefs.pyt _resize_ext#scCs d|fS(Nt xfs_growfs((RR((sI/opt/freeware/lib/python2.7/site-packages/cloudinit/config/cc_resizefs.pyt _resize_xfs'scCs d|fS(Ntgrowfs((RR((sI/opt/freeware/lib/python2.7/site-packages/cloudinit/config/cc_resizefs.pyt _resize_ufs+sRtexttxfstufstnoblockcCs§d}x1|jƒD]#}|jdƒr|d}PqqW|dkrJdS|jdƒr]|S|jdƒr~d|tdƒS|jdƒrŸd|tdƒSd|S(Nsroot=is/dev/sLABEL=s/dev/disk/by-label/sUUID=s/dev/disk/by-uuid/(tNonetsplitt startswithtlen(tcmdlinetfoundttok((sI/opt/freeware/lib/python2.7/site-packages/cloudinit/config/cc_resizefs.pytrootdev_from_cmdline;s  cCs|jjdkrdSt|ƒdkr5|d}ntj|dtƒ}tj|dtgƒsv|jd|ƒdStj|ddƒ}tj |ƒd}tj ||ƒ}|sÊ|j d |ƒdS|\} } } d | | |f} |jd | ƒtj ƒ} | d krqt jj| ƒ rq| rqttjƒƒ} | dkr^|j d ƒdS|jd| ƒnyt j| ƒ}Wnxtk rþ}| rÈ|jtjkrÈ|jd| | fƒn2|jtjkrô|j d| | fƒn|‚dSXtj|jƒ r`tj|jƒ r`| rE|jd| | fƒn|j d| | fƒdSd}| jƒ}x-tD]%\}}|j|ƒry|}PqyqyW|s¿|j d| |ƒdS||| ƒ}|jd|| dj|ƒƒ|tkr0tjtjd|jdddt d||fƒƒn+tjd|jdddt d||fƒd}|tkrvd}n|jd|| |ƒdS(Ntaixit resize_rootfstaddonss+Skipping module named %s, resizing disabledtresize_rootfs_tmps/runt/s)Could not determine filesystem type of %ssdev=%s mnt_point=%s path=%ssresize_info: %ss /dev/roots!Unable to find device '/dev/root's.Converted /dev/root to '%s' per kernel cmdlines9Device '%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: %ss.Not resizing unknown filesystem type %s for %ssResizing %s (%s) using %st tlogfunctmsgsbackgrounded ResizingtfunctargstResizingtResizedsResizing (via forking)s$%s root filesystem (type=%s, val=%s)(!tdistrotnameRRtget_cfg_option_strtTruettranslate_booltNOBLOCKtdebugt ensure_dirtget_mount_infotwarnt is_containertostpathtexistsRt get_cmdlineRtstattOSErrorterrnotENOENTtS_ISBLKtst_modetS_ISCHRtlowertRESIZE_FS_PREFIXES_CMDSRtjointfork_cbtlog_timet do_resize(R(tcfgt_cloudtlogR$t resize_roott resize_root_dt resize_whattresultRtfs_typeRtinfot containertstatrettexctresizert fstype_lctpfixtroot_cmdt resize_cmdtaction((sI/opt/freeware/lib/python2.7/site-packages/cloudinit/config/cc_resizefs.pythandleNsˆ       &        cCsBytj|ƒWn*tjk r=tj|d|ƒ‚nXdS(Ns$Failed to resize filesystem (cmd=%s)(RtsubptProcessExecutionErrortlogexc(RSRE((sI/opt/freeware/lib/python2.7/site-packages/cloudinit/config/cc_resizefs.pyRB­s (R8R2R6tcloudinit.settingsRt cloudinitRt frequencyRR R RR>R,RRURB(((sI/opt/freeware/lib/python2.7/site-packages/cloudinit/config/cc_resizefs.pyts"            _