From c7914e0d45d71c3d55eaf5370e0b707a5332e674 Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Mon, 1 Jul 2019 16:20:19 +0200 Subject: [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 --- mcp/scripts/lib_jump_deploy.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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}" -- cgit 1.2.3-korg