This is an automated email from the ASF dual-hosted git repository. rohit pushed a commit to branch debian9-systemvmtemplate in repository https://gitbox.apache.org/repos/asf/cloudstack.git
commit 813590695433992553a27387cc4b769def332d63 Author: Rohit Yadav <rohit.ya...@shapeblue.com> AuthorDate: Tue Dec 12 13:13:57 2017 +0530 systemvm fixes Signed-off-by: Rohit Yadav <rohit.ya...@shapeblue.com> --- .../appliance/definitions/systemvmtemplate/apt_upgrade.sh | 14 ++++++++++++-- tools/appliance/definitions/systemvmtemplate/cleanup.sh | 2 +- tools/appliance/definitions/systemvmtemplate/definition.rb | 2 +- tools/appliance/definitions/systemvmtemplate/finalize.sh | 11 +---------- tools/appliance/definitions/systemvmtemplate/preseed.cfg | 7 +------ 5 files changed, 16 insertions(+), 20 deletions(-) diff --git a/tools/appliance/definitions/systemvmtemplate/apt_upgrade.sh b/tools/appliance/definitions/systemvmtemplate/apt_upgrade.sh index 1a72b3a..4d5ff26 100644 --- a/tools/appliance/definitions/systemvmtemplate/apt_upgrade.sh +++ b/tools/appliance/definitions/systemvmtemplate/apt_upgrade.sh @@ -19,6 +19,17 @@ set -e set -x +# Perform fsck check on every 2nd boot +function fix_tune2fs() { + for partition in $(blkid -o list | grep ext | awk '{print $1}') + do + tune2fs -m 1 $partition + tune2fs -c 2 $partition + done + fdisk -l + df -h +} + function add_backports() { sed -i '/cdrom/d' /etc/apt/sources.list sed -i '/deb-src/d' /etc/apt/sources.list @@ -30,8 +41,7 @@ function apt_upgrade() { DEBIAN_FRONTEND=noninteractive DEBIAN_PRIORITY=critical - fdisk -l - df -h + fix_tune2fs # Setup sudo echo 'cloud ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/cloud diff --git a/tools/appliance/definitions/systemvmtemplate/cleanup.sh b/tools/appliance/definitions/systemvmtemplate/cleanup.sh index fd7d9f3..eed29af 100644 --- a/tools/appliance/definitions/systemvmtemplate/cleanup.sh +++ b/tools/appliance/definitions/systemvmtemplate/cleanup.sh @@ -21,7 +21,7 @@ set -x function cleanup_apt() { apt-get -y remove --purge dictionaries-common busybox isc-dhcp-client isc-dhcp-common \ - task-english task-ssh-server tasksel tasksel-data laptop-detect nano wamerican \ + task-english task-ssh-server tasksel tasksel-data laptop-detect wamerican \ debconf-i18n sharutils gnupg gnupg-agent apt-get -y autoremove --purge diff --git a/tools/appliance/definitions/systemvmtemplate/definition.rb b/tools/appliance/definitions/systemvmtemplate/definition.rb index b5e4da2..52cb7df 100644 --- a/tools/appliance/definitions/systemvmtemplate/definition.rb +++ b/tools/appliance/definitions/systemvmtemplate/definition.rb @@ -36,7 +36,7 @@ architectures = { config = { :cpu_count => '1', :memory_size => '512', - :disk_size => '2500', :disk_format => 'VDI', :hostiocache => 'off', + :disk_size => '2100', :disk_format => 'VDI', :hostiocache => 'off', :iso_download_timeout => '1000', :boot_wait => '10', :boot_cmd_sequence => [ diff --git a/tools/appliance/definitions/systemvmtemplate/finalize.sh b/tools/appliance/definitions/systemvmtemplate/finalize.sh index 82d17b9..febae7b 100644 --- a/tools/appliance/definitions/systemvmtemplate/finalize.sh +++ b/tools/appliance/definitions/systemvmtemplate/finalize.sh @@ -49,19 +49,11 @@ function cleanup_veewee() { rm -fv .veewee_version .veewee_params .vbox_version } -# Perform fsck check on every 2nd boot -function fix_tune2fs() { - for partition in $(blkid -o list | grep ext | awk '{print $1}') - do - tune2fs -c 2 $partition - done -} - # Zero out the free space to save space in the final image: function zero_disk() { df -h fstrim -av - for path in / /boot /var /var/log /tmp + for path in / /boot /var/log /tmp do dd if=/dev/zero of=${path}/zero bs=1M || true sync @@ -73,7 +65,6 @@ function finalize() { configure_misc configure_sudoers cleanup_veewee - fix_tune2fs sync zero_disk halt -p diff --git a/tools/appliance/definitions/systemvmtemplate/preseed.cfg b/tools/appliance/definitions/systemvmtemplate/preseed.cfg index 60bd9a8..d218172 100644 --- a/tools/appliance/definitions/systemvmtemplate/preseed.cfg +++ b/tools/appliance/definitions/systemvmtemplate/preseed.cfg @@ -63,16 +63,11 @@ d-i partman-auto/expert_recipe string \ use_filesystem{ } filesystem{ ext2 } \ mountpoint{ /boot } \ . \ - 1300 40 1500 ext4 \ + 1450 40 1600 ext4 \ method{ format } format{ } \ use_filesystem{ } filesystem{ ext4 } \ mountpoint{ / } \ . \ - 550 70 800 ext4 \ - method{ format } format{ } \ - use_filesystem{ } filesystem{ ext4 } \ - mountpoint{ /var } \ - . \ 350 60 500 ext4 \ method{ format } format{ } \ use_filesystem{ } filesystem{ ext4 } \ -- To stop receiving notification emails like this one, please contact "commits@cloudstack.apache.org" <commits@cloudstack.apache.org>.