aboutsummaryrefslogtreecommitdiffstats
path: root/mcp
diff options
context:
space:
mode:
authorCristina Pauna <cristina.pauna@enea.com>2020-01-13 12:43:37 +0000
committerGerrit Code Review <gerrit@opnfv.org>2020-01-13 12:43:37 +0000
commit6da2c5d9fb43c15e0270880c88afc2061b284820 (patch)
treec3e28dd2cd07e2d681d9a075c313b310dfaa13fe /mcp
parent02bdeb694ed12a2b17232818cc8dbfb98559ef21 (diff)
parent181d6ccbb8f7fdfa46cb2bacb599406bb810f1c0 (diff)
Merge "baremetal, virtual: Bump kernel to hwe-18.04 (5.0)" into stable/iruya
Diffstat (limited to 'mcp')
-rw-r--r--mcp/config/scenario/defaults.yaml.j22
-rw-r--r--mcp/reclass/classes/cluster/all-mcp-arch-common/infra/maas.yml.j23
-rw-r--r--mcp/scripts/lib_jump_common.sh20
-rw-r--r--mcp/scripts/lib_jump_deploy.sh10
-rw-r--r--mcp/scripts/requirements_deb.yaml2
5 files changed, 32 insertions, 5 deletions
diff --git a/mcp/config/scenario/defaults.yaml.j2 b/mcp/config/scenario/defaults.yaml.j2
index 697a8f70d..1e5cd6ed0 100644
--- a/mcp/config/scenario/defaults.yaml.j2
+++ b/mcp/config/scenario/defaults.yaml.j2
@@ -33,6 +33,7 @@ x86_64:
- saltstack 500 deb [arch=amd64] http://repo.saltstack.com/apt/ubuntu/18.04/amd64/2017.7 bionic main
pkg:
install:
+ - linux-generic-hwe-18.04
- salt-minion
- ifupdown
- cloud-init
@@ -96,6 +97,7 @@ aarch64:
- saltstack 500 deb [arch=amd64] http://repo.saltstack.com/apt/ubuntu/18.04/amd64/2017.7 bionic main
pkg:
install:
+ - linux-generic-hwe-18.04
- salt-minion
- ifupdown
- cloud-init
diff --git a/mcp/reclass/classes/cluster/all-mcp-arch-common/infra/maas.yml.j2 b/mcp/reclass/classes/cluster/all-mcp-arch-common/infra/maas.yml.j2
index 41871d872..b8c525822 100644
--- a/mcp/reclass/classes/cluster/all-mcp-arch-common/infra/maas.yml.j2
+++ b/mcp/reclass/classes/cluster/all-mcp-arch-common/infra/maas.yml.j2
@@ -20,7 +20,7 @@ parameters:
maas_admin_username: opnfv
dns_server01: '{{ nm.dns_public[0] }}'
single_address: ${_param:infra_maas_node01_deploy_address}
- hwe_kernel: 'ga-18.04'
+ hwe_kernel: 'hwe-18.04'
opnfv_maas_timeout_comissioning: {{ nm.maas_timeout_comissioning }}
opnfv_maas_timeout_deploying: {{ nm.maas_timeout_deploying }}
maas:
@@ -54,6 +54,7 @@ parameters:
subarches:
- "generic"
- "ga-18.04"
+ - "hwe-18.04"
labels: '"*"'
fabrics:
pxe_admin:
diff --git a/mcp/scripts/lib_jump_common.sh b/mcp/scripts/lib_jump_common.sh
index 7cfdd4254..c2bd46649 100644
--- a/mcp/scripts/lib_jump_common.sh
+++ b/mcp/scripts/lib_jump_common.sh
@@ -138,6 +138,26 @@ function docker_install {
fi
}
+function e2fsprogs_install {
+ local image_dir=$1
+ E2FS_VER=$(e2fsck -V 2>&1 | grep -Pzo "e2fsck \K1\.\d{2}")
+ if [ "${E2FS_VER//./}" -lt 143 ]; then
+ E2FS_TGZ="${image_dir}/e2fsprogs.tar.gz"
+ E2FS_VER='1.43.9'
+ E2FS_URL="https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git/snapshot/e2fsprogs-${E2FS_VER}.tar.gz"
+ notify_n "[WARN] Using e2fsprogs ${E2FS_VER} from ${E2FS_TGZ}" 3
+ if [ ! -e "${E2FS_TGZ}" ]; then
+ curl -L "${E2FS_URL}" -o "${E2FS_TGZ}"
+ mkdir -p "${image_dir}/e2fsprogs"
+ tar xzf "${E2FS_TGZ}" -C "${image_dir}/e2fsprogs" --strip-components=1
+ cd "${image_dir}/e2fsprogs" || exit 1
+ ./configure
+ make
+ cd - || exit 1
+ fi
+ fi
+}
+
function virtinst_install {
local image_dir=$1
VIRT_VER=$(virt-install --version 2>&1)
diff --git a/mcp/scripts/lib_jump_deploy.sh b/mcp/scripts/lib_jump_deploy.sh
index 532508a58..3dc3c4436 100644
--- a/mcp/scripts/lib_jump_deploy.sh
+++ b/mcp/scripts/lib_jump_deploy.sh
@@ -124,11 +124,15 @@ 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 [[ "${MCP_OS:-}" =~ ubuntu1604 ]] && sudo growpart "${OPNFV_NBD_DEV}" 1
+ if [[ "${MCP_OS:-}" =~ ubuntu ]] && sudo growpart "${OPNFV_NBD_DEV}" 1
then
+ if [ -e "${image_dir}/e2fsprogs" ]; then
+ E2FSCK_PREFIX="${image_dir}/e2fsprogs/e2fsck/"
+ RESIZE_PREFIX="${image_dir}/e2fsprogs/resize/"
+ fi
sudo kpartx -u "${OPNFV_NBD_DEV}"
- sudo e2fsck -pf "${OPNFV_MAP_DEV}"
- sudo resize2fs "${OPNFV_MAP_DEV}"
+ sudo "${E2FSCK_PREFIX}e2fsck" -pf "${OPNFV_MAP_DEV}"
+ sudo "${RESIZE_PREFIX}resize2fs" "${OPNFV_MAP_DEV}"
else
sleep 5 # /dev/nbdNp1 takes some time to come up
fi
diff --git a/mcp/scripts/requirements_deb.yaml b/mcp/scripts/requirements_deb.yaml
index 032aa1146..73374b6ef 100644
--- a/mcp/scripts/requirements_deb.yaml
+++ b/mcp/scripts/requirements_deb.yaml
@@ -14,6 +14,7 @@ deploy:
# Common pkgs required for all deploys, no matter the type, arch etc.
common:
- bridge-utils
+ - build-essential
- cloud-guest-utils
- cpu-checker
- curl
@@ -23,7 +24,6 @@ deploy:
- kpartx
- libglib2.0-bin
- libvirt-bin
- - make
- mkisofs
- qemu-kvm
- rsync