diff options
author | Stefan K. Berg <stefan.k.berg@ericsson.com> | 2015-09-24 22:07:46 +0200 |
---|---|---|
committer | Jonas Bjurel <jonas.bjurel@ericsson.com> | 2015-09-25 18:32:44 +0000 |
commit | 7ebcd36ad54157e0107252ab6c41dc15a509ab21 (patch) | |
tree | 8c1e8c2f3d9dada23237f6ed6e3fdea5e8d0b90b /fuel | |
parent | ed6b75e47e4a77099e1c96fbbd59670b138611ab (diff) |
Fuel patch to enable virtual deployment
Disable ext4 journalling during Fuel master image creation,
otherwise the provisioning process times out on many virtual
setups after 3600 sec.
All credit to Michal Skalski of Mirantis for providing the
information to patch this up:
https://docs.mirantis.com/openstack/fuel/fuel-6.1/release-notes.html#issues-with-image-based-provisioning
https://review.openstack.org/#/c/197943/
Change-Id: I90f68a351b3afe1273440846bc5d56da8f6d3507
Signed-off-by: Stefan K. Berg <stefan.k.berg@ericsson.com>
Diffstat (limited to 'fuel')
-rw-r--r-- | fuel/build/Makefile | 9 | ||||
-rw-r--r-- | fuel/build/fuel-agent_1.patch | 36 |
2 files changed, 45 insertions, 0 deletions
diff --git a/fuel/build/Makefile b/fuel/build/Makefile index 4714aed..ba4beaf 100644 --- a/fuel/build/Makefile +++ b/fuel/build/Makefile @@ -85,6 +85,15 @@ $(ISOCACHE): sudo rm -f /etc/apt/apt.conf.d/docker* # cd /tmp/fuel-main && ./prepare-build-env.sh + cd /tmp/fuel-main && make repos + # Patch for speeding up image creation in virtual environments, + # https://review.openstack.org/#/c/197943/ + cd /tmp/fuel-main && patch -p0 < $(TOPDIR)/fuel-agent_1.patch + cd /tmp/fuel-main/build/repos/nailgun && git config --global user.email "build$opnfv.org" + cd /tmp/fuel-main/build/repos/nailgun && git config --global user.name "OPNFV build" + cd /tmp/fuel-main/build/repos/nailgun && git add -u . + cd /tmp/fuel-main/build/repos/nailgun && git commit -m "Added patch" + # cd /tmp/fuel-main && make iso mv /tmp/fuel-main/build/artifacts/fuel*.iso . diff --git a/fuel/build/fuel-agent_1.patch b/fuel/build/fuel-agent_1.patch new file mode 100644 index 0000000..b080896 --- /dev/null +++ b/fuel/build/fuel-agent_1.patch @@ -0,0 +1,36 @@ +*** build/repos/nailgun/fuel_agent/fuel_agent/manager.py.orig Thu Sep 24 11:08:38 2015 +--- build/repos/nailgun/fuel_agent/fuel_agent/manager.py Thu Sep 24 11:10:25 2015 +*************** +*** 541,546 **** +--- 541,552 ---- + fs_options=fs.options, + fs_label=fs.label, + dev=str(fs.device)) ++ if fs.type == 'ext4': ++ LOG.debug('Trying to disable journaling for ext4 ' ++ 'in order to speed up the build') ++ utils.execute('tune2fs', '-O', '^has_journal', ++ str(fs.device)) ++ + + # mounting all images into chroot tree + self.mount_target(chroot, treat_mtab=False, pseudo=False) +*************** +*** 631,636 **** +--- 637,652 ---- + self.umount_target(chroot, pseudo=False, try_lazy_umount=False) + + for image in self.driver.image_scheme.images: ++ # find fs with the same loop device object ++ # as image.target_device ++ fs = self.driver.partition_scheme.fs_by_device( ++ image.target_device) ++ ++ if fs.type == 'ext4': ++ LOG.debug('Trying to re-enable journaling for ext4') ++ utils.execute('tune2fs', '-O', 'has_journal', ++ str(fs.device)) ++ + LOG.debug('Deattaching loop device from file: %s', + image.img_tmp_file) + bu.deattach_loop(str(image.target_device)) |