On some aarch64 platforms (e.g. ThunderX 1), lvcreate manifests some
spurious timing issues resulting in incomplete/corrupted LVM thin
creation and eventually to transaction ID mismatch between userspace
and kernel space.
This eventually leads to cinder-volume issues, either when creating
the thin storage pool (vgroot-pool) and/or when creating the LVs
inside said pool.
The issue manifests spuriously on Ubuntu Bionic + UCA, so until a
working combination of userspace/kernel is found, work around this
by bumping the kernel package to hwe-18.04 (kernel 5.0),
effectively bypassing the timing issues during volume creation.
This affects all cluster machines (both HA and NOHA scenarios,
baremetal and virtual, x86_64 and aarch64, baremetal and virtualized
nodes).
Note: Ubuntu Bionic cloud image partition handling requires e2fsprogs
1.43, not currently available on Ubuntu Xenial / CentOS 7.
Change-Id: I839e03080104c391fe18185b9544c9df43c114e6
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
(cherry picked from commit
f03bfd30206c1d21de7e5c9ef2f6ed79f6ee13f4)
jumpserver_pkg_install 'deploy'
docker_install "${MCP_STORAGE_DIR}"
virtinst_install "${MCP_STORAGE_DIR}"
+ # Ubuntu 18.04 cloud image requires newer e2fsprogs
+ if [[ "${MCP_OS:-}" =~ ubuntu1804 ]]; then
+ e2fsprogs_install "${MCP_STORAGE_DIR}"
+ fi
fi
if ! ${VIRSH} list >/dev/null 2>&1; then
- 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
- 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
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:
subarches:
- "generic"
- "ga-18.04"
+ - "hwe-18.04"
labels: '"*"'
fabrics:
pxe_admin:
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)
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
# Common pkgs required for all deploys, no matter the type, arch etc.
common:
- bridge-utils
+ - build-essential
- cloud-guest-utils
- cpu-checker
- curl
- kpartx
- libglib2.0-bin
- libvirt-bin
- - make
- mkisofs
- qemu-kvm
- rsync