Просмотр исходного кода

Work around Trusty ext4 metadata_csum errors on Bionic

As described inline, Bionic hosts will build invalid Trusty images.
Hack around this by disabling metadata_csum in the ext4 mkfs.

Change-Id: Ibd67d58ca830a9e60605d0700ee2b17906c804e6
tags/2.32.0
Ian Wienand 5 месяцев назад
Родитель
Сommit
801fa77a16
2 измененных файлов: 20 добавлений и 2 удалений
  1. +2
    -2
      .zuul.d/project.yaml
  2. +18
    -0
      diskimage_builder/lib/disk-image-create

+ 2
- 2
.zuul.d/project.yaml Просмотреть файл

@@ -14,7 +14,7 @@
- dib-nodepool-functional-openstack-centos-8-src
- dib-nodepool-functional-openstack-fedora-29-src
- dib-nodepool-functional-openstack-fedora-30-src
# - dib-nodepool-functional-openstack-ubuntu-trusty-src
- dib-nodepool-functional-openstack-ubuntu-trusty-src
- dib-nodepool-functional-openstack-ubuntu-xenial-src
- dib-nodepool-functional-openstack-ubuntu-bionic
- dib-nodepool-functional-openstack-ubuntu-bionic-src
@@ -39,7 +39,7 @@
- dib-nodepool-functional-openstack-centos-8-src
- dib-nodepool-functional-openstack-fedora-29-src
- dib-nodepool-functional-openstack-fedora-30-src
# - dib-nodepool-functional-openstack-ubuntu-trusty-src
- dib-nodepool-functional-openstack-ubuntu-trusty-src
- dib-nodepool-functional-openstack-ubuntu-xenial-src
- dib-nodepool-functional-openstack-ubuntu-bionic
- dib-nodepool-functional-openstack-ubuntu-bionic-src


+ 18
- 0
diskimage_builder/lib/disk-image-create Просмотреть файл

@@ -440,6 +440,24 @@ if [ "$DIB_ROOT_FSTYPE" = "ext4" ] ; then
# We set journal size to 64M so our journal is large enough when we
# perform an FS resize.
MKFS_OPTS="-i 4096 -J size=$journal_size $MKFS_OPTS"

# NOTE(ianw) 2019-12-11 : this is a terrible hack ... if building on
# >=Bionic hosts, mkfs sets "metadata_csum" for ext4 filesystems,
# which makes broken Trusty images as that era fsck doesn't
# understand this flag. The image will stop in early boot
# complaining:
#
# Serious errors were found while checking the disk drive for /.
#
# We do not really have any suitable hook points where one of the
# ubuntu elements or block-device-* could set this override flag for
# just Trusty. We probably should, but desire to implement more
# code to support the out-of-date trusty at this point is
# non-existant. So hack in disabling this here.
if [[ ${DIB_RELEASE} == "trusty" ]]; then
MKFS_OPTS="-O ^metadata_csum $MKFS_OPTS"
fi

# Grow the image size to account for the journal, only if the user
# has not asked for a specific size.
if [ -z "$DIB_IMAGE_SIZE" ]; then


Загрузка…
Отмена
Сохранить