From: Alexandru Avadanii Date: Mon, 1 Jul 2019 14:20:19 +0000 (+0200) Subject: [lib] Limit cloud img partition resize to Xenial X-Git-Tag: opnfv-9.0.0~36 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F68%2F68168%2F1;p=fuel.git [lib] Limit cloud img partition resize to Xenial All cloud images except Ubuntu Xenial (CentOS 7, Ubuntu 18.04) already have enough free space on the predefined partitions, so skip the resize to avoid dealing with the newer e2fsprogs required by Ubuntu 18.04. Change-Id: I184590e631c76910e7c3169dc7bee3c5902ebaf1 Signed-off-by: Alexandru Avadanii --- diff --git a/mcp/scripts/lib_jump_deploy.sh b/mcp/scripts/lib_jump_deploy.sh index d3ccd6e69..40910f453 100644 --- a/mcp/scripts/lib_jump_deploy.sh +++ b/mcp/scripts/lib_jump_deploy.sh @@ -124,7 +124,8 @@ function __mount_image { sudo kpartx -av "${OPNFV_NBD_DEV}" # Hardcode partition index to 1, unlikely to change for Ubuntu UCA image sudo partx -uvn 1:1 "${OPNFV_NBD_DEV}" - if sudo growpart "${OPNFV_NBD_DEV}" 1; then + if [[ "${MCP_OS:-}" =~ ubuntu1604 ]] && sudo growpart "${OPNFV_NBD_DEV}" 1 + then sudo kpartx -u "${OPNFV_NBD_DEV}" sudo e2fsck -pf "${OPNFV_MAP_DEV}" sudo resize2fs "${OPNFV_MAP_DEV}"